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>
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>
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>
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>
Change-Id: I76cad71c96a5def170715568e6a16b1168cbb2cd
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>