summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Clean up time-zone matching logic in tst_QLocale::macDefaultLocale()Edward Welbourne2019-11-251-17/+17
| | | | | | | | | | | | | | | | | | | | | The test was computing GMT with a suffix added to it for the offset; but when the offset is zero there's no need for it. Cleaned up the logic so that it only checks for a "padded to two digits with zero" if the number is single-digit (and use string arithmetic in preference to wantonly complex .arg()ing; and use simpler names). Since we don't try to check anything unless GMT does appear in the string (because the actual zone ID was used, instead of GMT with an offset), the case of zero offset has nothing more to check than that GMT was present, the precondition for checking anything. Fixes: QTBUG-79965 Task-number: QTBUG-70322 Change-Id: I0b8abe7e63d9d72fa9cf32f188b47a78a849044b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 017ac02ec459378074a44487f171cc909e947f4a) Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Blacklist tst_QDnsLookup::lookup in ciMårten Nordheim2019-08-241-0/+2
| | | | | | | | | | | It is incredibly flaky in CI (all/multiple platforms), but stable on local machines. This is not a cherry-pick because it would have to cherry-pick multiple patches. Change-Id: Ic1c3887a3c04bbfaa92421fff347161c9bf2ad96 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Blacklist QHostInfo::reverseLookup:google-public-dns-a.google.comMårten Nordheim2019-06-251-0/+2
| | | | | | | | | | | | Back in April the entry for 8.8.8.8 changed, and this was planned to be blacklisted. Google, however, changed it back and the blacklist patches were dropped. At some point they changed it again and the blacklist will still be needed. The issue was fixed separately in >=5.12. Change-Id: I5dbc234a216ae639d463a48a6278c31120f18612 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* SSL: Update an about-to-expire certificateMårten Nordheim2019-06-242-30/+30
| | | | | | | | | Change-Id: I9e29baf529b74ae33fa0ee7250e5af6b1873e86f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 42f3b18ec9a101a7b8e5c6433257249bb36ab88c)
* Temporarily skip tst_QSslSocket::resumeMårten Nordheim2019-06-241-0/+1
| | | | | | | | | | | | Will be reverted once ready Change-Id: Id03df7dea1dd65579ec83606fddf2a73a45a0d64 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit a489e11b97ca6c0f5893711a363c9896dd8377f8)
* tst_QNetworkReply: Blacklist getFromHttp:success-externalLiang Qi2018-11-271-0/+3
| | | | | | | | Task-number: QTBUG-71953 Change-Id: Ibf45a8184cb0a78b1d36b4110974be4508b299fb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 46076f73337d6b0fea9a006dab2af8864571ae2c) Reviewed-by: Liang Qi <liang.qi@qt.io>
* QMenuBar: Account for displays that are above 0x0Andy Shaw2018-09-262-0/+129
| | | | | | | | | | | | | | If a display is placed above a primary screen which has the top left set to be 0x0, then menus that are defaulting to go up can still be displayed on that screen when the menubar is placed on the bottom of it. This ensures that this is the case and also adds a manual test to aid verification of it in the future. Change-Id: Ib657ccdc1aabfe1586c72585c087ac80a6c632c2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 34d212cb02f168e59c2a5c8e95a12377a57bfb7e) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* qmake: Add test functions for comparing version numbersAlexander Volkov2018-09-241-0/+38
| | | | | | | | | | | | | | | | | qmake really lacks version comparing functions: users either use ugly constructions to compare versions by components, such as greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4): or even incorrectly compare versions as strings: !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): Add test functions versionAtLeast and versionAtMost which use QVersionNumber to compare version numbers by components. Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 8a3e8856e5606ec616d4420ff8c4f77969432390) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update CLDR to v31.0.1, test Costa Rican currency's fractional partEdward Welbourne2018-08-281-6/+10
| | | | | | | | | | | | | | | CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by 5.10 and later) claimed Costa Ricans don't include fractions in their currency; now it claims they expec two digits. Apparently one of them does expect those two digits, so this adds a regression test (the cherry-pick) and updates CLDR to 31.0.1 (to make the test pass), along with needed fixes (as in 82deb0ad160) to some other tests. Task-number: QTBUG-70093 Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit dc7e775c9c6ecc66f76af8139b8dfc3ee101c7ff) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix potential crash when showing line/paragraph separatorsEskil Abrahamsen Blomfeldt2018-08-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | When showing line and paragraph separators at an offset from the start of the string, the end of string pointer would be incorrectly set, and we would read past the end of the string. If any part of this memory happened to match the line or paragraph separator, then we would overwrite it and have a crash. I couldn't find any reliable way to test this, since the crash depends on the contents of the memory after the string allocated by the algorithm. But with an overflow of 100 000 characters, I found that it crashed every time I ran the test. [ChangeLog][QtGui][Text] Fixed potential crash when using QTextOption::ShowLineAndParagraphSeparators. Task-number: QTBUG-69661 Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Michal Lazo <xlazom00@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit 65a1d41a092e78f7ab142c4c62689e1ca40ba10c)
* QObject: do allow setProperty() to change the type of the propertyThiago Macieira2018-08-211-1/+13
| | | | | | | | | | | | [ChangeLog][QtCore][QObject] Fixed a bug in setProperty() that caused a property change not to take effect if the old value compared equal using QVariant's equality operator, but the values were not strictly equal. Task-number: QTBUG-69744 Change-Id: I00e04a465fcf4fc1a462fffd1547885861a07a64 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 64a560d977a0a511ef541d6116d82e7b5c911a92)
* Make QPalette::setBrush() check before detachingGabriel de Dietrich2018-08-141-0/+31
| | | | | | | | | | | | | Setting the same brush on the same group and role should not detach nor alter the result of QPalette::isCopyOf(). Task-number: QTBUG-56743 Change-Id: Ic2d0dd757d703b01e8c5d835a8c124b3317653f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit c564779c071b35fddb76f4e50afda4305b634651) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QJsonDocument: Make emptyObject an objectJüri Valdmann2018-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QJsonObject has no data payload, it is only a pair of null pointers. So, when it becomes necessary to 'materialize' such an object, a special global emptyObject constant is used as the substitute payload. There is a small problem with this global constant though, namely that it's is_object flag is unset. In other words, the emptyObject is not an object, but an array. Fix by setting the is_object flag on emptyObject. The example code in the bug report QJsonObject parent; QJsonObject child; parent["child"] = child; // 1 child = parent["child"].toObject(); // 2 child["test"] = "test"; // 3 runs into this problem on line 1. Inserting the default-constructed child means inserting a copy of emptyObject. On line 2 a pointer to this copy of emptyObject is retrieved and cast to an object. But it's not an object, it's an array, so things go wrong hereafter. Specifically, on line 3, two inserts are performed, one from operator[] and one from operator=. Each insert increments a compaction counter. The second insert triggers compaction (QJsonObject::insert calls Value::requiredStorage calls Data::compact) and compaction branches based on the is_object flag. Replacing line 3 with child.insert("test", "test"); causes the example to appear to work since compaction is not triggered and the JSON serializer does not look at the is_object flag. Still, any further insert() calls would trigger compaction and memory corruption. Task-number: QTBUG-69626 Change-Id: I8bd5174dce95998bac479c4b4ffea70bca1a4d04 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f43e947dc405b6a2324656f631c804db8e8dec3d)
* QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-162-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case contains the binary JSON equivalent of ["ž"] with the modification that the string's length has been set to INT_MAX. In Value::usedStorage this length is used through the pointer d like so s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2, which is considered a valid storage size. However, when converting this binary JSON into ordinary JSON we will attempt to construct a QString of length INT_MAX. Fixed by using String::isValid instead of Value::usedStorage. This method already takes care to avoid the overflow problem. Additionally, I've tried in this patch to clarify the behavior of Value::isValid a bit by writing it in a style that is hopefully more amenable to structural induction. Finally, the test case added in my previous patch had the wrong file extension and is renamed in this one. Task-number: QTBUG-61969 Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8e47474baf06b3884e9173302395dd25fc09eba9) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QJsonDocument: Validate also zero-length objectsJüri Valdmann2018-05-161-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The added test case is the binary JSON equivalent of {"a":{"š":null}} with two modifications. First, the length of the string "š" has been corrupted to 0xFFFFFF00. Second and more import, the Base::size field of the inner object has been reset to 0. On its own the first modification would normally trigger a validation error. However, due to the second modification the Value::usedStorage for the inner object evaluates to 0, completely disabling all further validation of the object's contents. Attempting to convert this binary JSON into standard JSON will lead to the JSON writer trying to construct a QString of length 0xFFFFFF00. Fixed by validating also objects with usedStorage == 0. Task-number: QTBUG-61969 Change-Id: I5e59383674dec9be89361759572c0d91d4e16e01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 93e0ff037e3e4d72d404c26b8e957092d5f88652) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QJsonDocument: Reject objects containing themselves in binary JSONJüri Valdmann2018-05-161-0/+0
| | | | | | | | | | | | The added test case is a binary JSON file describing an array which contains itself. This file passes validation even though attempting to convert it to plain JSON leads to an infinite loop. Fixed by rejecting it in validation. Task-number: QTBUG-61969 Change-Id: Ib4472e9777d09840c30c384b24294e4744b02045 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 3fc5500b4f2a8431ac013520e9faf606e893b39a) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonDocument::fromRawData: Fix out-of-bounds accessJüri Valdmann2018-05-162-0/+1
| | | | | | | | | | | | | | | This method takes a pointer+size pair, but begins reading through the pointer without first checking the size parameter. Fixed by checking the size parameter. A new test case is added with an empty binary json file. Although the test does not fail under normal conditions, the problem can be detected using valgrind or AddressSanitizer. Task-number: QTBUG-61969 Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d3935cbd71171e1d8f3742cc3235ca0c38313ec8)
* Make sure $$relative_path() uses an absolute path as its first argEdward Welbourne2018-05-041-2/+14
| | | | | | | | | | | | | | | | | Thanks to QTBUG-61373, this qmake function was called with /usr/local/5.10.1 as baseDir, which isn't absolute, leading to an assertion failure. We could raise the error within qmake but it proved easier to simply resolve any non-absolute baseDir using PWD, before trying to use it as an absolute path. Did the same for $$absolute_path(). Documented both. Adjusted the assert that caught this to report any non-absolute path that upsets it. Added simple tests, fixed an existing test. Task-number: QTBUG-66156 Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 58b373c9e3c0a7307e3fbafeb5ad710088b8e685)
* Fix crash if QPixmap::defaultDepth() is called when no QGuiApplicationEirik Aavitsland2018-04-191-0/+2
| | | | | | | | | | | This static method can be called before QGuiApplication is created. At that point there is yet no primary screen, so the implementation needs to guard against dereferencing a nullptr. Task-number: QTBUG-67309 Change-Id: I6b7b9e97b1c3c79bf2f9c6d6247c3b10f39f7a55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 7f782e1fc41ff7694f9bf7434d5a4db0545c0413)
* Merge remote-tracking branch 'origin/5.9.5' into 5.9Qt Forward Merge Bot2018-04-111-21/+0
|\ | | | | | | Change-Id: Iee7af16c3e26dc7d7f594ebd3876370ac83a1bc8
| * Revert "Set sharedPainter correctly for QGraphicsEffect"Laszlo Agocs2018-03-201-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7257862fb2edfab0219d6cd45c83677049404f7d. It has been reported that this patch causes widgets with certain effects become invisible. Task-number: QTBUG-60231 Task-number: QTBUG-66803 Task-number: QTBUG-66387 Change-Id: I9c3c4cf2f17ac639d1aee5489b665aa1e165af16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 00304eac7b1ddd22b971da78aa84c86fe2919359) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | qstringapisymmetry: Fix XML parsing failing on invalid encodingsFriedemann Kleint2018-03-281-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Evaluating testlib's XML output in COIN would fail with: "XML syntax error on line 7520: invalid UTF-8" for the toLatin1() tests due to some Latin1/UTF8 mixup. Add a helper function to convert the data to plain ASCII. Task-number: QTQAINFRA-1797 Change-Id: I1c64878d4c2a67b8c2689905b5ffe6707b5963c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d8b143d4b77c45cfe1a40d525be5d0a79a2b07a4) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Revert "Blacklist tst_QWindow::testInputEvents on Windows"Liang Qi2018-03-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fdddb3a4814f588e3ee87a6c1a0a6791f6ef0298. After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10 (msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The failure is gone. Task-number: QTBUG-66798 Task-number: QTBUG-66216 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 8edc08ef78202f42f373efc6f0814744b01eac9a) Change-Id: I932ccc2cc93954c006fbc863bc4ec53824afa8aa Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Revert "Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 on ↵Liang Qi2018-03-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows ci" This reverts commit a0db55040d21d17b1bba2ab406cb51c0f3a671aa. After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10 (msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The failure is gone. Task-number: QTBUG-66756 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit f7630bcc510861811cc7f2cb6656b4683c3c26c4) Change-Id: I65caac13bfcaa8b6fecdab7671b26d3d385949d1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | testlib: Silence all Qt logging in selftestsTor Arne Vestbø2018-03-142-1/+11
| | | | | | | | | | | | | | | | | | | | Otherwise random debug messages from Qt might mess up the expected vs actual results. Task-number: QTQAINFRA-1631 Change-Id: I855d31274f8261f8b125df23409353f7101be0e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 3ae03c3585df7247f5699eeaa70e1bedf47f6d5b)
* | moc: Don't error our when parsing "using namespace __identifier(...)"Andy Shaw2018-03-141-0/+1
|/ | | | | | | | | | | This follows on from a2322519929bd36a90422dccc0310b8230729197 which covered a similar instance of this. As with that change, we should not abort the compilation, just ignore it. Task-number: QTBUG-63772 Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 0da3ebd9940a214cc7ea292d13cd86967cd89a66)
* QHeaderView: fix inconsistent saved state, ignored during restoreDavid Faure2018-03-091-0/+53
| | | | | | | | | | | | | | | | | | This happens because QTreeView disconnects QHeaderView's _q_layoutChanged slot (!). So the stretching of the last section, done in _q_layoutAboutToBeChanged, invalidated total length, but didn't recalculate it (since that's done in _q_layoutChanged). As a result, length was inconsistent, and saveState would save that, and restoreState() would early-return, not doing anything. Let's just ensure length is always consistent, so we don't depend on the complex issue of whether _q_layoutChanged should be called or not. This an adapted backport of 4a04eea4f4 from 5.11, the unittest shows that c0e45ae851 is missing in this branch though. Change-Id: I4137a19e0a6fdf820dd53fb55e858d1d04a2c113 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 on windows ciLiang Qi2018-03-051-0/+1
| | | | | | | | | Task-number: QTBUG-66756 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a0db55040d21d17b1bba2ab406cb51c0f3a671aa) Change-Id: I4e49d610aad1a6a668035916c3879130d7a2d7df Reviewed-by: Liang Qi <liang.qi@qt.io>
* QHeaderView: Fix crash in layout about to changeThorbjørn Lund Martsum2018-03-021-0/+1
| | | | | | | | | | Before there was a risk looking up e.g index -1 if there were no visible sections in layoutAboutToChange. Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac Task-number: QTBUG-65478 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit e8425f9e52c9df0ce0fbf122adff3ef6930f9961)
* Blacklist tst_QWindow::testInputEvents on WindowsKari Oikarinen2018-03-021-0/+2
| | | | | | | | | | | | Multiple recent failures on Windows 10. Task-number: QTBUG-66798 Task-number: QTBUG-66216 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> (cherry picked from commit fdddb3a4814f588e3ee87a6c1a0a6791f6ef0298) Change-Id: I774d1196eec8e4befbab87d03c43b5378bf4859d Reviewed-by: Liang Qi <liang.qi@qt.io>
* QHeaderView: Preserve settings on layoutChange with empty modelChristian Ehrlicher2018-02-221-0/+71
| | | | | | | | | | | | | | | Do not clear the settings of QHeaderView during layoutChange when the model is empty and the section count did not change. This will not work when a section is moved or a section is replaced with a new one during layoutChange. But since layoutChanged is also called on sorting, this patch ensures that the settings are not cleared in this case. This restores the behavior to the same as before 5.9.4. Task-number: QTBUG-66444 Task-number: QTBUG-65478 Change-Id: I39989cfd45b42e58f49d18ec014d3a941cadb6c9 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> (cherry picked from commit 9395f35cb18725995910531ca8b09f1d84efa96c)
* QHeaderView: properly restore hidden section size on layoutChanged()Christian Ehrlicher2018-02-221-0/+5
| | | | | | | | | | | | During (re)storing the sections within layoutChanged handling, the hidden section size was not properly stored which lead to a section size of 0 when the section was unhided afterwards. Task-number: QTBUG-66413 Task-number: QTBUG-65478 Change-Id: I0b714c7e0530a1eae82b3bb0e0dc80ed576522d0 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> (cherry picked from commit c0e45ae851c96dfebdebfd1e85b7b7eee6540bd1)
* Fix build failure of qftp testsVille Voutilainen2018-02-141-0/+1
| | | | | | | | Without this fix, a fresh clean build of 5.9 will fail. Change-Id: I69e4da382b07cc6e5e280e99478cbc3d44aa3f27 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist the positioning test on all linuxes, it fails on opensuse tooVille Voutilainen2018-02-131-2/+1
| | | | | | Task-Id: QTQAINFRA-1332 Change-Id: I38a36c42f88671430452cdde8098961b67854ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist a flaky messagebox testVille Voutilainen2018-02-131-0/+2
| | | | | | | Task-number: QTBUG-66371 Change-Id: I95fff726167d9fad2e2fb47891ce357d7025d254 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist a flaky scrollbar test on macosVille Voutilainen2018-02-121-0/+3
| | | | | | | Task-number: QTBUG-66321 Change-Id: Ib632ffad993e178305884170fdfe17809ea1e1e6 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Skip tst_QFile::largeUncFileSupportKari Oikarinen2018-02-121-0/+9
| | | | | | | | | | | | If more than one VM tries to run the test at the same time, it times out. These sharing violations were attempted to be worked around in 1c3dc8cfb, but the workaround just leads to timeout, not success. Task-number: QTQAINFRA-1727 Task-number: QTBUG-66216 Change-Id: If8bfd60dbb6575843680971d45b1c82e5beff534 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
* Blacklist a flaky menubar testVille Voutilainen2018-02-091-0/+3
| | | | | | Task-number: QTBUG-66255 Change-Id: Ia7c493496c3fbd551e724853e4f70e3500a1bb74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist tst_QtConcurrentMap::qFutureAssignmentLeakFrederik Gladhorn2018-02-091-0/+3
| | | | | | | | | | | This test was blacklisted in 5.10 on opensuse, but it fails a lot on ubuntu as well. While we are discussing a real fix for this, temporarily get this out of the way. Task-number: QTBUG-63152 Change-Id: I4f1d3b261013052636ee13eda30f94b647a43a38 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix tst_QTcpServer::maxPendingConnections flakinessSami Nurmenniemi2018-02-091-1/+8
| | | | | | Task-number: QTBUG-63152 Change-Id: I5ccd07f31d47048d81e85f69e1327f4f7c760257 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Blacklist flaky casesSami Nurmenniemi2018-02-092-1/+6
| | | | | | | Task-number: QTBUG-66216 Change-Id: Iae973c1224c940752e2c3162d8c64539966ff7ac Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Skip tst_QDBusAbstractAdaptor peer testsSami Nurmenniemi2018-02-091-0/+14
| | | | | | | | | | | The peer Tests for QDBusAbstractAdaptor are so flaky that it's very difficult to get any commits through to qtbase. Task-number: QTBUG-66216 Change-Id: I8da80f71aa832e683f72129cb2d4785425d39c00 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tst_QSharedPointer: Fix termination of external processes on WindowsFriedemann Kleint2018-02-081-2/+13
| | | | | | | | | | | | | Timeouts with subsequent failures to delete the temporary directories have been observed in COIN. Previously, QProcess:terminate() was used to end the processes, which does not have any effect on console processes on Windows. Add a helper function which resorts to kill() on failure to terminate(). Change-Id: I05539d1703280d34b392f2e8ff8565b9a04d703c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CoreText: Make sure to keep reference to data when cloning raw font engineTor Arne Vestbø2018-02-071-0/+39
| | | | | | | | | | | | | QFontEngine::cloneWithSize() is used by QRawFont internally when switching a raw-font from one size to another using setPixelSize. For CoreText, we use a subclass of QCoreTextFontEngine to keep track of the QByteArray data of a raw-font, but failed to overload cloneWithSize, so we would lose the data whenever setPixelSize was called, resulting in missing text rendering in QtWebKit. We now retain the data as we should. Task-number: QTBUG-65923 Change-Id: I7d4186a3c32a61d48d1e9388e43f2792e8e46081 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Clean-up in QDateTime's parsing of ISODate{,WithMs}Edward Welbourne2018-02-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | Actually check that there's a T where ISO 8601 wants it (instead of just skipping over whatever's there), with something after it; move some declarations later; add some comments; and use the QStringRef API more cleanly (so that it's easier to see what's going on). Simplify a loop condition to avoid the need for a post-loop fix-up. This incidentally prevents an assertion failure (which brought the mess to my attention) parsing a short string as an ISO date-time; if there's a T with nothing after it, we won't try to read at index -1 in the following text. (The actual fail seen had a Z where the T should have been, with nothing after it.) Add tests for invalid ISOdate cases that triggered the assertion. Task-number: QTBUG-66076 Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a9c111ed8c30a5a8fec3f02244f0d5a4bd08e931)
* QHeaderView: properly restore section data after layoutChanged()Christian Ehrlicher2018-01-291-4/+9
| | | | | | | | | | | | QHeaderView is doing a complete rebuild of the sections when the layout changed because everything could have happened. But since layoutChanged is also called during e.g. sorting, the old data must be restored when possible. Task-number: QTBUG-65478 Change-Id: I088d4d843cad362b97df6dc5e0dcb9819b13547f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't indefinitely wait for data if it was able to read some dataAndy Shaw2018-01-241-0/+84
| | | | | | | | | | | Passing -1 to waitForReadyRead() may cause it to wait for some time but the data retrieved may be enough for processing. So if 0 is passed from read, indicating that there is potentially more to come, then it will do a waitForReadyRead() then for more data to come. Change-Id: I75f270d1f124ecc12b18512cc20fb11f7a88f02e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-2035-48/+48
| | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* qmake: require a drive in a DOS path for it to be absoluteEdward Welbourne2018-01-183-21/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | For Q_OS_WIN, a path is only truly absolute if it includes a drive letter; merely starting with a slash is not enough. (We can't support UNC paths, so don't even try: qmake runs various commands in the source directory using CMD.exe, which doesn't support UNC as PWD.) This requires, when resolving a path relative to a root, transcribing the root's drive to such not-quite-absolute paths. Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now use IoUtils::resolvePath() rather than delegating to QDir's absolute path method, since that doesn't correctly recognize the need for a drive letter (and qmake did run into problems with some paths, from splitPathList and a failing test, as a result). Moved existing ioUtils tests for handling of relative / absolute paths out into separate functions and expanded significantly. Fixed some existing tests to use an absolute path where one is needed; added two tests involving driveless (but rooted) paths; and fixed the test init to set a value for QT_HOST_DATA/src property (the lack of which lead to an assertion failure with this fix). Task-number: QTBUG-50839 Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-111-24/+0
|\ | | | | | | Change-Id: Ic23e90146470d69060313628562f76a710696bab