Commit Graph

9376 Commits

Author SHA1 Message Date
Lukas Geyer
9fcf8dc2e8 Force QT_NO_ICONV on win32:!win32-msvc*
This behaviour was changed in Ide9800f6 to suppress
macro redefinition warnings for MSVC, but MinGW
has iconv support and therefore configure does not
set QT_NO_ICONV, which prevents compilation on win32-g++
as QIconvCodec does not support Windows.

Change-Id: Ic3c4ccceb3eaf9542c95b0c27847ca5ab51849b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-08-31 16:10:25 +02:00
Jason Barron
ce4ed8315e Use the right getter for the QScreen::primaryOrientation property.
Change-Id: I408e4941163cd676133b2e41613162f52b685076
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 16:10:25 +02:00
Friedemann Kleint
1e34d3525f Fix updating of drag icons.
Try to find a target widget that accepts drops; ignore the event
if none can be found. Split the handleDrag*() functions
to reduce indentation.

Add an autotest.

Task-number: QTBUG-22987
Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-31 16:10:25 +02:00
Thiago Macieira
9aa67cf0c4 Fix the name of the arguments of qAtan2 to match std::atan2
There is no change in functionality, just swapping of the names x and y.
The std::atan2 function uses (y, x) in that order, so we should too.

Task-number: QTBUG-27090
Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-31 16:10:25 +02:00
Stephen Kelly
0a0157f545 Move the creation of the MODULE_DEFINES variable above the pri file check.
The MODULE_DEFINES is also used by create_cmake.prf, whether there is an existing
pri file or not. In the case of QtWebKit at least, there is still a handwritten
pri file present.

Change-Id: I566c32a36aa6b84a455c2785c0da2bae57ea9091
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-31 16:10:25 +02:00
Stephen Kelly
9ca74072d7 Report a FATAL_ERROR if trying to use Qt 5 with CMake < 2.8.3.
Change-Id: I76cad71c96a5def170715568e6a16b1168cbb2cd
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-31 16:10:25 +02:00
Sergio Ahumada
2994cd41ca Add missing QT_{BEGIN,END}_NAMESPACE
Fix src/network/kernel/qnetworkfunctions_wince.h

Change-Id: Ia59c1e67f9409abb97fce3fcaa3840e0d77c0978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-31 01:16:56 +02:00
Sergio Ahumada
ef32abb086 Header contains signals' - use Q_SIGNALS' instead!
Change-Id: I5ee1bfd0ce9c98d64b50cc727d414037fafb91c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-31 01:16:56 +02:00
Mitch Curtis
c2907968ed Document the purpose of QDateTimeParser::cachedDay.
It's useful to know what this member variable is used for, since there
is very little documentation for QDateTimeParser, which makes
maintenance yucky.

Change-Id: I9ecf5aa5ef0b5d778ceb858c323e3bab1ebaa7dc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 01:16:56 +02:00
Casper van Donderen
2e7f06c9bc Doc: Simplify qtbase qdocconfs.
We should be using the global qdocconf for the common variables. This
change also allows you to just specify -installdir without using a
templatedir.

Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 01:16:56 +02:00
aavit
244e3e2aa0 Doc: Fix various errors
Change-Id: I07503dd379779148b674ab0f806f6eeac5d7d4b7
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-30 21:43:36 +02:00
aavit
dc5359a312 Fix QScreen::grabWindow() on Windows
Finish up 94ac17c2cc

Task-number: QTBUG-26963

Change-Id: I13f52f0a6cf460d525b53338738aecd4b3cf313c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 21:36:26 +02:00
Jonathan Liu
2b69431d3c Fix MinGW-w64 TDM64-GCC 4.6.1 compilation
This fixes a regression introduced by
f58390e0f4 because __MINGW64_VERSION_MAJOR
is the same in older releases of shobjidl.h that do not declare the
IFileDialogEvents interface.

Task-number: QTBUG-24699
Change-Id: I000a5b9baf52363dfdedff2fb29bbe7ab24df5ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 21:35:34 +02:00
Friedemann Kleint
711689fef9 MSVC/OpenGL: Fix warnings about macro redefinition..
Introduced by fc41ee4c92 .

