summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* QMetaProperty::write should reset the property if an empty QVariant is givenOlivier Goffart2015-10-092-3/+15
| | | | | | | | | | [ChangeLog][QtCore][QMetaProperty] write() now resets the property if an empty QVariant is given, or set a default constructed object if the property is not resettable Change-Id: I9f9b57114e740f03ec4db6f223c1e8280a3d5209 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Insert leading after each line, not beforeUlf Hermann2015-10-091-0/+12
| | | | | | | Task-number: QTBUG-45791 Change-Id: I763d9d1ba00989d0c6b1e0b955173dadbef26b10 Reviewed-by: Stephen Chu <stephen@ju-ju.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix crash in QMetaProperty::write for custom types and conversionOlivier Goffart2015-10-091-1/+44
| | | | | | | | | | | | | | | | if t >= QMetaType::User, we would not return false nor call convert. We would then pass a pointer to whatever is in the QVariant to the qt_metacall that is expecting a pointer to an object of a different type. Since we have custom converters, we can call QVarent::convert even for custom types anyway. [ChangeLog][QtCore] Fixed crash when setting a QVariant of a different type to a property of a custom type. Attempt to do a conversion instead. Task-number: QTBUG-40644 Change-Id: Ib6fbd7e7ddcf25c5ee247ea04177e079f6d7de35 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* xcb: Add support for Qt::WA_ShowWithoutActivatingAlexander Volkov2015-10-081-23/+23
| | | | | | | | Also re-enable and update the tst_showWithoutActivating test. Change-Id: Ic7fa9b1bf7637e4661c593aaeabb3220cd4204ff Task-number: QTBUG-46098 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* tst_qversionnumber: enable c++11 and don't use core-privateMarc Mutz2015-10-071-1/+2
| | | | | | | | QVersionNumber is now public API. Change-Id: I5b21b6ce5f1651158b6f29bc6f06e5d4e133bed8 Reviewed-by: Keith Gardner <kreios4004@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix selected items after sorting in QTableWidgetLibor Tomsik2015-10-071-0/+19
| | | | | | | | | | OldPersistentIndexes store selected items during sort operation. They were wrongly taken from static list of indexes. This change takes them from parent (QTableWidget) who maintains the list of selected segments. Task-number: QTBUG-48408 Change-Id: Ie1bc4071a275dd76d113d883ab30ccd4cb1fa625 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Liang Qi2015-10-0220-67/+564
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-0220-67/+564
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| | * Fix comparisons between QByteArray and QString.Christian Kandeler2015-09-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | QByteArray::operator< and friends had their logic reversed. Task-number: QTBUG-48350 Change-Id: I625209cc922b47e78dfb8de9fe100411f285a628 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Make sure networkAccessibilityChanged is emittedLorn Potter2015-09-261-14/+17
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-46323 Change-Id: I8297072b62763136f457ca6ae15282d1c22244f4 Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * QDateTime: Ensure a valid timezone when using the "offset constructor".Christian Kandeler2015-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The timeZone() function used to assert when called on such an object (or, for a release build, return an invalid time zone). Change-Id: I6ae8316b2ad76f1f868e2498f7ce8aa3fcabf4a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * tst_QUndoGroup, tst_QUndoStack Fixed flag QT_NO_PROCESSTuomas Heimonen2015-09-142-8/+8
| | | | | | | | | | | | | | | | | | | | | Change-Id: I6c36475e343de72c954fcc917132977eb1f8d61a Reviewed-by: Tuomas Heimonen <tuomas.heimonen@theqtcompany.com> Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Fix the spurious socket notifications under WindowsAlex Trotsenko2015-09-101-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To handle network events, QEventDispatcherWin32 uses I/O model based on notifications through the window message queue. Having successfully posted notification of a particular event to an application window, no further messages for that network event will be posted to the application window until the application makes the function call that implicitly re-enables notification of that network event. With these semantics, an application need not read all available data in response to an FD_READ message: a single recv in response to each FD_READ message is appropriate. If an application issues multiple recv calls in response to a single FD_READ, it can receive multiple FD_READ messages (including spurious). To solve this issue, this patch always disables the notifier after getting a notification, and re-enables it only when the message queue is empty. Task-number: QTBUG-46552 Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * QUdpSocket: avoid infinite read notifier blockingAlex Trotsenko2015-09-101-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a small amount of time between the last readDatagram() call and disabling a read notifier in case the socket had a pending datagram. If a new datagram arrived in this period, this qualified as absence of a datagram reader. Do not change the read notifier state because it is disabled on canReadNotification() entry and always enabled by the datagram reader. Thanks to Peter Seiderer, who investigated the same: "Querying hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled() is racy (a new datagram could arrive after readDatagam() is called and before hasPendingDatagrams() is checked). But for unbuffered sockets the ReadNotification is already disabled before the readReady signal is emitted and should be re-enabled when calling read() or readDatagram() from the user." However, this patch does not completely solve the problem under Windows, as the socket notifier may emit spurious notifications. Task-number: QTBUG-46552 Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix tst_QGuiApplication for embedded platforms using eglfs QPAPasi Petäjäjärvi2015-09-102-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | Disable input and cursor for QGuiApplication instances used in autotest to initialize it properly. Change-Id: I78dc9b776269c082c20f244a51f858289129275d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * tst_QProcess_and_GuiEventLoop: Added flag QT_NO_PROCESSTuomas Heimonen2015-09-091-2/+5
| | | | | | | | | | | | | | | | | | Change-Id: I895b9c12de8734c20ec87ac30a9a9cca8f4242d7 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QMimeDatabase: warn instead of asserting on bad magic.David Faure2015-09-046-37/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An invalid mime magic definition could lead to an assert. Replaced with a qWarning. Move all checking to the QMimeMagicRule constructor, and do keep invalid rules since they are need to parse child rules. Unit test added, with QTest::ignoreMessage when using the XML backend (there's no warning from update-mime-database when using the cache). Also make it easier to add more shared mime info files for tests. Task-number: QTBUG-44319 Done-with: Eike Ziller <eike.ziller@theqtcompany.com> Change-Id: Ie39a160a106b650cdcee88778fa7eff9e932a988 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Another fix of cosmetic QPainter::drawPolyline()Eirik Aavitsland2015-09-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the edge of the view, a line segment could end up as not producing any pixels even if not clipped by the floating-point clip routine. Make sure the starting point for the next line is still updated correctly for any significant segment lengths. Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Ensure sendPostedEvents() can be called independentlyJan Arve Saether2015-09-013-0/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Qt is not running its own event loop (e.g. if Qt is a plugin running in a non-Qt host application with its own event loop, a call to sendPostedEvents() should process all events by default, and not depend on the flags passed to the last call to processEvents() We also modify sendPostedEvents() to call its base implementation instead of directly calling QCoreApplication::sendPostedEvents(). (The behavior of the base implementation is the same, so no behavior change there). This also adds a test for QWindow event handling without Qts event loop is running. This is a black box test, just to ensure that basic functionality is working. It can be extended later. Task-number: QTBUG-45956 Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | tst_qdesktopservices: Use regular expression to suppress error message.Friedemann Kleint2015-10-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error return has been observed to vary. Task-number: QTBUG-48566 Change-Id: Iecfe7819898a6a8a482c1b2251543193ecfa4841 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | tst_QSharedPointer: Add jom.exe to the list of make tools to be searched.Friedemann Kleint2015-10-021-0/+1
|/ / | | | | | | | | | | | | Task-number: QTBUG-48565 Change-Id: I9b1371fb1d3ea451c185bfe5fa3a6acabe28be15 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Purge extraneous execute permissions.Edward Welbourne2015-09-301-0/+0
| | | | | | | | | | | | | | | | | | Source files should not be executable. Change-Id: If9b9eaa6c8c7348ca6f48fa9253f3540e95aca37 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Improve tst_qfile.Friedemann Kleint2015-09-301-114/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduce consistent error messages for failing QFile::open() and existence checks to make errors about non-available UNC paths on Windows clearer. - Introduce a guard class to ensure the stdin reader processes are terminated properly in case of failures, which currently occur for MSVC2015. - Fix brace coding style and remove unnecessary QString conversions. Task-number: QTBUG-48504 Change-Id: I890b13088558ef05391fb152a6b815276df0fe8c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Improve messages in tst_qdir/tst_fileinfo/tst_qfiledialog2.Friedemann Kleint2015-09-303-56/+111
| | | | | | | | | | | | | | | | | | | | Introduce error messages showing the path in file existence, file type and directory entry list tests to make fails related to missing UNC shares clearer. Task-number: QTBUG-48504 Change-Id: I5fb401b94cfa8b58562a906b8d9765039e334027 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Initialize QFutureWatcherBasePrivate::finished and testEdward Welbourne2015-09-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's accessed by QFutureWatcherBase::isFinished(), potentially before anything has set it. It gets to be initially true until setFuture() has given it us unfinished future and set it false. Add a regression test for matching state in future and watcher. Task-number: QTBUG-12358 Change-Id: Iae7bdaa434ab80f518afe4d7d55df99c391991a4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | MSVC2015: Blacklist tests reading from stdin in buffered/text mode.Friedemann Kleint2015-09-302-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - tst_QProcess::fileWriterProcess() - tst_QProcess::readLineStdin() - [tst_QProcess::readLineStdin_lineByLine() The test fails apparently due to a bug in its runtime library (fread() dropping data). Task-number: QTBUG-48455 Task-number: QTBUG-48504 Change-Id: I972e560e88312cea0d3dbcea9450c59285a15d5a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Clean unused parameter warning from QItemSelectionModel testJoni Poikelin2015-09-301-1/+1
| | | | | | | | | | Change-Id: I6bd40e8de7b44630ef5c7475b8159ab9a0361cb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | tst_qprocess: Improve handling of helpers.Friedemann Kleint2015-09-304-17/+99
| | | | | | | | | | | | | | | | | | | | | | Verify exit status and code where applicable. Avoid unnecessary data conversions in fileWriterProcess. Improve error handling in helper processes. Task-number: QTBUG-47370 Task-number: QTBUG-48455 Change-Id: Ib5c4f546027131db02caaa05154a5880edac5cf7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Skip tst_QNumeric::addOverflow() for MSVC2015.Friedemann Kleint2015-09-301-2/+2
| | | | | | | | | | | | | | | | The code still produces Internal Compiler Errors in release mode. Task-number: QTBUG-46344 Change-Id: I86d3608b13a197a0b65b83829d1512203e1578f8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Tests: Always verify whether QTemporaryDir/File creation succeeded.Friedemann Kleint2015-09-2824-53/+75
| | | | | | | | | | | | | | | | | | | | | | Use QVERIFY2() with QTemporaryDir/File::errorString() consistently. Attempt to catch issues like the below warning and follow-up issues. QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.) Task-number: QTBUG-47370 Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Enable tst_qaccessibilitylinuxFrederik Gladhorn2015-09-262-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test caused problems because it relies on the at-spi services to run. In addition it could trigger orca (screen reader) to be launched as a side-effect of the dbus call to the screen-reader-enabled setting. Instead just export QT_LINUX_ACCESSIBILITY_ALWAYS_ON to make sure that accessibility will work. This means we won't test the dbus startup any more, but the test will be reliable. There is still a dbus call to org.a11y.Bus to launch the service in case it's not running yet. Task-number: QTBUG-27732 Task-number: QTBUG-44434 Change-Id: Idb86ed98ca4b47cb209027c8b41529e7e5285197 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | tst_qprocess: Instantiate QProcess objects on the stack.Friedemann Kleint2015-09-251-165/+141
| | | | | | | | | | | | | | | | | | | | | | | | Instantiate the QProcess object on the stack to ensure resource cleanup and remove the QProcess * member variable. Use qobject_cast<QProcess *>(QObject::sender()) instead of the member variable in the helpers slots to ensure that signals from a leaked QProcess do not interfere with other tests. Task-number: QTBUG-47370 Change-Id: Ifc0dccb7e4b18069d236df53bccdcb6a47df6346 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | tst_qprocess: Port to Qt 5 connection syntax.Friedemann Kleint2015-09-251-46/+54
| | | | | | | | | | | | Task-number: QTBUG-47370 Change-Id: I09489a6fb4598238fa5e0120bf751fe5af6f31af Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Use QTypeInfo<T>::isRelocatable in QVariantThiago Macieira2015-09-241-3/+3
| | | | | | | | | | Change-Id: Ib306f8f647014b399b87ffff13f1f01c40dc3ef7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QSettings: Special-case serialization of QDateTime.Christian Kandeler2015-09-241-0/+4
| | | | | | | | | | | | | | | | | | | | QDateTime values with a UTC offset are not correctly serialized with QDataStream::Qt_4_0. So use a newer QDataStream format for this type and mark it with "@DateTime" instead of "@Variant". Task-number: QTBUG-46551 Change-Id: I211c89e8cd0211c949ec993e6ffd5192d0eebbb3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fix QItemSelectionModel deselection rangeJoni Poikelin2015-09-241-0/+94
| | | | | | | | | | | | | | | | | | Left and right were swapped which caused invalid selection ranges to be emitted through selectionChanged. Task-number: QTBUG-48402 Change-Id: I18692c2b50c49ab39065f9b360b37b7615227ee9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Tests: Harmonize code checking on platform name.Friedemann Kleint2015-09-2414-26/+26
| | | | | | | | | | | | | | | | Use case insensitive comparison and static invocation of QGuiApplication::platformName(). Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | tst_QDBusAbstractInterface: fix racy test failing every so oftenThiago Macieira2015-09-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The explanation is in the code comment. Ever since QDBusConnections began being processed in a separate thread, we were relying on the fact that the main thread didn't begin processing its event queue until the second event got posted (the event loop only exits after it has finished processing all pending events). We had a race between the main thread starting its processing, at which point it decides which is the last event it will process, and the QDBusConnectionManager thread posting the second event. This is very fragile code, since it depends on the behavior of QDBusConnectionPrivate (how it stores the signal relays in a hash) and that of QHash with duplicate keys. This only works because the hash key between the two connections is the same (it's only dependent on the method name and interface name). If we ever begin using something that isn't the same between "control" and "p", then with QHash's randomness, we'll be racy again. Change-Id: I42e7ef1a481840699a8dffff1406c3a4674ec3a6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Stabilize qguieventloop test.Jędrzej Nowacki2015-09-242-15/+2
| | | | | | | | | | | | | | | | | | The test assumed that an event loop can be tested for emptiness multiple times, which is wrong because an event can be delivered any time. Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix tst_qthreadstorageFrederik Gladhorn2015-09-241-1/+1
| | | | | | | | | | | | | | | | This test when running on Windows has a race condition since in qthread_win.cpp the finished signal is emitted before everything is cleaned up. Change-Id: I3c03d9a245e297e8f79b2be2c34398bf7bac9bae Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Add code to perform overflow-checking additions and multiplicationThiago Macieira2015-09-232-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most processors have carry flags which they set on addition overflow, so it's a good idea to access them whenever possible. Most of them also have widening multiply instructions that can be used to detect overflow of the non-widening version. Tested to compile on: Architecture Compiler x86 GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta x86-64 GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta x86-64 ILP32 GCC 4.9, GCC 5*, Clang 3.6* IA-64 LP64 GCC 4.8 ARMv7-A GCC 4.9, Clang 3.6* AArch64 Clang 3.6* MIPS GCC 4.9, Clang 3.6* MIPS64 GCC 4.9, Clang 3.6* PowerPC GCC 4.9, Clang 3.6* PowerPC 64 GCC 4.9, Clang 3.6* SPARC Clang 3.6* SPARCv9 Clang 3.6* [*] supports the intrinsics If the compiler does not offer a way to detect an overflow, we do it by hand. For unsigned additions, that's easy, since the C++ language specifies the behavior of the overflow. That's also the reason why this code is implemented only for unsigned integers. For the multiplication, if the compiler does not support widening multiplications, we do it with a division instead. This is necessary for GCC < 4.5 and compilers not compatible with GCC or MSVC. Change-Id: I049a653beeb5454c9539ffff13e637de0f1338c1 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Silence warnings about missing dbus-send command not foundTor Arne Vestbø2015-09-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Without piping the output to /dev/null, we'd get the following: sh: dbus-send: command not found And if dbus support is only limited to runtime support, we don't treat it as a fatal error and only notice the user. Change-Id: Ia7750a074b8d563bf9694fa8fa628b4017e8bb68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QGraphicsProxyWidget: forward touch events to QWidgetRafael Roquetto2015-09-221-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working with QGraphicsView/QGraphicsScene, touch events are sent to QGraphicsView's viewport() event handler, which then dispatches it to the corresponding QGraphicsItem, if any. In the case of QGraphicsProxyWidget, we need to forward these touch events to the encapsulated QWidget, otherwise it will never receive them (i.e. the event chain for touch events terminates at QGraphicsProxyWidget). This also enables QWidgets associated with QGraphicsProxyWidget to grab gestures. Task-id: QTBUG-45737 Change-Id: Ia441d3576afb6c97376be6f2ff073901e6e928a5 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QAbstractSpinBox::inputMethodQuery(): Consider input method hints set on the ↵Friedemann Kleint2015-09-222-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spin box. The derived classes (QSpinBox, QDoubleSpinBox, QDateTimeEdit, QTimeEdit) set various input method hints on the spin box in the init() methods of their private classes which did not have any effect since QAbstractSpinBox::inputMethodQuery() was implemented to return the hints of the embedded QLineEdit only. Change it so that hints set on the QAbstractSpinBox are also considered. Change-Id: I76b7c4d3e0869589c110cf3a0b2c3f94201db5d5 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Add getter and setter for qt_qhash_seedGabriel de Dietrich2015-09-224-32/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases it's not possible to use QT_HASH_SEED, specially when we need to set the environment variable from inside the application, as dynamically loaded libraries or plugins may create static QHash instances. That would set qt_qhash_seed to a value different from -1 and skip the env var value. For those cases, and when we still want to set qt_qhash_seed, we provide a way to enforce its value. Auto-tests accessing qt_qhash_seed directly have been updated accordingly. Usage in qdoc, uic and rcc has been left as is for the time being. Change-Id: I3b35b4fa0223c83b1348a6508641905a2a63266f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix taskQTBUG_34717_collapseAtBottom testJędrzej Nowacki2015-09-222-30/+33
| | | | | | | | | | | | | | | | | | | | The test is moved from tst_qtreeview to tst_qtreewidget as it tests qtreewidget class. C++ usage is fixed, there was an illegal C cast that was causing crashes Change-Id: I80e90a9b531e87f9b133186b6f48be42f54901b5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Fix QImageReader::size() to return correct size for .ico files.Serge Lysenko2015-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth fields mean a maximum icon size 256 pixels. So QtIcoHandler::option() should return 256 instead of 0 pixels for such icons. Also there is fixed wrong seek offset at the second call on this method. http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx Task-number: QTBUG-48103 Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Serialize the capitalization value of QFontAndy Shaw2015-09-152-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By serializing the capitalization value of QFont, it ensures that it is correctly preserved when QPicture streams it and later plays it back. Subsequently the QDataStream version has been bumped up to account for the change of the data format for serializing QFont. [ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 17 to account for changes in the serialization of QFont. Task-number: QTBUG-15214 Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Replace direct QPA access in tst_qguiappliction with testlib wrapperTor Arne Vestbø2015-09-151-3/+3
| | | | | | | | | | Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove QGraphicsView autotest that doesn't test anythingTor Arne Vestbø2015-09-151-9/+0
| | | | | | | | | | | | | | | | It sends a shortcut override event directly, which should go though QPA anyways. Change-Id: Ie2c6f45cd44222cd9be8846099573dcd2968a77c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>