summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove QEXPECT_FAIL for tests that pass now on AndroidVolker Hilsheimer2021-03-312-9/+0
| | | | | | | | | | | Fixes: QTBUG-69214 Fixes: QTBUG-69218 Fixes: QTBUG-69220 Change-Id: I8b780db8d9dad1a877bc16e802e6ae92de0c8f23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 15b0809f069ef29320d13936a1aed7ed422a8b43) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QEXPECT_FAIL from passing testVolker Hilsheimer2021-03-311-1/+0
| | | | | | | | | | | | The test is blacklisted in dev and 6.1, let it fail properly. We can watch the history of the test and remove the blacklisting if/when it passes consistently on supported macOS versions. Task-number: QTBUG-20984 Change-Id: I3211ecf565995578c83a092c637890c0e8bfd766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 83d4ca3f66aa269ff47ff77e718fcbea594f2179) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* lance tool: fix build for Qt 6Eirik Aavitsland2021-03-303-8/+8
| | | | | | | Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 14ccc11194caf0e965c3a61b4f6bec01d5f73eb8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Prospective fix for flaky test tst_QDoubleSpinBox::setReadOnly()Friedemann Kleint2021-03-301-34/+22
| | | | | | | | | | | | | | | | The test has been observed to fail with: FAIL! : tst_QDoubleSpinBox::setReadOnly() 'QTest::qWaitForWindowActive(&spin)' returned FALSE. () /Users/qt/work/qt/qtbase/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp(863) : failure location Remove the widget member and use a widget instantiated on the stack instead. Add a check for top level widget leaks in cleanup() and fix leaking task224497_fltMax() by instantiating the widget on the stack. Change-Id: Idbbb5d859c0df2d9b9f49fb9f69ef6bb7d1ee150 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4b15a8ea8fe0d64b529b859a3dba0de68b92ce85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix removing columns when QSortFilterProxyModel has not been sorted yetJoni Poikelin2021-03-301-0/+14
| | | | | | | | Fixes: QTBUG-91788 Change-Id: Iddcafd3171f0f3703b94893a32b4ccaaeea9e713 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit e287582cba74ddcfc67f83647e72c0b23bd99c36) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qguimetatype: Avoid deprecated methodsFabian Kosmale2021-03-301-14/+21
| | | | | | | | | | | | This makes the 5.15 and 6.x branches more comparable, as in 6.0 the preferred way is to use the non-static methods (which avoids an expensive lookup in 6.x). As a drive-by, Avoid memory leaks if the test fails. Change-Id: I95b133342a4ea19dd23c235a408f38089706412b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit a7f24218e3795aa54effc2665e0a505c02b10382) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qdtlscookie: use a proper 'enterLoopMSecs' instead of 'enterLoop'Timur Pocheptsov2021-03-301-1/+1
| | | | | | | | | | It's a bit weird to calculate timeout in milliseconds and then pass it as number of seconds ... Change-Id: I1127163ea06e49ac1b53eea6f60ee8590319bfa1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b262007929e84089dcfecd45948a2005aca79fb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractItemModelTester: fix false positive when model has zero columnsDavid Faure2021-03-301-0/+10
| | | | | | | | | | | Regression introduced by me in commit 72e0d699cec09458ca9325035d477d4899e8e47b Fixes: QTBUG-92220 Change-Id: Ic7dd4eda0a1993f9763933882baf928bfc83b08b Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit b4aac2af19690917553f93660e3ad760fc15d0b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist test QMenu::QTBUG_89082_actionTipsHide() for WindowsFriedemann Kleint2021-03-301-0/+1
| | | | | | | | | | | | Apparently, ba139603925453bf79994eca48b566d8f15b2af0 is not sufficient. Amends 3f3d5e6716d9130776b3613ccbd5595de7d4af8d. Task-number: QTBUG-89082 Change-Id: I80a00abb330bebd3be8667762c279c2eef595c7f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit b62725608bbc1a8924209bd733aefe9f0465c3a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_macgui::scrollBarPainting()Tor Arne Vestbø2021-03-301-0/+3
| | | | | | | | | | | It fails on 10.15 and 11, preventing those from being significant, and the test is already marked as expect-fail based on QTBUG-20984. Task-number: QTBUG-20984 Change-Id: I6911166a1c3e9173d6d36f2a3a68b37778fd3406 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit eab286b760bc33e2f90d1f9e94b34d89266d3d74) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QJniEnvironment exceptionCheckAndClear to checkAndClearExceptionsAssam Boudjelthia2021-03-301-3/+3
| | | | | | | | | | Address feedback from header view. Task-number: QTBUG-90211 Change-Id: Iad2b609598b16f66fd6ab09484fe6e6899981263 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b9f27335e7462a15ac642841bb6d86ebebb349f9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace QTextDocumentResourceProvider with a std::functionVolker Hilsheimer2021-03-302-35/+41
| | | | | | | | | | | | | | | | | | | | | | | 376e3bd8ecf40881685714f6f19e12d68e92127e added the new class for Qt 6.1, but during header review we concluded that using a class introduces complexity wrt instance ownership and API design that can be avoided by using a std::function instead. The functionality is tied to QTextDocument, so the type definition and the default provider API is added there. Since std::function is not trivially copyable, the atomicity of the previous implementation is not maintained, and concurrent modifications of and access to the global default provider from multiple threads is not allowed. The relevant use case can be supported by implementing a resource provider that is thread safe. Task-number: QTBUG-90211 Fixes: QTBUG-92208 Change-Id: I39215c5e51c7bd27f1dd29e1d9d908aecf754fb7 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit ccf1a1a9536be7b904494f5b3243202d71a33b06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename QUrlResourceProvider to QTextDocumentResourceProviderVolker Hilsheimer2021-03-292-4/+4
| | | | | | | | | | | | | | | | | | While the class name is now a bit more than a mouthful, it's purpose is very narrowly tied to QTextDocument, so don't use a very generic name for it. That resources are provided based on a URL is to some degree an implementation detail, and URLs are resource locators so we don't need that in the class name. Address code review comment for 6.1. Add documentation and links to existing APIs with a similar purpose. Task-number: QTBUG-90211 Task-number: QTBUG-92208 Change-Id: I4f09057cc2f53a5595513c1c9422e6ccaad6ca13 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit c8f6f8a2220ce8fd628c969f19dfae6f38d7311c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip a tst_QRhi test case with the Android emulatorLaszlo Agocs2021-03-291-0/+3
| | | | | | | | Task-number: QTBUG-92211 Change-Id: I63ff17b226d502189bc769b0b28640b849b8d39a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9e662a0baf46253fcb88027688587c06b7112620) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qobject: fix the detection for GCCGiuseppe D'Angelo2021-03-261-4/+14
| | | | | | | | | | | | | | Q_CC_GNU is defined on compilers that masquerade as GCC (Clang, ICC), so using it to work around GCC-specific bugs is wrong. Introduce a local define for _only_ GCC and use it in place of Q_CC_GNU. Drive by: version-fence a test we now know it's been fixed upstream, and correct the link to the corresponding bug report. Change-Id: I9059d6e6bf86157aca71590ac22afb1a1c114313 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 8b9c8d417b8ff2d4f60d83f9cc69c148632d1046) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-03-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | fillRule() contained a major blunder: instead of checking if the d-pointer was allocated, and return a default value if it wasn't, it checked whether the path contained any points. This means that QPainterPath p; p.setFillRule(x); Q_ASSERT(p.fillRule() == x); was failing. As a drive-by to test this change, fix another mistake in clear(): clear is documented to clear the elements in a path, but instead it also changed the fill rule. This commit partially reverses 697910e5fbd382e78bc1bcbac3f5824aded059b4. Change-Id: Ieb8145694b672439c3380d9ccb87d1206a2dd115 Done-with: Milian Wolff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0b4ccbf81ee2009051169f2f0918442b56512b20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rework the failure macros in the Qt CTest kitAlexey Edelev2021-03-241-4/+4
| | | | | | | | | | | | The _qt_internal_test_expect_fail macro fails when the test fails during the configuration step. Rename this macro to _qt_internal_test_expect_build_fail and add the _qt_internal_test_expect_fail macro that expects inverted test result. Change-Id: I4635e99152f7a32f5c48202e84fec59800453d34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit fec5b8e81c976b8b0cdf45b459f7d481222e86d7)
* Make it even more obvious on what to do when tst_toolsupport failshjk2021-03-231-0/+7
| | | | | | | | | Triggered by 6778b247. Change-Id: Ic8e7136cd82eb8d3891450cfa8994f43b7cc09fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8403fc7796aca7b6f45a88ecaef6485f731dc431) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix invalid pointer return with QGridLayout::itemAt(-1)Zhang Yu2021-03-231-0/+51
| | | | | | | | | | | QGridLayout::takeAt() and QLayoutItem *itemAt() only check the upper bound. If the index < 0, these function will return invalid pointer. Fixes: QTBUG-91261 Change-Id: Idfb9fb6228b9707f817353b04974da16205a835c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit c47bb4478a4c3a29c0505d7d89755f40601b326f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix alpha handling of QImage::setPixelAllan Sandfeld Jensen2021-03-221-11/+61
| | | | | | | | | | | It was treated differently depending on format, made it consistently behave the same for all formats (following the behavior of the primary formats). Change-Id: Ie24e19957d076fdf3ebd333074e26ede187489eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c32cd44d34910cfd42e32537578e4a573138a282) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_bench_qmetaobject: Fix testFabian Kosmale2021-03-211-3/+4
| | | | | | | | | | | The code has apparently been broken for quite a while, probably since the change that made the QObject constructor invokable. Fixes: QTBUG-91710 Change-Id: I8b7e6c8a579913b3d0e2a364ffdbffe8d404c72b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit ed3df88846d3d92baf7110063cc7b82b7c45d1ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make it possible to clone a QRhiRenderPassDescriptorLaszlo Agocs2021-03-191-1/+44
| | | | | | | | | Task-number: QTBUG-91888 Change-Id: Ib6d2e639e6c24f3e9a733c6563dc8a6d6da47719 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 19384f2e8f50bad0a0775f7b2e10aff3372bcbb5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port away from deprecated QVariant::typeVolker Hilsheimer2021-03-171-3/+3
| | | | | | | | | Use QMetaType instead to silence compiler warnings. Change-Id: Ic28b3406ddcd51935f42779e7708ea8a459d3a9e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5c396be4e3995f8eed2cb54341f3099c35458fa9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qnetworkreply's benchmarkTimur Pocheptsov2021-03-171-3/+0
| | | | | | | Remove the include of qsslsocket_openssl_p.h, it does not exist anymore. Change-Id: I5fc0a06fb381204855634b42f43deb02662746b7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Convert QSslSocket(Backend)Private into pluginTimur Pocheptsov2021-03-162-59/+0
| | | | | | | | | | | | | | All backend-specific code is now separated and removed from QSslSocket(Private) code. The original code is mostly preserved to avoid (as much as possible) regressions (and to simplify code-review). Pick-to: dev Fixes: QTBUG-91173 Task-number: QTBUG-65922 Change-Id: I3ac4ba35d952162c8d6dc62d747cbd62dca0ef78 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QMetaType benchmarkFabian Kosmale2021-03-151-3/+5
| | | | | | | | | | The benchmark used to crash because QMetaType::typeName would return an empty string, which is not a legal value for newRow. Change-Id: I9e6c6c1cf153943bfa21181cd2cca596a7943ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 1316af2f3ed7861d0955793261a18f8ebf237f6f) Fixes: QTBUG-91711
* Fix QMultiHash::count(key) crashAndrei Golubev2021-03-141-0/+15
| | | | | | | | | | | | As QMultiHash uses a pointer for the data, nullptr dereference is a thing, so check for valid d before doing anything in count() Fixes: QTBUG-91704 Change-Id: Ia20440cd7bdc03cb09c77f796fb9c5b52765eac5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f226854d256a382a5cc7ff08b10a0d27fbefb0fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "QPushButton: fix support of style sheet rule for text alignment"Volker Hilsheimer2021-03-111-0/+18
| | | | | | | | | | | | | | | | | This reverts commit 6269438af95bbd988ead08829fa3bc9dc25891e8, and adds a test. This change introduced QTBUG-91735, without fixing QTBUG-86857 correctly. The code already interprets the textAlignment values from the rule, also if no icon is set. Adding the same, or some default textAlignment to the text flags if there is no icon doesn't work. Fixes: QTBUG-91735 Task-number: QTBUG-86857 Change-Id: Iee07e63a40e72909275f32e1caa28b33a595f879 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 674747bac1c8b57d4940de2ee68b6b562dfcad61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QEventDispatcher(Win): Always honor interrupted status to avoid racesMårten Nordheim2021-03-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | There may be a race where e.g. thread 'B' is woken up by a queued invoke. At the same time thread 'A' asks 'B' to quit, which will set various atomics (some important ones are 'interrupt' in the dispatcher and 'exit' in the event loop), but it does _not_ try to send another wake since there is already an unhandled wake triggered by 'B' itself. Sadly 'B' reads the 'exit' atomic before 'A' updates it. Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to it, meaning 'A's interrupt is ignored. Then, since there is no interrupt, 'B' goes back to waiting for events, leaving the thread alive and running instead of quitting. Maybe this has unforeseen consequences (one consequence is that it will return and re-enter the event dispatcher once more, possible unnecessarily) Fixes: QTBUG-91539 Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f274f91cebb0a4fd2ebe37bb3a605c47d6acd404) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qguivariant benchmark: Only use valid QMetaTypesFabian Kosmale2021-03-101-2/+5
| | | | | | | | | | Otherewise, we hit an assertion because the name is empty. Fixes: QTBUG-91709 Change-Id: I03a530d64ea8dead3efc5fcb8c00909388a387d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 3e46c22d943233554be8897ddda191cdfdb5e44e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_bench_qguimetatype: only consider valid metatypesFabian Kosmale2021-03-101-2/+5
| | | | | | | | | | | Otherwise the benchmark crashes as the data tag for the row would be empty. Fixes: QTBUG-91708 Change-Id: I484ded5b8670571b80012e64d67846d3b8db5320 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 90dc1f9204b8f44302b57392ba2fbfdc3653bdf2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: gl: Fix missing uniform data with certain command listsLaszlo Agocs2021-03-101-49/+170
| | | | | | | | | | | | | | | Following patterns from the other backends is insufficient with OpenGL because we do not use real uniform buffers. There is currently a possibility that a shader program will be bound without following it with setting uniforms. Correct this by having a second level of tracking of the associated srb object in the pipelines. Fixes: QTBUG-91630 Change-Id: I74a012daade826dd22c436bde06381c1233bad11 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 80029e0ca65d4bf4575f7a08d186c781ec6c2f0e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QConcatenateTablesProxyModel: skip dataChanged in hidden columnsDavid Faure2021-03-091-0/+11
| | | | | | | | | | | | | | | | | When the source models don't have the same number of columns, the proxy keeps only the smallest number of columns across all source models. Afterwards, if a source model emits dataChanged in a column past that number (a "hidden" column), the proxy needs to ignore it rather than assert. But also, if the source model emits a dataChanged signal across both visible and hidden columns, then the last column number needs to be adjusted so that the signal is correctly processed and forwarded. Task-number: QTBUG-91253 Change-Id: I939e8ec0faf41370472f86785851292e4372f72c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit f6efbd23b59bcf75866ce47fb762c99f2e4a128a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the crashes when animated QTreeWidgetItems are hiddenQiang Li2021-03-081-0/+24
| | | | | | | | | | | | | | | | | | | QTreeView's drawTree implementation performs lazy layouting when calling itemDecorationAt. If animations are enabled, this can change the list of items, and invalidate the copy made earlier. Don't copy the list of items, use a reference instead so that code iterating over the items later operates on valid data. Add an assert in the private itemHeight method, it must not be called with an index that is out of bounds. Fixes: QTBUG-42469 Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f140ef04a0c54c2c8a699db33433b8d7235d137c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* High-DPI: Set the minimum scale factor to 1Morten Johan Sørvig2021-03-081-0/+15
| | | | | | | | | | | | | | | | Avoid painting errors with dpr < 1, also for the PassThrough mode. This limits the minimum high-dpi scale factor to 1, for the code path which determines the scale factor based on screen DPI. Task-number: QTBUG-89948 Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ee409e6f0cab4aa051f75f7c7116d4b607d137fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip globalstatic threadStressTest on QEMUToni Saario2021-03-072-0/+6
| | | | | | | | | | | | | The test causes frequent failures in the CI. This is the most subtle fix until it is properly fixed. Task-number: QTBUG-91423 Change-Id: I6499378dcd3ed1c31275db38d83b572e764366cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> (cherry picked from commit 49e93b6e3928e12507ec7956d66e79a2555c13a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make qdecompresshelper archive bomb check only trigger for large filesØystein Heskestad2021-03-072-0/+40
| | | | | | | | | | | | | This is to avoid false positives. By default files are large if uncompressed size > 10 MB. Only configurable internally. Also add auto tests. Task-number: QTBUG-91392 Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit be73ca7eb1cebcc15064666e647bc337b5c2baa2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix a BIC introduced by extending the namespace QSsl in _p.h filesTimur Pocheptsov2021-03-051-24/+26
| | | | | | | | | Renamed the private part of the namespace to QTlsPrivate. Pick-to: dev Fixes: QTBUG-91531 Change-Id: Id2d9c458d8d958b35e437eee42889177dad0a7a7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QMenu test: turn tooltip animations offVolker Hilsheimer2021-03-051-0/+2
| | | | | | | | | | | QTBUG_89082_actionTipsHide() is very flaky if tooltips fade in, as the mouse move might happen while the tooltip is still appearing. Fixes: QTBUG-91532 Change-Id: I55305927fcf143d99dfff28d0bc70b2e831a139a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit d76d8571e2cc9172d2800e4b53f4b6941842dc6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Stabilize test QMenu::QTBUG_89082_actionTipsHide() on Windows, take 2Friedemann Kleint2021-03-041-3/+5
| | | | | | | | | | | | | | Use the QWindow-based overloads of QTest::mouseMove(), which do not move the cursor position. Amends ba139603925453bf79994eca48b566d8f15b2af0, 3f3d5e6716d9130776b3613ccbd5595de7d4af8d. Task-number: QTBUG-89082 Change-Id: I2cc62e4d1f24e4baebafd0d76fbf0fbdb6f588c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 65c6fbea242e150d785ea0a7062188fdc090af32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QFuture::continuationsWithContext: fix the flakinessSona Kurazyan2021-02-261-3/+14
| | | | | | | | | | | | | | | | | | When attaching a continuation with the default (QtFuture::Launch::Sync) policy, it will be launched in the same thread where the parent has been executing, or in the thread where the parent lives, if the continuation is attached after the parent has already finished. Fixed the test-case to make sure the continuations are attached while the parent is still running, so that they can be resolved in the parent's context. Fixes: QTBUG-91373 Change-Id: I82b3b0c47b76d121b44bd512659c08b3b474e351 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 5a3bbb55851b84aa6a46c23e5a6fb33b4860edc6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* And fix handling and test of QImage::fill(uint) as wellAllan Sandfeld Jensen2021-02-261-2/+8
| | | | | | | | | | Only RGB444 and RGB666 were treated slighlty different from the rest, but the test had a few additional mistakes. Change-Id: I4728b4036affedfffce8bca5c1e7be3869344fbe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c2bec047e281d949015ecd27daf2ba2d51b21526) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProcess::startDetached/Unix: report which function failedThiago Macieira2021-02-241-0/+4
| | | | | | | | Like QProcess::start(). Change-Id: Ic90d8429a0eb4837971dfffd1664ef1293a6523d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 5d977b0fd2fa4611571e50378647c09febd49141)
* Move build tools to libexec instead of the bin dirJoerg Bornemann2021-02-235-5/+6
| | | | | | | | | | | | | | | [ChangeLog][Build System] Tools that are called by the build system and are unlikely to be called by the user are now installed to the libexec directory. This is a step towards easier co-installability of different Qt versions. Task-number: QTBUG-88791 Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 1f30bcf33618ca39c47dc1058529b55635e30aef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProcess::startDetached: set the error condition on failure to startThiago Macieira2021-02-221-0/+2
| | | | | | | | | | | | | And set *pid to -1. [ChangeLog][QtCore][QProcess] If a startDetached() fails to start the target application, the QProcess object should now have a proper error string in errorString(). Change-Id: Ic90d8429a0eb4837971dfffd1664e825ffcb923e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 73a04edce151b21ea5d07494603c0317716e99d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QProcess::startDetached/Unix: move up the chdir() and remove qWarningThiago Macieira2021-02-201-0/+15
| | | | | | | | | | | That qWarning cannot be in the child process (we don't know if a user logger is fork-no-exec-safe) and the failure to chdir() should be reported as a failure in QProcess::startDetached() instead. Change-Id: Ic90d8429a0eb4837971dfffd1664e7577c81610b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com> (cherry picked from commit 31bb141aed52549fae52f2156ac66bd2647cad16)
* QJsonObject: Fix operator<=()Ulf Hermann2021-02-181-0/+31
| | | | | | | | | | | We had a copy-paste error there. Change-Id: Ib1448197ac4f4641c6559f133f41dcf326f210f1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a2e23bca0f2b43a26e2e489f83cfe2e521da63b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port QSslKey to the new plugin-based implementationTimur Pocheptsov2021-02-181-24/+24
| | | | | | | | | | | | The idea is to have QSslKey(Private) backend-neutral and hide all library-specific code inside plugins. Pick-to: dev Fixes: QTBUG-90953 Task-number: QTBUG-65922 Change-Id: I2eeee3b2b72c78c2e24f2fb914abce3caa913be8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rework tst_QDateTime::toString_isoDate() to eliminate an XFAILEdward Welbourne2021-02-161-16/+17
| | | | | | | | | | | | | | | | Instead of an XFAIL, actually test what we expect will happen for the test, namely that the milliseconds will be lost. In the process, verify that milliseconds since epoch also matches what was expected, change an "expecting empty" condition to check for the "invalid" test-case to which it's actually relevant and note that this test-case shall need amended when we update our ISODate support to the 2019 update, which extends the year range. Task-number: QTBUG-56552 Change-Id: I680aa31ee0dcc8fadabb5d4cd6c083a8afd48573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit cc93dadf772480df3b27fd031a471047a5db0038) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Do not make QTimer::interval bindableFabian Kosmale2021-02-161-21/+0
| | | | | | | | | | Issues were found and fixed only in 6.2. Let's play it safe and do not make interval bindable in 6.1. Change-Id: I4465d3991d0c303037de7421d5a670f009ac2bf9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>