Change-Id: I4c924b0b0a38401ab02c3cc4edb7d78dbd9ef356
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 13:51:22 +02:00
aavit
634c39c1a9 Doc: Fix misc. documentation errors
Change-Id: I9481ed452922ed5ecd159a8f60d7fbcb3683cec1
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-30 13:51:22 +02:00
João Abecasis
ed4939eaac Improve performance of QArrayData::Grow autotest
Doing element-wise insertions for the full range of the test made
testing under valgrind extremely slow. When a reallocation is detected
we now resize() the container close to capacity(), while verifying this
doesn't unnecessarily re-allocate either.

Change-Id: Idf7015cf390e366fe444e7ca14c904a2d54ff48b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 13:51:22 +02:00
Jason Barron
36dd62ecaf Make plugintest util work on Windows.
Command line apps that use stdout need the CONSOLE subsystem.

Change-Id: Ic220f45119ea70372e27b4a364f7264cc649726d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-30 13:51:22 +02:00
James Turner
9597e0d2a2 Avoid a warning from the QNX QPA plugin.
The HDMI display on the Playbook is listed, but (normally) unattached, 
and hence generates an error if we attempt to register for events. This 
patch avoids the warning; a future change will actually watch for screens
being attached / detached and update the QPlatformScreens and event
registration correctly.

Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-08-30 13:51:22 +02:00
Mark Brand
a3963d8bbc QSqlQueryModel: suppress insert and remove signals while resetting
There is no need to emit signals for inserting and removing rows
and columns while resetting the model. Suppress these signals in
such a way that subclasses can benefit without worrying about it.

Change-Id: I04447c87173be54a7323b97608cdd40ae245b80b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Mark Brand
c194b7f345 QSqlQueryModel: fix nested beginResetModel/endResetModel
Follow-up to 83c9ebbd66.

Consider the case where calls to the reset methods on the same object
are nested as in the following sequence:

  1. beginResetModel()
  2. beginResetModel()
  3. endResetModel()
  4. endResetModel()

In such cases, only the outermost calls, i.e., 1) and 4), should emit
signals.

After 83c9ebbd66, 1) and 3) emitted the
signals, which is wrong. This is corrected by keeping track of the
nesting level.

Such sequences can come about when a base class calls the begin/end
methods between the calls made by the subclass.
QSqlTableModel::select() is an example of this.

Test included.

Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Mark Brand
98c663acd9 docs: remove \reimp from non-virtual methods
It seems we need \internal in this case.

Change-Id: I3f290bb0d22f9f3b5d04d27b13a7ef8961b2dd6c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Friedemann Kleint
861786bb50 Fix static plugins for classes in namespaces.
Breakage introduced by 819d0203e6 .

Extend QT_MOC_EXPORT to take the unqualified class name
as well for the function names.

Change-Id: I736097b564caa37c522d723780663d03341f9032
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
2012-08-30 13:51:22 +02:00
Titta Heikkala
1cebd906af Ensure that printer orientation is preserved
After setting the printer name the initialization is no longer done for
a printer with a name. Instead doReinit() method is called to preserve
the orientation (set with setOrientation() method before calling
setPrinterName()). Before the orientation was changed back to default
when setPrinterName() method was called ignoring the orientation set.

Updated also the autotest because the case:
taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to
fail on Windows.

Task-number: QTBUG-26008
Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3
Reviewed-by: Andy Shaw
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 08:54:59 +02:00
Kai Koehne
f7de5b0923 Logging: Remove mutex for OutputDebugString
OutputDebugString seems indeed to be thread safe, at least according
to http://www.unixwiz.net/techtips/outputdebugstring.html . I also didn't
manage to run into any deadlocks on Windows 7 ...

The comment + code was already there (in qcoreapplication_win.cpp) in
the first git commit that imported Qt.

Change-Id: I442e22575558958ef21ab8c6b4cc8b03aee906b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 06:22:45 +02:00
Kevin Funk
7cea395d1f Make tests/auto/corelib compile on Windows CE
Change-Id: I71987d40ae69d95f645c4c7d26d50add4c799327
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 06:22:34 +02:00
Rohan McGovern
42457c2f5f Temporarily mark ctest testcases as insignificant on Windows
The deployment of cmake onto Windows test machines caused test failures
with no changes to the code under test.  Mark all the ctest tests as
insignificant until the failures can be fixed.

Change-Id: If0cd4001ae6ec49fd38b9e0f97dd5326fddae433
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-30 05:45:55 +02:00
Marc Mutz
ca7be5c154 dist/changes-5.0.0: note that QtConcurrent is a separate library these days
Change-Id: Ib8ab6e40d9827697d1061a1b369e150f33d63be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:29:02 +02:00
Fabian Bumberger
b4075c8ea3 Fixes possible memory leak in QContiguousCache
When inserting an item on a position that is already occupied, the destructor of the old item was never invoked.

