summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-198-34/+125
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Extend blacklisting of tst_QElapsedTimer::elapsed to cover macOS 10.12Tony Sarajärvi2017-06-181-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-58713 Change-Id: I0c467c1abcdd1284910e0a61f98646e943eae377 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Blacklist flaky tst_QTimeLine tests on macOS 10.12Tony Sarajärvi2017-06-181-0/+3
| | | | | | | | | | | | Task-number: QTBUG-61037 Change-Id: I604bbc815c16a5ab436d2ff4936d96d3a2d27dab Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Use QMap in QProcessEnvironment so variables are sortedThomas Sondergaard2017-06-131-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is to make it simple to pass a correctly sorted environment block to Win32 CreateProcess(). It is also nice in other contexts that the environment variables are sorted. The change is made for all platforms. This keeps it simple and the only ill effect is slightly slower lookups. Concerning the environment block passed to Win32 CreateProcess: The environment block that is passed to CreateProcess() must be sorted case-insensitively and without regard to locale. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx The need for sorting the environment block is also mentioned in the CreateProcess() documentation, but with less details: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx Task-number: QTBUG-61315 Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * macOS/iOS: Correctly ignore punctuation in QCollatorAndy Shaw2017-06-131-29/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When punctuation is ignored then the kUCCollatePunctionSignificantMask should not be set. This was originally thought to not be working due to a bug on the Apple platforms, but this is not the case. [ChangeLog][Platform Specific Changes][macOS][iOS] QCollator now respects the ignorePunctuation property on Apple based platforms correctly. Task-number: QTBUG-41978 Change-Id: I62044076387d6e4479f4aaef3c2f48f49dbd160e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Fix sending UTC-offset QTimeZones through QDataStreamChris Wilson2017-06-081-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTimeZone("UTC") should be valid, as "UTC" appears in the list of availableTimeZoneIds(), and tst_QTimeZone::dataStreamTest() constructs timezones like this, which are considered valid. The internal representation of a QTimeZone("UTC") as created by QTimeZone::QTimeZone(const QByteArray &ianaId) is a QUtcTimeZonePrivate which isValid(), so the containing QTimeZone isValid() too. When QTimeZone is serialized into a QDataStream, it calls tz.d->serialize(ds) which is QUtcTimeZonePrivate::serialize. This writes QStringLiteral("OffsetFromUtc") followed by the IANA ID and the offset (etc.) to the datastream. When QTimeZone is deserialized it looks for this marker string, and if present, it passed all of the parameters to the QTimeZone constructor (not just the name). However, that constructor does not support standard IANA timezones (only custom ones), and when it detects that the supplied IANA ID is actually listed in availableTimeZoneIds(), it leaves the pointer to the QTimeZonePrivate uninitialized (NULL), which leaves the QTimeZone invalid (isValid() returns false). Thus, a valid timezone which was serialized and then deserialized has become invalid. This also affects serialization of QDateTimes with timezones. Fixed by calling the name-only constructor first, which works (only) for IANA standard timezones and leaves the QTimeZone invalid (isValid() returns false) otherwise. In which case, we can call the many-argument contructor to create a custom timezone with the same offset as the one which was originally serialized. [ChangeLog][QtCore][QTimeZone] Fixed sending IANA standard UTC-offset QTimeZones through QDataStream, which previously came out invalid after deserialization. Task-number: QTBUG-60595 Change-Id: Id9c47e8bda701faae4d800e012afb6db545b2fe9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix tst_QDir::emptyDirOliver Wolff2017-06-081-2/+5
| | | | | | | | | | | | | | | | | | It is possible that tmpdir already exists as a leftover from previous tests. That is no reason for the test to fail. Change-Id: I010633fb92defb064093af9872ae6fd2178f07dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Fix tst_qresourceengine for platforms with embedded test dataOliver Wolff2017-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | load(resources) makes embedding the test data into the executable fail for platforms that use builtin test data. As the load call is only used to obtain QMAKE_RCC we can avoid that call by assuming that rcc was not renamed and assembling the path ourself. Change-Id: I25b982d10f5617d9a213803e7e4bcc85fc66b2e7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * tst_QSharedMemory::readOnly: Skip on macOSFriedemann Kleint2017-06-071-0/+2
| | | | | | | | | | | | | | | | The binary hangs rather than segfaults on that platform. Task-number: QTBUG-59936 Change-Id: Id7d38edb7c746e3c0cd4b4941e0e19b3d42a628a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Support standard channel redirection in QProcess::startDetachedJoerg Bornemann2017-06-132-17/+106
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QProcess] Added support for standard channel redirection using setStandard{Input|Output|Error}File to QProcess::startDetached. Task-number: QTBUG-2058 Task-number: QTBUG-37656 Change-Id: Iafb9bd7899f752d0305e3410ad4dcb7ef598dc79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTemporaryFile: fix the generation of names from templatesThiago Macieira2017-06-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First and most importantly, let's not use more than half of the template for the application's PID. With over 71% of all PIDs on a typical Linux system and 90% of those on a Darwin system having 5 decimal digits, using them all in a template that is usually 6 characters long is wasteful. That leaves only 1 character for the random part, thereby reducing the number of temporary files possible to only 52. So limit the PID to half the characters of the template. Second, let's use QRandomGenerator::bounded to create the the random part, instead of qrand (which is often unseeded at this point). Change-Id: Icd0e0d4b27cb4e5eb892fffd14b52eda5e467395 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Long live QRandomGeneratorThiago Macieira2017-06-123-0/+705
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class provides a reasonably-secure random number generator that does not need seeding. That is quite unlike qrand(), which requires a seed and is low-quality (definitely not secure). This class is also like std::random_device, but better. It provides an operator() like std::random_device, but unlike that, it also provides a way to fill a buffer with random data, not just one 32-bit quantity. It's also stateless. Finally, it also implements std::seed_seq-like generate(). It obeys the standard requirement of the range (32-bit) but not that of the algorithm (if you wanted that, you'd use std::seed_seq itself). Instead, generate() fills with pure random data. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4e3ba9ea04da8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | json: Add operator[] to QJsonDocument for implicit object and array accessTor Arne Vestbø2017-06-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | Makes it easier to pull out data from a document when the structure is known up front, while still supporting default values if the structure does not match the expectation, eg: int age = QJsonDocument::fromJson(ba)["users"][0]["age"].toInt(-1); Change-Id: Ief0899bbb81610f6f22a56e2ac846121bffe77a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | json: Add operator[] to QJsonValue for implicit object and array accessTor Arne Vestbø2017-06-081-0/+30
| | | | | | | | | | | | | | | | Saves a lot of manual toArray() and toObject() calls when the JSON structure is usually known anyways. Read only access for now. Change-Id: I5fd787144198e0443e4da285a11ce2597b66f99f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-078-2/+81
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Blacklist tst_QTimer::basic_chrono on macOSTony Sarajärvi2017-06-011-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-61013 Change-Id: I1c877aeb3e141e0e19b71bf9e595ff478e313b10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * qEnvironmentVariableIntValue: fix the case of a non-numeric valueThiago Macieira2017-06-011-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that it's equivalent to qgetenv(varName).toInt() But the implementation wasn't. QByteArray::toInt() verifies that the entire string was consumed, so QByteArray("1a").toInt() == 0, but qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1. The implementation also detected the base, a behavior I kept. Instead, I updated the documentation. Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QAbstractItemModel::supportedDragActions: fix regressionDavid Faure2017-05-312-0/+31
| | | | | | | | | | | | | | | | | | | | | | This method now returns -1 by default, due to commit 6255cb893d which mistakenly replaced -1 with Qt::IgnoreAction (0x0). As a result, dropping is forbidden in a number of applications (I detected this in zanshin). Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Extend blacklisting of tst_QSemaphoreTony Sarajärvi2017-05-311-0/+1
| | | | | | | | | | | | | | | | | | tryAcquireWithTimeout(0.2s) was already blacklisted and now the same failed with "(2s)". Task-number: QTBUG-58745 Change-Id: I82363238c08056d2969a7616e3a6e5af080d537d Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Fix tst_QFile for configurations without process supportOliver Wolff2017-05-311-0/+2
| | | | | | | | | | Change-Id: Icca2d55f0b9402bf4bcb009d972f21075d144f87 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix tst_qmessagehandler for configurations without process supportOliver Wolff2017-05-311-1/+1
| | | | | | | | | | Change-Id: If61a7b1e389e7fffb9cfa85d6b5d77a7b777215f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix autotest not to open too many files on a UnixTony Sarajärvi2017-05-291-0/+19
| | | | | | | | | | | | | | | | | | | | tst_QSharedPointer can't create a pipe as the OS has too many files open. Systems like macOS have a lower limit to these simultaneous files open. Task-number: QTBUG-60410 Change-Id: I21e89f992ada2a7d09b706522a05b5952f00ec33 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove QWinOverlappedIoNotifierJoerg Bornemann2017-06-023-343/+1
| | | | | | | | | | | | | | | | | | | | This class in unused in qtbase since Qt 5.6.1. The only outside usage was in qtserialport, which got its own copy of QWinOverlappedIoNotifier in commit qtserialport/65dba188. Change-Id: I7668e67a1cc49c4418c66141784b180cd5f9d479 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-298-22/+87
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Blacklist tst_QEventLoop:testQuitLock as it is flaky on macOSTony Sarajärvi2017-05-231-0/+1
| | | | | | | | | | | | Task-number: QTBUG-60992 Change-Id: I9474fd67b6429f01ddbbc9ae17af4ae8635e53df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Extend blacklisting of qeventdispatcher to cover macOSTony Sarajärvi2017-05-231-0/+2
| | | | | | | | | | | | | | | | | | They have been blacklisted on windows previously and now fail on macOS 10.12 as well. Task-number: QTBUG-60993 Change-Id: Ib7a3acfc7f2285c0a587d4abd88a4a218391d623 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into ↵Liang Qi2017-05-192-12/+67
| |\ | | | | | | | | | refs/staging/5.9
| | * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-192-12/+67
| | |\ | | | | | | | | | | | | Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
| | | * QMimeDatabase: update freedesktop.org.xml to shared-mime-info 1.8David Faure2017-05-081-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and update the unittest accordingly. Compared to the 1.8 release there is one change in freedesktop.org.xml, the magic for application/x-java-keystore was changed from host32 to big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328 Task-number: QTBUG-60608 Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Eliminate ambiguous casts involving qfloat16Glen Mabey2017-05-071-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator double() and operator long double() members of qfloat16 are causing cast ambiguities. This removes them, leaving only operator float() which seems to be adequate. Also, additional arithmetic operator tests were added which without this removal fail to compile. Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | tst_QTimer::timeout(): Use QTRY_VERIFY_WITH_TIMEOUTFriedemann Kleint2017-05-191-4/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The test has been observed to be flaky on Windows. Introduce QTRY_VERIFY_WITH_TIMEOUT for diagnostics. Change-Id: I72abdd2e5544f8f35199876486ab15151f60e5f2 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | winrt: Fix tst_QSocketNotifier::asyncMultipleDatagramOliver Wolff2017-05-111-0/+4
| | | | | | | | | | | | | | | Change-Id: I90de7487b0ddcd5655434e99a05eef7f29def59b Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | winrt: Fix tst_qcoreapplicationOliver Wolff2017-05-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On winrt, the default application version is determined by its manifest file. The template's default version is 1.0.0.0. Additionally addRemoveLibPaths should not fail if libraryPaths only contains currentDir. Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | Add some missing breaks in switch statementsMarc Mutz2017-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Found by GCC 7. Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | moc: Allow NOTIFY signals defined in parent classesAlbert Astals Cid2017-05-231-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limitation is that the signal needs to be parameter-less [ChangeLog][moc] moc now supports NOTIFY signals of parent classes in Q_PROPERTY Change-Id: Iad64c96c3ec65d4be8ad9ff1a9f889938ab9bf45 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | | QStringView/QLatin1String: add trimmed()Marc Mutz2017-05-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... using the same qt_trimmed(), qTrimmed(), Q..::trimmed() split we've been using for all other out-of-line string-view member functions to avoid forcing string-view objects onto the stack for the passing of 'this'. In the test, had to fix nullness not being propagated from a QByteArray to the QLatin1String constructed from it. Probably worth fixing in QLatin1String(QByteArray), too. [ChangeLog][QtCore] Added qTrimmed() free functions. [ChangeLog][QtCore][QLatin1String] Added trimmed() function. Change-Id: I73c18ef87e203f30f7552c10dd5c84223bcfae0e Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringView: add constructor from pointer pairMarc Mutz2017-05-161-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is often more natural than (ptr, len), and I need it in the implementation of QStringView::trimmed(). Change-Id: I1d99b5ddaf76eee0582150b0233ef6ce9c37d25d Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-103-436/+460
|\| | | | | | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| * | Fix missing handling of columns when merging selection rangesFilippo Cucchetto2017-05-091-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two bugs: 1) Two ranges should not be merged if they are of different columns. The old code would have merged (0,0) with (1, 1). Tranforming a selection of just two indexes in a rectangle of four indexes. 2) The QItemSelectionRange appended had wrong column and worked only for indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1) so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)). This QItemSelectionRange is invalid because topLeft columns is greater than bottomRight column. The fix take in consideration the bottomRight column. Task-number: QTBUG-58871 Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * | QObject: turn the narrowing test into static_assertsGiuseppe D'Angelo2017-05-081-435/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | The conditions checked are compile-time conditions anyhow. Simplify or strenghten a few conditions while at it. Change-Id: If07f2aedca4c3632d852a8fdb2b3f7eb55a96c93 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
| * | tst_qmessagehandler: fix qMessagePattern for arm with optimizations onSami Nurmenniemi2017-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backtrace logging tests were not passing for arm when -O2 option was used. Set "-fno-inline" on for the app whose backtrace is to be inspected. Task-number: QTBUG-59966 Change-Id: Id1bbf78c31dc524357a30c7d39c239689621b155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | QMimeType: add Q_GADGETAlberto Mardegan2017-05-081-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMimeType class can be quite useful to graphical QML applications, especially on the desktop. [ChangeLog][QtCore][QMimeType] Add Q_GADGET, so that QML applications can make use of QMimeType's properties and methods. Change-Id: I03e6e82062558a72f5b97e65bbddfc4b7470e735 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jeremy Katz <jeremy@panix.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-0712-29/+182
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * | QHash/QMultiHash: fix operator==Giuseppe D'Angelo2017-05-051-2/+67
| |/ | | | | | | | | | | | | | | | | | | | | The existing QHash::operator== does not work when the same keys appear in different order between the two hashes being compared. However, relying on iteration order on a QHash is (as usual) a bad idea and one should never do it. Task-number: QTBUG-60395 Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Improve suppression of spurious socket notifications under WindowsAlex Trotsenko2017-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were still two cases where spurious notifications would be possible: - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP socket somewhere outside the slot connected to readyRead() signal (::WSARecvFrom posts FD_READ notification, even if a notification for incoming datagram already exists in the message queue); - a socket was registered to receive several types of event and WM_QT_ACTIVATENOTIFIERS message is located between the different events for this socket in the queue. Provided patch ensures that the message queue is synchronized with the Qt event processing mechanism and adds a way to detect spurious notifications inside the window procedure. Task-number: QTBUG-58214 Change-Id: I49609dace601f300de09875ff1653617efabd72f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Peter Seiderer <ps.report@gmx.net>
| * Fix test build with ICC: QFlags does not auto cast to uintThiago Macieira2017-04-281-9/+9
| | | | | | | | | | | | | | | | | | | | I don't know why. tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton) tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * Fix tests that assume system files are owned by root for qemuSami Nurmenniemi2017-04-264-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QUrl: fix IDN conversion when the ACE form is invalidThiago Macieira2017-04-251-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QUrl: fix IDN whitelist checking when the TLD is in UnicodeThiago Macieira2017-04-241-0/+8
| | | | | | | | | | | | | | | | | | | | The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
| * Rename macos blacklisting to osxTony Sarajärvi2017-04-241-1/+1
| | | | | | | | | | Change-Id: I7e370ad8e1e2cb87188e149c96681e4c18abaa4f Reviewed-by: Liang Qi <liang.qi@qt.io>