summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* tst_qstringapisymmetry: check QString/QAnyStringView overloads ↵Marc Mutz2022-03-071-0/+22
| | | | | | | | | | | | | | | | | | | | | w/Q_WEAK_OVERLOAD flipped This overload set may come in handy to cushion some of the concerns regarding replacing QString functions with QAnyStringView ones. Overloading with a Q_WEAK_OVERLOAD QAnyStringView function requires users to jump through hoops in order to avoid the QString overload, but with the Q_WEAK_OVERLOAD roles reversed, the QAnyStringView overload becomes the preferred version, relegating the QString overload to a fall-back to facilitate sharing where it makes sense (e.g. for QObject::setObjectName()). Change-Id: Ic65ead505beee627976a306e2d430e800540a600 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit 1931689c7df579375b904a71c6f9e0844492cbe2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QWeakPointer: befriend other QWeakPointersThiago Macieira2022-03-051-3/+52
| | | | | | | | | | | Commit c677b3b8afcdc1d7b57353826cc01f378cd25e99 added move constructors, which introduced the issue. Fixes: QTBUG-100795 Change-Id: I74249c52dc02478ba93cfffd16d2c879b923e352 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 49722de99527a97373df517dcb457f3170693a4f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: unblacklist tst_toolsupport::offsetsIvan Solovev2022-03-041-3/+0
| | | | | | | | | | | | | The test is no longer failing on Android in dev and 6.3, but still failing in 6.2. I think it's fixed by 63a35898f4990963fe91acd565df49111a281fa4 which is integrated into dev and 6.3 Task-number: QTBUG-87396 Change-Id: I82e0aac1547f8e43353f0948cd3f91b4b8f9720e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d589f3eefef2be1797ffcc5ee785beeffae0a247) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix an error in tst_QStringApiSymmetry::count_impl()Sona Kurazyan2022-03-041-1/+1
| | | | | | | | | | | | | Don't use the haystack as needle when testing count() for QLatin1String. This wasn't caught earlier, since QLatin1String has no count() yet, and the codepath was never tested. Change-Id: I2764070894ddce047eceaea52456e5a521252dab Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit b8755e2a4d70a5ff30d0fc52ba30475f65b51cbb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix painting clipping glitches with fractional scalingEirik Aavitsland2022-03-032-8/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QPainter, clipping can only be done on whole pixels. The various ways of specifying a clipping rectangle to the QPainter API have been inconsistent in how fractional rectangles (either specified directly, or as a result of fractional scaling) are mapped (rounded) to integer coordinates. Also, the mappings have not made sure to keep the edge-to-edge property of clip rects under scaling. This is particularly important when scaling QRegions with multiple rects, as QRegion is designed on the assumption that an area can be described as a set of edge-to-edge rects. The fix rounds a clip rect identically with a fill rect. (Indeed, a followup plan would be to merge QRasterPaintEngine's toNormalizedFillRect() with the rectangle rounding function in this commit). Notably, a QRectF clip is now interpreted the same as a QPainterPath clip describing the same area. This modifies d9cc1499954829faf9486fb72056e29f1bad58e3 Task-number: QTBUG-100329 Fixes: QTBUG-95957 Task-number: QTBUG-100343 Change-Id: Iaae6464b9b17f8bf3adc69007f6ef8d623bf2c80 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 423b6509382c3bcc36eca78ced0254bfb463d017) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* tst_qflags: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-03-031-3/+10
| | | | | | | | | | | | | | In constExpr(), where code incorrectly assumed conversions to int or uint were implicit, make them explicit. In classEnum(), don't test bitwise operators between QFlags and int/uint when QT_TYPESAFE_FLAGS is in effect. Fixes: QTBUG-101294 Change-Id: If119bf56dd12778f7231a9e76293c76e75354809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit e1b8257deeff67025d75b4b3c27b571b418eefee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlags: fix missing bitwise xor operators in QT_TYPESAFE_FLAGS buildsMarc Mutz2022-03-031-0/+23
| | | | | | | | | | Add tests that cover them. Fixes: QTBUG-101300 Change-Id: I5a8af4a91d796cc4d287b813bd5cc13da3d7e766 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6f50e54138f9a2aa9ab6d84add449f197d545de3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qflags: don't suppress deprecation warningsMarc Mutz2022-03-031-1/+0
| | | | | | | | | | | ... if there aren't any. Change-Id: I8531e0c1c3ca41d1b1a9d55c9d11782bd63b6f76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b2c7f17b940fb7735ff88d9af6e03729a2fdcdd0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qxmlstream for AndroidAndreas Buhr2022-03-023-11/+42
| | | | | | | | | | | | | | | | | | tst_qxmlstream was disabled because it crashed. It does not any more. But it extracted an input zip archive in-place, which is not possible on Android. To resolve this, input files are copied to a temporary directory first. Also, input directories were given to rcc. rcc has a problem with recursive directories. To circumvent this, the file list is created in CMake and then given to rcc. Task-number: QTBUG-87671 Change-Id: I88bb823b9e5c085404e263d4a648d65c9cd6024c Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 5a8052f9c1d8525b62248d7fcc2b292b2bac24f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: Blacklist systemFixedFont for QNXPasi Petäjäjärvi2022-03-021-1/+3
| | | | | | | | | | | QNX tests are run under QEMU so have the same problem as b2qt Task-number: QTBUG-100948 Change-Id: I2abc8a4bca9e8ba414197721301d493296e7ce0b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit f8f8c38ec7290045f930f54a5c96f79a7201c333) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: temporary skip tst_QDialog::dialogInGraphicsViewIvan Solovev2022-03-021-0/+4
| | | | | | | | | | | | This test crashed and prevents other testcases from execution. The test requires a proper fix, but that's not trivial, so skipping to enable more tests in the CI for now. Task-number: QTBUG-101321 Change-Id: I1bd4b1182cc868a36391a718457eae647675fc17 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit e5c23db60c385d1a154a8dc58e98260d8e7d3a67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: skip tst_QDialog::snapToDefaultButtonIvan Solovev2022-03-022-3/+3
| | | | | | | | | | | | This test uses the cursor. However we have no cursor support on Android. Skip the test instead of blacklisting it, because that is the correct behavior. Fixes: QTBUG-87389 Change-Id: I1a2d2dd406b3d7da1bc70b51c2072a83d9a29ca5 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit ef22545184c173ae5b815c63f56e78af5290a3d7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix tst_QFrame::testPaintingIvan Solovev2022-03-022-4/+10
| | | | | | | | | | | | | | | | | | When we create a QPixmap using QWidget::grab(), a default system image format is used for that. On Android this format is ARGB32_Premultiplied, while on the desktop systems it is RGB32. The images that are saved in the resources and used as references, also have the RGB32 format. As a result, on Android we need to convert the pixmap to a proper format before comparing it to the reference. Fixes: QTBUG-69064 Change-Id: I2d881e508d34e0b1a2a1a7bffcbc71ae2907d31d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit e37919b758799e71a8481ae9edf690bc7b01c70a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qmenu for AndroidAndreas Buhr2022-03-023-3/+12
| | | | | | | | | | | | tst_qmenu was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-87424 Change-Id: I1a3a1d2861b5a8f20d83fd8ba38fdcb3c88faee9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 324887779d272364a1dfa32bb0a2a46a71a839e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMetaObjectBuilder: Always set Data::metatypesFabian Kosmale2022-03-021-0/+12
| | | | | | | | | | | | The array of metatypes should always contain at least one entry (for the metatype of the current metaobject itself). This prevents crashes in the case of a metaobject without meta-methods and properties (as observed in Qt for Python). Change-Id: I7a6fb316eea48c4852b6f1c26e0a930aeba4c799 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit ef0e13257ddd57c967000213e3c9812b3c08da91) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QXmlStream:CI Insignificant Platforms Monitor Bot2022-02-281-0/+4
| | | | | | | | | | - initTestCase on qnx Task-number: QTBUG-101332 Change-Id: Ie7c561f4c92ec08c1562becefc928c34bc0eed67 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io> (cherry picked from commit d3a297c0ab96baf831ce43f0271515989a980b5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QLockFile:CI Insignificant Platforms Monitor Bot2022-02-281-0/+13
| | | | | | | | | | | - staleLockFromCrashedProcessReusedPid on qnx - staleLongLockFromBusyProcess on qnx - staleShortLockFromBusyProcess on qnx - lockUnlock on qnx Task-number: QTBUG-101328 Change-Id: Iceca4a1b1ab4d2ce48fadef6aaa17dbbf3ce2bbb Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* Check for null driver() before trying to exec()Edward Welbourne2022-02-281-1/+34
| | | | | | | | | | | | | | | | | | QSqlQuery::exec() took for granted that it can dereference driver(), which should be true for all sane usage; however, it should not crash if used misguidedly. Added regression test, based on bug report's reproducer, which crashes without the fix. Includes the fix to the test, moving it to the end of tst_qsqlquwry. It leaves the system in a state that breaks at least one later test, so put it last. This issue only showed upon picking back from dev, but has since been seen on dev. Fixes: QTBUG-100037 Change-Id: I94600bc60f89e82a1121b418144006a683921a38 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 78eac57f3dc788345f8f3e9b6dbd3dce70b8f511) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QAbstractItemModel: fix persistent index corruption when moving columnsDavid Faure2022-02-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderView creates persistent indexes in _q_sectionsAboutToBeChanged(), called by the slot connected to rowsAboutToBeMoved/columnsAboutToBeMoved. In the case of rows, QAbstractItemModel emits the signal *before* preparing to update persistent indexes in itemsAboutToBeMoved(), so it can see the ones newly created by QHeaderView, all is well. In the case of columns, the emit was done *after* calling itemsAboutToBeMoved(), so the additional persistent indexes created by QHeaderView were ignored, and in endMoveRows() we could end up with: ASSERT failure in QPersistentModelIndex::~QPersistentModelIndex: "persistent model indexes corrupted" This bug has been there since the very beginning of beginMoveColumns(), but was undetected because moving columns in a model is pretty rare (in my case there's a QTransposeProxyModel that turns columns into rows in the underlying model, and a proxy that handles dropMimeData...) Change-Id: I74bad137594019a04c2a19c2abb351ff3065c25a Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 74a4d88e9a002ec30b4bb7bbaf7776b458ae15db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMacStyle: fix tool buttons (in checked mode)Timur Pocheptsov2022-02-281-0/+25
| | | | | | | | | | | | | | | | | | While switching to the 'momentary push in' button type, the old code that shows button as pressed/checked was removed. Since 'square' buttons were sharing this part with rounded push buttons, the change broke checked square buttons. So we retain the old code for this particular case. Also, add a minimal baseline test for this scenario: square button, triggering 'toolbutton' style with/out 'checked' state. Fixes: QTBUG-100802 Change-Id: Ib7b15b13ead834c7bb2cd36de76ccd5bedb07810 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit af05f278ed236e0f699e0af79524cf55054ba49f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGuiApplication: use translation-based layout direction unless explicitly setVolker Hilsheimer2022-02-281-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stored layout direction used to get changed during initialization to what was auto-detected based on the translation. Changing the translation then overwrote that stored value, even if an explicit call to setLayoutDirection was made by the application. Calling QGuiApplication::setLayoutDirection(Auto) has so far been a no-op. Change this logic so that the stored layout direction continues to be LayoutDirectionAuto also if it's set based on auto-detection, and only overwrite it when explicitly called with a non-Auto value. This way, applications can set a layout direction that stays unchanged even when translators are installed. Add test coverage that uses a QTranslator. In practice, this is not a change of behavior, unless applications called setLayoutDirection(Auto) (which is no longer a no-op), or called setLayoutDirection() and then installed a translator and expected the translator's layout direction to come into effect in spite of the explicit setting. [ChangeLog][Gui][QGuiApplication] Calling setLayoutDirection with a non- auto value now disables the auto-detection based on installed translators. Applications that explicitly set a layout direction and also want translators installed afterwards to take effect should reset the layout direction to Auto, which is now no longer a no-op. Fixes: QTBUG-100632 Change-Id: I1fdcebd43a9b1b468ff95bf15f53f441bb214e08 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 4cca8ee527bfa94947f897d4d9b91aa8eb63d9c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_qformlayout::wrapping on AndroidAndreas Buhr2022-02-252-4/+3
| | | | | | | | | | | | | The content of the window was intended to trigger wrapping. On Android, the window is larger, so more content is necessary. This patch adds more content. Fixes: QTBUG-87401 Change-Id: I33a2fe4560c358f2b0b83523ee4ab26bb5dd2513 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c57e2b5d513e8bd9d1b9826d46babd9ef7d5aa57) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix test when accessing patched plugin too fastPasi Petäjäjärvi2022-02-251-0/+5
| | | | | | | | | | | At least one OS (QNX) can't dlopen() a library that is still open for writing elsewhere Fixes: QTBUG-101020 Change-Id: I84ca709a65fc824ec4b3e3f1ea03704bf1cc0414 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 81c6f224c4f05db099d4690f2bc36455e1b943b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_qaccessibility on AndroidIvan Solovev2022-02-252-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android we had 10 failing unit-tests in tst_qaccessibility One of them was failing because on Android QMdiSubWindow is created maximized by default, so we need to explicitly call showNormal() on it before doing all the checks. Other 9 were failing because we didn't get A11Y events when expected. This is a bit more tricky. On Android a11y state is not explicitly set by calling QPlatformAccessibility::setActive(), there is another flag that is controller from the Java side. It is set to 'true' only when some of the a11y services are enabled on the device. The state of this flag is queried during event processing, so a11y state can be reset to false while we do QTest::qWait(). This logic is absolutely correct for real applications, but it is a problem for the test case, because we can't easily enable a11y services in the CI. To overcome the issue in unit-tests, re-enable a11y before each test. A more precise fix will require re-enabling it after every qWait() or processEvents() call, but the current tests pass with such condition. Fixes: QTBUG-87674 Change-Id: I6f765bc6d3aaeaa19aba3a64473ea25e9cbdb0f8 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 3b82c2d16780c4474ebdf7064f406dc266eeba58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qtextdocument for AndroidAndreas Buhr2022-02-241-2/+1
| | | | | | | | | | | | | tst_qtextdocument was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Change-Id: Ie1bd75c21e481c2ecb8607c04ce9370fc6d7b00e Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Pekka Gehör <pekka.gehor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 4ed8e7949a2c43a9062b9e5c061dc8c11f07ac26) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qgraphicsview for AndroidAndreas Buhr2022-02-242-4/+7
| | | | | | | | | | | | | | tst_qgraphicsview was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-87397 Change-Id: Ib604274d098c271e22b010e6cb822fdf9553df1c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit fcb5e5222875cdb438dbc4cc6a00f43e35d93b57) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Core: Fix tests that did break because QProcess security fixPasi Petäjäjärvi2022-02-242-2/+2
| | | | | | | | | Amends 29fceed2ffb41954a63001414bd042611f2d4980 Change-Id: Ief3317a89f7be1dd1dc249297bd16e958b9e1ef2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 30d55abbac72aa3f4ddabb2dcb71da5263c2a4b7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: Add docker support for tst_platformsocketengine testPasi Petäjäjärvi2022-02-242-3/+8
| | | | | | | | | | | Currently test relies solely for external test server. This makes it not possible to run test successfully with environment where docker is used. Change-Id: Ie2974a0e2fec9b16d9d023730b76fa2a32f77e65 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 055fd403c4de9b13eb3edc98b0a9aec9e679666b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Fix support for abstract Unix-domain socketPasi Petäjäjärvi2022-02-241-2/+2
| | | | | | | | | | | | | As QNX claims to support abstract Unix-domain sockets, its getsockname always returns for socket that has not been bound to local name address_len of sun_path as maximum length (106) even when it does not contain valid address. https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/u/unix_proto.html Change-Id: I0f0f5c05611c8db6af35377dde16450f58c83c56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 3a151faec2c15785eb1eb5fee7275cd038b92ba9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qdom for AndroidAndreas Buhr2022-02-231-6/+1
| | | | | | | | | | | tst_qdom was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Change-Id: I41117938fe9d93b510c4a60beb4c2f5b20991434 Reviewed-by: Pekka Gehör <pekka.gehor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1ae662cad0578e9da15ccb124a015696d7ca4b67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qopenglwidget for AndroidAndreas Buhr2022-02-231-2/+1
| | | | | | | | | | | | tst_qopenglwidget was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Change-Id: I7ea55f262f362c098b52e1b1a319b26c31a7e067 Reviewed-by: Pekka Gehör <pekka.gehor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9e7a5bb513fe688bec5cbf3f36fc22164f9d6e88) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Repair some of tst_qtableview tests on AndroidAndreas Buhr2022-02-232-32/+28
| | | | | | | | | | | | | | | | | The view.resize() command has no effect if the requested size is smaller than the screen. So the view has space for the whole model. It then won't scroll, so scrolling cannot be tested. This patch enlarges the model so that scrolling is always necessary and thus possible. Task-number: QTBUG-87407 Change-Id: Ibff512158d9c16be120a69c7328b6d0ae2c3b551 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1ba56134f5391dd06344433f34ac91484961738c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qlogging (tst_qmessagehandler): use one line for output and expectedThiago Macieira2022-02-231-3/+4
| | | | | | | | | | Makes it easier to interpret the output from the test, because of embedded newlines. Change-Id: Ic15405335d804bdea761fffd16d4f141e09537f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5731b83445d890c5316c16cd3a16cd2f5bca2fbd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qlogging (tst_qmessagehandler): use QProcessEnvironmentThiago Macieira2022-02-231-22/+12
| | | | | | | | | | Simplifies the code. And removes the unnecessary quote around the pattern that was there, for some reason. Change-Id: Ic15405335d804bdea761fffd16d4f135edf6993b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 43a171a7d635f02765337e8ecbf848224f69eda4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make Droid Sans Mono available as fixed font for all Android stylesAndreas Buhr2022-02-221-3/+0
| | | | | | | | Fixes: QTBUG-87405 Change-Id: I54ebc06c82c32acd0383ea5fedf78acce4e11977 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d4561029621a5891f05281560178063104b8f4a2)
* Stabilize tst_QTabBar::hoverTab()Friedemann Kleint2022-02-221-10/+20
| | | | | | | | | | | | Port the test to use the QWindow* based overloads of QTest::mouseMove() and move the cursor away. Task-number: QTBUG-98489 Change-Id: Id1ac0ef176c6f9bf179f989ddd5775877525fc0d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9ddc02024644e0c6801f71b0f9844918de288a7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_QTimeLine on AndroidAndreas Buhr2022-02-211-4/+1
| | | | | | | | Fixes: QTBUG-88137 Change-Id: I2b66eefd7733198664eaeecf9507daabb3a04e81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9e082faf30ba42a010c2f602f8834f1a72d342d7)