Change-Id: I01dc4ec9f2da5027284eba94e1a9ad36b062a50d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:29:00 +02:00
Marc Mutz
c2f10f915f QVarLengthArray: C++11-ify insert/erase signatures
In C++11, container insert and erase operations take const_iterators
instead of iterators. This is a bug fix compared to C++98, where the
mere lookup step of a lookup-or-insert operation had to be done using
(mutable) iterators, which is particularly worrisome for Qt containers
that are implicitly shared, because of the unneeded detach in the positive
case.

QVarLengthArray is not implicitly shared, but for consistency, the signatures
should be changed here, too. The reason this commit contains only the change
to QVarLengthArray is that this is by far the easiest container. The
implictly shared containers are harder, because detaching invalidates other
iterators (more than the sister STL container would).

Change-Id: Ib3d98360bfe376b782b9d1283c5fa3555e8a719e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:28:51 +02:00
Marc Mutz
6276427438 QString::append: add (const QChar*, int len) overload
Both insert and replace have this overload, so one reason to add it
to append(), too, is consistency. But I can also make good use of
this overload in the the new QStringList::join(QChar) overload, so
it's actually useful in its own right.

Change-Id: Iccd48f9cb84831399e4db7e3e78eba25c0ced30d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:28:30 +02:00
Richard Moore
7f324c4979 Document how to remove a QGraphicsEffect.
You can remove an effect by setting 0, but this wasn't documented.

Change-Id: I2d86875d8554cb26b4d88b8ce04b4daa9792c5d5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-29 23:02:05 +02:00
Thierry Bastian
1e97dbaf6c Fixed the QTreeView expansion/collpasing when animated
If you had a QTreeView with expandable items, if you tried to expand and while
the animation was still running you'd try to collpase the node,
the display would be completely broken: the items below that items would
not be visible any more except for a fraction of a second when expanding
or collapsing it again.
The problem is in the fact that when starting an animation the QTreeView
stores the state before animating. And it does that even if an animation
is already running. So the stateBeforeAnimation becomes AnimatingState and
when the animation finishes, AnimatingState is the state that is restored
breaking the painting.
Unit test is included.

Change-Id: I015212c1ed8962e6df705655099a5660f195caf3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-29 20:40:17 +02:00
Samuel Rødal
c1e5f600ab Made QImage::fill(uint pixel) for RGB888 accept QRgb values.
Previously QImage::fill() for Format_RGB888 expected a BGR value
instead of the RGB order defined by QRgb, making it counter intuitive to
use related to the 32-bit formats.

Fixed the QPixelLayout data for RGB888 and changed the byte order of
quint24 based on what the optimized image conversion routines expect.

Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-29 16:53:00 +02:00
Samuel Rødal
f3b45ffa61 Added OpenGL example and documentation.
Change-Id: I2d9d4e52caf0a39fef9648d8a9e83a0c1328f650
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-29 16:53:00 +02:00
Andy Shaw
49c251e054 Ensure child items are updated even if the parent item has no content
When a parent item had its visiblity toggled, then the child item would
not update if the parent item had ItemHasNoContents and
ItemClipsChildrenToShape set. This is a common use case in declarative as
the root item has ItemHasNoContents set.

Task-number: QTBUG-26846

Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-29 16:53:00 +02:00
Jason Barron
48955161b4 Document obsolete functions in QImage to silence qdoc errors.
Change-Id: I78f3335e5c088641c56d5e682425c7e4b26b7d3e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-29 16:53:00 +02:00
Jason Barron
a39e78710d Fix mistake in docs. Return type should be QSurfaceFormat
Change-Id: I4f4bf2542bb89b28ee84773507d4a121b134e730
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-29 16:53:00 +02:00
Brendan Long
860f95946b Add support for explicit TLS 1.1 and 1.2
Add SslProtocol enums TlsV1_1 and TlsV1_2 and use the appropriate OpenSSL
methods when they're selected (TLSv1_1_client_method, TLSv1_2_client_method,
TLSv1_1_server_method and TLSv1_2_server_method). This allows us to
explicitly use TLS 1.1 or 1.2.

