summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Build QMenuBar test without warningVolker Hilsheimer2022-03-211-1/+1
| | | | | | | | | Adapt to changes in QWidget::addAction API from 08e4d2db084f6abbf1840ff. Change-Id: If6e05b47de88cf55070238f08b96586b855cc5c1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit f3466fad530d83f02b49cd9a9f59c2510c018dce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix lancebench after lancelot restructuringAllan Sandfeld Jensen2022-03-191-1/+1
| | | | | | | Change-Id: I5e17230761ca5482b3376787afab29d15de58dac Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 173dd2a033ff9caf045cb150d68eca1ce37ac5e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* When clearing selected items, iterate over a copy of the QSetVolker Hilsheimer2022-03-191-0/+69
| | | | | | | | | | | | | | | | | Selection change handlers of the items might call a method that implicitly recreates the selectedItems QSet, which then invalidates the iterators of the ranged for loop, resulting in crashes. Iterate over a copy of the set instead. Add a test case that crashen without the fix. Fixes: QTBUG-101651 Change-Id: I6da6f4043fe1906b0186931a37283f635cb5a404 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5e566ab373bd6161f82b00c5a1f24bd210051140) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDateTime: future-proof swap()Marc Mutz2022-03-171-0/+13
| | | | | | | | | | | | | | | | | | | In Qt 7 32-bit builds, the ShortData will be larger than the d-pointer. So don't swap() the d-pointer, but a) delegate to Data to swap itself and b) swap the ShortData there, adding a static_assert in the .cpp file that triggers when the assumption that ShortData is always at least as large as a pointer is violated. Found while porting away from overly-generic qSwap(), so done that, too. Task-number: QTBUG-97601 Change-Id: I5139da58d99e9491a582ff2cb2f817cd96952044 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9f8da21239a4d9e22a2d5633920c36af4eb4a6c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QTabBar test in tst_baseline_widgetsAxel Spoerl2022-03-171-0/+124
| | | | | | | | Task-number: QTBUG-99772 Change-Id: I501c8e5c8e3ee1a1d3ac2a36b12f51dab90c88c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 878aea36457a1c270586774e68e56acaef14950a) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QByteArray: fix isUpper/isLowerGiuseppe D'Angelo2022-03-171-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 577d698b8e72bc0969ae7545a1a56d3a3d08bdda changed QString::isUpper / isLower behaviors to match Unicode semantics: a string is uppercase if it's identical to its own toLower/toUpper folding. These semantics come from Unicode so they're not up for debate. That commit however left QByteArray untouched. Generally speaking, we want to move away from QByteArray as "text storage" -- this has partially happened between Qt 5 and Qt 6, where QByteArray went from Latin-1 semantics to ASCII semantics. Still, QByteArray offers toUpper/toLower and isUpper/isLower and all this family of functions should be consistent in behavior. Apply the same fix that was applied to QString. [ChangeLog][Important Behavior Changes] The semantics of QByteArray::isLower() and QByteArray::isUpper() have been changed. Now lowercase (resp. uppercase) byte arrays are allowed to contain any character; a byte array is considered lowercase (resp. uppercase) if it's equal to its own toLower() (resp. toUpper()) folding. For instance, the "abc123" byte array is now considered to be lowercase. Previously, the isLower() (resp. isUpper()) functions checked whether the byte array only contained ASCII lowercase (resp. uppercase) characters, and was at least 1 character long. This had the side effect that byte array containing ASCII non-letters (e.g. numbers, symbols, etc.) were not lowercase nor uppercase. [ChangeLog][QtCore][QByteArray] QByteArray::isLower() and QByteArray::isUpper() now work correctly with empty byte arrays. The semantics of these functions have been changed. Fixes: QTBUG-100107 Change-Id: Id56a42f01b2d1af5387bf0e6ccff0f824f757155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2d95b7534530fec1e1e52ef7e8be289abb48b822) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix has_signaling_NaN usage for INTEGRITYTatiana Borisova2022-03-161-2/+5
| | | | | | | | | | | - The newest GHS compiler versions set the value of has_signaling_NaN to False. Add compilation and autotest fix for GHS-compiler 2021/2022 releases. Task-number: QTBUG-99123 Change-Id: I45e5da6759a15c60c17f896e565002cbba8524ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 715420095a97acccb5c56281890784d7e08ea8fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QByteArray: fix append() with a negative lengthThiago Macieira2022-03-161-0/+1
| | | | | | | | | | | | | The documentation says that if it's negative, we find the null termination. This bug was introduced with the clean up to use QByteArrayView in commit 8897aa071a668563a53a4c2e6909572f1762b1e7. Fixes: QTBUG-99640 Change-Id: Ib42b3adc93bf4d43bd55fffd16c89fa4a960f3a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit bb35b2f64dfa18c491aed8b8103941325df3228b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qstring: properly fix the build when LC_MEASUREMENTS is not definedThiago Macieira2022-03-161-1/+1
| | | | | | | | | | | | Instead of proxy-testing for the OS, test for the thing you're going to use. Fixes the build on FreeBSD. Change-Id: Ibf4acec0f166495998f7fffd16d693df09871492 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit c9f6678fb44adba6b5e6675cbb32e5eb470071ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable tests to turn off Windows Vista animationsVolker Hilsheimer2022-03-161-0/+1
| | | | | | | | | | | | | | | | | Animations in that style depend on the current time, which makes it impossible to run baseline tests. Introduce a dynamic property that allows us to set the time that animations use. This way, tests can turn the animation off, or control which time should be used. To keep performance overhead low, check only once whether the dynamic property is set at all. Change-Id: I9bc57b9867fb0d852e101570eca4c7609e7fe1a8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 58a14d943353f02bfbee0a65f5e31c40358c8c53) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Add deployment auto testAlexandru Croitor2022-03-163-0/+126
| | | | | | | | | | | | | | | | | Add a cmake test that builds a simple widgets application, installs it, in a shared Qt build deploys the runtime dependencies and then runs it to confirm that the app works. With a static Qt, the installation of the runtime dependencies is skipped, but the app should still run. The test is expected to pass only when targeting Windows and macOS (both when using shared and static Qt). Task-number: QTBUG-98545 Change-Id: I41b616e1e1fc463d57c64be9273ed4dc755e9187 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 21bffeec9031bc1b5e1cb518508650fe4ad04225) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QToolButton texts and add more stylesheets to test withAxel Spoerl2022-03-163-7/+39
| | | | | | | | | | | | Adapt QToolButton texts to descriptive versions. Add dummy stylesheet that will be used for all test functions, and a specific style sheet to test rendering of QToolButton with a menu button. Task-number: QTBUG-100401 Change-Id: I5440407ddb3ea5b45124e77a6f0d1013362b4398 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 43b25286ced04e95e666a552bbe757e4fbeeba67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qscreen::grabWindow on WindowsFabian Kosmale2022-03-161-0/+2
| | | | | | | | Task-number: QTBUG-100412 Change-Id: I8497cf31d690bc5fc22d808cba95254b7fedcc49 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 8b87c6f1989754aa37aa2a6794954df68d3374d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Blacklist: test cases blacklisted in tst_QXmlStream:"Heikki Halmet2022-03-161-4/+0
| | | | | | | | | | | This reverts commit eaa3faeacdcd771bac19361a4218bb0555e71364. Reason for revert: Unnecessary blacklisting Task-number: QTBUG-101332 Change-Id: Ib7148b0c4f7f0d7c8acd5ed7d561509695f4d64e Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Revert "Blacklist: test cases blacklisted in tst_QLockFile:"Heikki Halmet2022-03-161-13/+0
| | | | | | | | | | | This reverts commit b548911fdfab1943949db6c606435dc7ff5897ec. Reason for revert: Should be fixed already Task-number: QTBUG-101328 Change-Id: I3de986a79099ce7fd2b428af3921cd22e7546b02 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Revert "Blacklist: test cases blacklisted in tst_QWindow:"Heikki Halmet2022-03-161-2/+0
| | | | | | | | | | | This reverts commit c4ff02654db6f0edde34c84b8ac8f849b46c1381. Reason for revert: We should only blacklist these on dev branch first and then trying to fix the issue. Fix should be then cherry-picked to all needed branches Task-number: QTBUG-101567 Change-Id: I2ad288b5e2b20318f2b734bf0211981a5eaaa212 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Repair some of tst_qtableview tests on AndroidAndreas Buhr2022-03-162-3/+2
| | | | | | | | | | | | | | The test task191545_dragSelectRows relied on the fact that the view is not scrolling. But on a small screen, it scrolls automatically. Fixes: QTBUG-87407 Change-Id: I691361c965ab03d8a012f2b83715c7c96d990ec5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 50f6356f8ea949cc18afe309cd72e0ad2811ea95) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qDecodeDataUrl(): treat ";base64" marker as case-insensitiveMarc Mutz2022-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC2397 doesn't explicitly mention it, but references RFC2045, which, in Section 2, states: > All media type values, subtype values, and parameter names as > defined are case-insensitive. and goes on, in 6.1: > mechanism := "7bit" / "8bit" / "binary" / > "quoted-printable" / "base64" / > ietf-token / x-token > > These values are not case sensitive So regardless of whether "base64" is a parameter name, or a mechanism, we need to treat it case-insensitively. Use QLatin1String::endsWith() instead of QByteArray::endsWith(), because the former takes Qt::CaseInsensitive while the latter would need a toLower(). Add a test. As a drive-by, use the same trick for the existing case-insensitive comparison with "charset". As a further drive-by, fix inappropriate uses of QLatin1String (= where they don't prevent allocations). [ChangeLog][QtCore][QUrl] Now recognizes the ";base64" marker in "data:" URLs case-insensitively. Change-Id: Ife6ba771553aaad3b7c119c1fa631f41ffa8f590 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d743fd0d0a0387d4435dd8d35f57023492a6d54b) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Rewrite tst_qdataurl as a data-driven testMarc Mutz2022-03-161-30/+32
| | | | | | | | | | ... to make adding new test cases simpler. Change-Id: I54d08cebc7ae4bea9f0397ba3eec1ef6308a5161 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 52092802b74b2f66818d7efbbd84a2008baf1502)
* Painting: fix overriding and combining different clip typesEirik Aavitsland2022-03-164-6/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | In a recent improvement (6de36918c03e91933fbfb5bf7b53abbe03edf460) the last set clip region or path was stored in separate variables, in order to be set again if the aliasing mode changed. That solution was too simplistic, as it would break down as soon as more than one clip area was set, with the latter either replacing or intersecting the first. It was also unnecessary to introduce new storing of clip areas and transforms, as those are already recorded in the clipInfo stack in the painter state. This patch hence reverts much of that implementation. However the basic idea of setting the clip area again after AA change is good, so that part is kept, implementated instead by calling a pre-existing function to replay the clipInfo stack. One of the baseline test cases is extended to excercise the combination of clip areas. As a driveby, support for setClipRectF is added to the painting baseline test scripts, and the build of the manual lance tool is fixed. Fixes: QTBUG-101474 Change-Id: Ide8b70d8cbf138deb06cbb84f69e62f7405886e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f46db29d8c5185e952f4665d6d141586373d3a0f) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QObject: give some TLC to dumpRecursive()Marc Mutz2022-03-161-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In no particular order: - use the variable field width feature of QString::asprintf() to generate the indentation implicitly, instead of fill()ing a QByteArray with the desired number of spaces - just default-construct 'flags', don't assign an empty string - use qUtf16Printable() to avoid funneling UTF-16 data through 8-bit encodings - use a C++11 ranged for instead of a counted loop - remove a pointless isEmpty() guard (the loop won't execute when the children().isEmpty()) - avoid copying object->children() (returns by cref, so it's also ok to stuff it directly into the ranged for loop). Add a test. Change-Id: Ie7314713cb48de7e890cdee0760c0361dd24fd18 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit e74e27e67eab8b714ddc2f3f7fc2175fd6dcbe5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qfiledialog for AndroidAndreas Buhr2022-03-153-1/+27
| | | | | | | | | | | | tst_qfiledialog was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-101194 Change-Id: Icfda2cd01677f3a076b74429fcf66a1de79d2aa9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit a1b90caad5aa1217be67e784c3b146cf8f57c117) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: expect QPlainTextEdit::canPaste() to fail after clipboard clearAssam Boudjelthia2022-03-151-0/+4
| | | | | | | | | | | | Android 9 introduce an API call to clear the clipboard, before that it wasn't possible to do that, the test QPlainTextEdit::canPaste() should expect that to fail. Task-number: QTBUG-100470 Change-Id: Ie2d8aabf77672c62b3a6c72a080a4e37f1696303 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit a818885a3d62498d03bd6074ece602d1cbb0cd16) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Baseline: Move the paintcommands code into the shared directoryVolker Hilsheimer2022-03-155-5/+5
| | | | | | | | | | | It's used by the lancebench and the lance tool, and it will probably be useful for writing some high-dpi related unit and baseline test cases, so move it to the shared folder. Change-Id: I969bab51c9504be13b4c192b4f29f69cd9102868 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c7539876f69ae0e19d39326d3e8d889fe51f3f57) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Restore C++20-deprecated mixed-enum bitwise operatorsMarc Mutz2022-03-151-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++20 deprecated arithmetic on enum types. For enums used on QFlags<>, these operators have always been user-defined, but when the two enums are of different type, such as QFrame::Shape and QFrame::Shadow, the deprecation warning pops up. We have in the past fixed these in our headers by manual casts, but that doesn't help our users when our API requires them to OR together enums of different type. Until we can rework these APIs to use a variadic QFlags type, we need to fix it in an SC and BC way, which is what this patch sets out to do. The idea is simply to mark pairs of enums that are designed to be ORed together and replace the deprecated built-in bitwise operators with user-defined ones in C++20. To ensure SC and BC, we pass an explicit result type and use that to check, in C++17 builds, that it matches the decltype of the result of the built-in operator. This patch is the first in a series of similar patches. It introduces said markup macro and applies it to all enum pairs that create warnings on (my) Linux GCC 11.3 and Clang 10.0.0 builds. It is expected that more such markups are needed, for other modules, and for symmetry. Even with this patch, there is one mixed-enum warning left, in qxcbwindow.cpp. This appears to be a genuine bug (cf. QTBUG-101306), so this patch doesn't mark the enums involved in it as designed to be used together. This patch also unearthed that QT_TYPESAFE_FLAGS, possibly unsurprisingly so, breaks several mixed bitwise flags-enum operations (QTBUG-101344). Task-number: QTBUG-99948 Change-Id: I86ec11c1e4d31dfa81e2c3aad031b2aa113503eb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 78073f8ab688f1dc2ede939984ec347c0867de18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QString::asprintf: check that passing field widths as arguments worksMarc Mutz2022-03-151-0/+6
| | | | | | | | | Change-Id: Ifb36179b9c26ce15378f10c2947c8cb1e38e10d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0aaada0ddc586d20a494880322f89d50c9d572c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Baseline: don't compensate for DPRs != 1.0Volker Hilsheimer2022-03-151-9/+7
| | | | | | | | | | | | The resulting blurriness is too significant, and it's hard to see where the difference comes from. Better to encode the screen DPR into the appearance ID if it's not 1.0, and warn about the comparison not being done to the baseline images with a 1.0 DPR. Change-Id: Iceab7b0a4cc50627145bd1267cff22344f7d8e5b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b2edef557cf97ae9251be3675f8179a7d2298faa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Baseline testing: make style name explicitVolker Hilsheimer2022-03-151-6/+7
| | | | | | | | | | Mangling it into the checksum makes it hard to navigate the available images. Change-Id: I54dcab5681e747ce1c5fe1b141ef6c4441d1f7eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit ad333b9b87e158f8850fd694142c86edf4afd79b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Baseline: Allow setting git commit through environment variableVolker Hilsheimer2022-03-151-16/+18
| | | | | | | | | Widget tests run in VMs that don't have their own git clone. Change-Id: I20ab32affabfc7ce6dfaa445306b19efb51803e9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 16d154ca5f10e8d44c0959181de5bf80697c7bdb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix losing QOpenGLWidget paints when a child widget is invisibleLaszlo Agocs2022-03-141-0/+25
| | | | | | | | | Change-Id: I136b486d30e31acadd6b1b837dc7e834ee3e23fb Fixes: QTBUG-101620 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 1ea73bc29b7542141bfcfa138cc194404c283bd5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix click position for check box and radio button baseline testsVolker Hilsheimer2022-03-141-7/+24
| | | | | | | | | | Some styles override the clickable area. Change-Id: Id6ec9d9aa2faff39489b2baa412af4339779ff5c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit fd4186cd234f5a93acb132bb694f6374b032741f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qflatmap: fix -Wunused-local-typedef (Clang)Marc Mutz2022-03-141-1/+1
| | | | | | | | | | | | False Positive, of course, since it's used in dependent callee transparent_impl(). Amends 58e8ae5605abefd0f579586a890dc13fb381b2a3. Change-Id: I7520fb7cf6bce28a5fd9381783ba349119309132 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eded55cfbbb5816916fcef2000bc60b64246bd68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* gui: return first default device when seatName isNullLiang Qi2022-03-141-6/+45
| | | | | | | | | | | | | | for QInputDevice::primaryKeyboard() and QPointingDevice::primaryPointingDevice(). This also reverts ae9fefe3c89fd5720ccaad0687f125e32f7c3fe6. Fixes: QTBUG-100790 Change-Id: Id02f277db25f823eb29e939e25801325df8e4076 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9c6b986d967b42bea5faca0d9fa1000c7edb023e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: skip crashing tst_QPlainTextEdit::ensureCursorVisibleOnInitialShowIvan Solovev2022-03-141-0/+3
| | | | | | | | | | | The test crashed for some reason, so other testcases are also not executed. Skip the test for now to enable more tests in the CI Task-number: QTBUG-89402 Change-Id: I5ad38645d1b8f86c64da7208c0ae4f66d126c7d9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 5133ed072a809967087d53fb7bf9c88e925eb551) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QCompleter: fix crash when setting the same model twiceDavid Faure2022-03-131-0/+10
| | | | | | | | | Found when retesting the testcase completer.zip from QTBUG-54642 Change-Id: Id84eefeb3a33dc6d790cfa23755352381cc097a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 7382e5735ea734fe5e5777518394963593603c32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QLocalSocket: Clean up leftover local sockets before listeningTor Arne Vestbø2022-03-121-20/+32
| | | | | | | | | | If a test crashes it might leave local sockets, causing test failures on subsequent runs due to the socket already being "in use". Change-Id: Ie1107c414f4819026907071c7b8281b2e27b8541 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 8ccf1080fcb131940939369271e6828b178b8e9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QLocalSocket: Output error when listening failsTor Arne Vestbø2022-03-121-26/+26
| | | | | | | Change-Id: I742de5f522e4a28794abdee863eea2758536d392 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit d5b3238def66419e1a79c79748251230d4c947cd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QStyle: Fix overflows and crash when converting slider positionsRobert Löhning2022-03-101-0/+105
| | | | | | | | | | Qt Creator crashes when max is INT_MAX and min is -1, see bugreport. Change-Id: I441e76c0ff87052083ed3d77e6085b186402e5d8 Fixes: QTBUG-101581 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4b49c2006f3a0e957d0c5d8c09f32c4ea321885a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QSystemSemaphore:CI Insignificant Platforms Monitor Bot2022-03-101-0/+4
| | | | | | | | | | - initialValue on qnx Task-number: QTBUG-101618 Change-Id: Iea5a45690aa2e1225297c3b652d88864cf5f3ddb Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io> (cherry picked from commit 797a6ca7e6408dff12db033f2e12ae5379602f5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix check for IPV6 support without certain featuresPasi Petäjäjärvi2022-03-102-3/+12
| | | | | | | | | | Without features getifaddrs and ipv6ifname we cannot get correct IPV6 information for interfaces. Change-Id: I7f8c4e68d345160d218fde8db640440f3324014e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit d0d1d7403377363a101d4f1781d06a9b44787d0a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QWindow:CI Insignificant Platforms Monitor Bot2022-03-081-0/+2
| | | | | | | | - spuriousMouseMove on windows-11 Task-number: QTBUG-101567 Change-Id: I4e598ded77f17d695aafe6bd560c4fe9c6bdc0bf Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* tst_qflags: test w/and w/o QT_TYPESAFE_FLAGSMarc Mutz2022-03-082-14/+31
| | | | | | | | | | | | | Also contains some fixes which fix the Windows build, amending e1b8257deeff67025d75b4b3c27b571b418eefee. Fixes: QTBUG-101294 Fixes: QTBUG-101304 Change-Id: I779f50fc705ed32f0314daf28b39b477a7fe925d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b142d2ad73c6fc596c96b459f70525e685e50fc0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qstringapisymmetry: check expected overloads are selectedMarc Mutz2022-03-081-12/+59
| | | | | | | | | | | | Check that the expected overloads are selected in QString/QAnyStringView overload sets. Change-Id: I38148c20a72eb60cf86844a39fe0ed419d2fa562 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 5235b1bdc82a02c273b0c298516dc4e9881c1e96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qtestmouse.h: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-03-081-0/+44
| | | | | | | | | | | | | Also include the comprehensive tests for bool cast compilation which I originally wrote to confirm that the QTEST_ASSERT() change should be™ correct. Task-number: QTBUG-101406 Change-Id: I9a2871bfd4be9999b7a720bec775bba7aeffbe24 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 53890b5d3cd771d66d6b73940eb38e3c3fc6d60f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move cursor out of the way before running testVolker Hilsheimer2022-03-081-1/+5
| | | | | | | | | | Without this change, the test fails when run twice in a row. Also, skip the test if we can't move the cursor. Change-Id: Ic45c073007d114fbd7825cedef6761c1e410b4af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3f5a4242646def56538470f3259b5b4bc36f24f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Un-blacklist test that's always skipped on macOSVolker Hilsheimer2022-03-081-2/+0
| | | | | | | Change-Id: I045e1923b471f6bb1d482f32924f190a94b21d2a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e27e3ad54654d89306a87a4a230a33194d101671) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QTouchEvent:CI Insignificant Platforms Monitor Bot2022-03-071-0/+2
| | | | | | | | | | - multiPointRawEventTranslationOnTouchPad on windows-11 Task-number: QTBUG-101519 Change-Id: Idbba677893f559ee239739d8c78aa820d974e120 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io> (cherry picked from commit d60e29cab71697a3fd07ac980b689bdec897a130) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: XFAIL a few in tst_QStaticText on WaylandLiang Qi2022-03-071-0/+23
| | | | | | | | Task-number: QTBUG-100982 Change-Id: I18cdb79d9261bac40cc619f9d327d0ef7ed722c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 586fd9e0345c2066746805d6725abfd15805f3bc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: XFAIL tst_QOpenGL::bufferMapRange() on WaylandLiang Qi2022-03-071-0/+2
| | | | | | | | Task-number: QTBUG-100918 Change-Id: I1b892a80bcb44e0e4f658ed7073c54900d8a358c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e49d2daf1912f4b94678d077e1edc01fb37a1fb0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: XFAIL tst_QImageReader::setScaledClipRect() SVG/SVGZLiang Qi2022-03-071-0/+2
| | | | | | | | | | on Wayland Task-number: QTBUG-100917 Change-Id: I66c42bb0ceca83fd0531159c606d22c58b18b371 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2b3d11383e0c08d465b4799e470a87b48a2dbbaa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>