Task-number: QTBUG-26866
Change-Id: I159da548546fa746c20e9e96bc0e5b785e4e761b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:22:54 +02:00
Thomas McGuire
a135d87a0f Blackberry: Fix QFileSystemEngine::tempPath()
Apparently it depends on the user and/or firmware version on whether
TMPDIR or TEMP is set, so try both.
Additionally, fall back to /tmp if neither is set, as that seems to be
present on all devices.

Change-Id: Ia49499729df525276e145d2e35e94559eac45c98
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:18:48 +02:00
Marc Mutz
7e21ba6845 SSL: remove unneeded volatile qualifications
These two variables are only ever accessed under mutex protection,
and don't otherwise look like they could be changed by the hardware,
so remove the volatile qualifier.

Change-Id: I714451bb3e80778b971a901d53fe13e1b01dd84f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-29 14:16:45 +02:00
Marc Mutz
e8963749a7 QNativeWifiEnginePlugin: replace a volatile bool with an atomic int
Since there is non-atomic data that is protected by 'triedResolve',
the (outer) read from triedResolve needs to have acquire, and the
store needs to have release semantics. The release implied by the
mutex unlock is not good enough because it only synchronises-with
the locking of the same mutex, which not all threads execute.

Change-Id: I90b62c4c0213472ecf2b95a1674a1c6c79dc3786
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:15:58 +02:00
Marc Mutz
b2edd830b1 QDnsLookupRunnable: replace a volatile bool with an atomic int
Since there is non-atomic data that is protected by 'triedResolve',
the (outer) read from triedResolve needs to have acquire, and the
store needs to have release semantics. The release implied by the
mutex unlock is not good enough because it only synchronises-with
the locking of the same mutex, which not all threads execute.

Change-Id: If46b3ea6ccfdd66ca41ce44d4f45bef2c2c30f72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:14:46 +02:00
Marc Mutz
462a266edf QHostInfo: replace a volatile bool with an atomic int
A volatile bool read/store is documented on MSVC to have acquire/release
semantics, respectively, but that doesn't need to be true for MinGW, so
use explicit memory ordering.

Apply the same fix to the Unix implementation, too.

Change-Id: Ica466cec50beed830aafa4e3384d82f02e1a47e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:14:17 +02:00
Frederik Gladhorn
e0d3874525 Exclude the examples/widgets/doc dir for all but widgets.
There are too many references to the QWidget lib documentation
in there. On the other hand this keeps snippets working.

Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-29 14:12:06 +02:00
Sergio Ahumada
b6a4e66ffb test: Mark tst_qtextboundaryfinder::generateDataFromFile() with internal build
This function only makes sense on a developer build. In non
developer-builds you get:

  tst_qtextboundaryfinder.cpp:116:13:
    warning: ‘void generateDataFromFile(const QString&)’
    defined but not used [-Wunused-function]

Change-Id: Id1bda2d27b00048f7401606959b566a59c05b38d
Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
2012-08-29 14:12:03 +02:00
Frederik Gladhorn
3d13156025 Let qdoc respect excludedirs for examples.
Change-Id: I01063b38122aea3615801ff013c8c4a1589327fc
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-29 14:12:00 +02:00
João Abecasis
b856c2f8b4 Don't do path conversions on isEmpty()
Change-Id: I4b5eefe74c6f741d1d0870d502798a5e3d0e7a2a
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:11:59 +02:00
João Abecasis
1cd85c541f Use QString for user-visible strings
dirPath is kept as the "user visible" path string and is used to
construct paths during directory iteration. In QFileSystemEntry (and in
Qt, more generally) these are represented with QString.

While on Windows QFileSystemEntry::NativePath and QString are one and
the same, dirPath does not represent a native path. So, basically, don't
do that.

Change-Id: I987477cb41b37018634ac43aeda004d254181dc5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:11:11 +02:00
Jon Trulson
5b9edbf037 Revert "Fix transformation in eglfs backingstore"
This reverts commit 12491f35bb.

This change is not needed on eglfs.  It causes widget based apps to be
rendered with Y inverted.

Change-Id: Idb23fa22c438442b81882b64bf84d6aa0662d27b
Reviewed-by: Laszlo Agocs <lagocs83@gmail.com>
2012-08-29 14:09:13 +02:00
Jing Bai
6210b2018a wrap the implementation with NO_SETTINGS macro
To fix a compile issue where the header is wrapped but the
implementation is not.

Change-Id: I9d4e30a251e9f5de71710eb6bf784fb2eb396698
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-29 14:07:39 +02:00