summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
Commit message (Collapse)AuthorAgeFilesLines
* QIODevice: use QVLA to hold the ring buffers, not QListMarc Mutz2021-12-151-2/+2
| | | | | | | | | | | | | | | The only users of more than one read- or write channel are the SCTP code and QProcess. SCTP being pretty rare, optimize for the common case of at most two QRingBuffers for reading (QProcess) and one for writing. Even with more channels, QVLA shouldn't be slower than QList - on the contrary. Need to adjust tst_toolsupport and TypeInformationVersion, as QFilePrivate::fileName has changed. Pick-to: 6.3 Change-Id: I3baf982ba1f4dc51463be8730e414f6164072d8b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QPA: Set focus reason when window activation changes focusVolker Hilsheimer2021-12-031-0/+36
| | | | | | | | | | | | | | | QApplication hides the fact that the reason is never set by several QPA plugins, but Quick items don't receive the correct reason on Windows, Android, the offscreen plugin, and other platforms. Add relevant scenario to the QFocusEvent test case, and fix the plugins to always set the focus reason when handling window activation changes. Exclude the minimal plugin from the test, it seems largely unmaintained anyway. Task-number: QTBUG-75862 Change-Id: I5404a225b387fc9a3851b6968d0777c687127ed1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Stabilize tst_QAccessibilityMacVolker Hilsheimer2021-11-261-12/+9
| | | | | | | | | | Introduce a TRY_EXPECT macro that uses qWaitFor, and use it whenever EXPECT was used after a call to processEvents. Fixes: QTBUG-94036 Pick-to: 6.2 5.15 Change-Id: Ia935444d529c2798637bf9b4a56e47a8dc9d75d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename and restructure the baseline (lancelot) testing codeEirik Aavitsland2021-11-16112-12027/+0
| | | | | | | | | | | | | | | | | | | | In preparation for addition of new baseline tests, establish a new test category, "baseline". This is similar to the category "benchmarks" in that it contains tests that use the QTest framework, but conceptually are not unit tests, in contrast to those under auto/. Move the existing QPainter baseline test, tst_lancelot, into this new category, and rename it accordingly. Baseline tests use the QBaselineTest extension to QTest. Move that extension too into the tests/baseline directory, allowing the clean out of the baselineserver directory. Pick-to: 6.2 Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update clipping area when antialiasing changesChen Bin2021-10-271-0/+76
| | | | | | | | | | | | | | | | | | | Antialiasing is disabled when the painter's antialiasing attribute is set behind the clipping function(example `setClipPath` or `setClipRegion`). The cause of this problem is that the antialiasing state of the clipping region is not updated after the antialiasing attribute is set. A variable is required to record the painter's transformation state set before the clipping function, because the transformation will be applied to the clipping region, resulting in the abnormal clipping region. The value of `s->matrix` is not accurate for the clipping fun- ction. Pick-to: 6.2 Fixes: QTBUG-97269 Change-Id: I409a9db32efc3b991ebb97ec9aed19bbddb273d8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix autotest public API compilation for INTEGRITYTatiana Borisova2021-10-151-0/+4
| | | | | | | | | | - getgid/getpwuid are not supported - process should be used with config check Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: Ib6854772bcf52f3533cb722f963426717926258b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add lancelot test for smallcaps text pathAlbert Astals Cid2021-10-043-2/+26
| | | | | Change-Id: I62b824e852fe6c05afabbd7ab80efaad5a298f82 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add testing of QPdfWriter output to QPainter lancelot testEirik Aavitsland2021-09-282-1/+103
| | | | | | | | | | Utilizes the native pdf renderer of macOS, so the test is only enabled on that platform. As the PDF generation should be platform independent anyway, this should not matter. Pick-to: 6.2 5.15 Change-Id: I8b6b70562d1f24fdb77795aa7eb5843279aaae85 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Compile autotests for IntegrityTatiana Borisova2021-09-201-1/+1
| | | | | | | | | - process environment/DNS are OFF for INTEGRITY Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: I189a97f88c96a428586c31a66b8d250e04482900 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove conditioning on Android embeddedEdward Welbourne2021-09-171-1/+2
| | | | | | | | It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Improve lancelot test of dashed line paintingEirik Aavitsland2021-08-203-4/+70
| | | | | | | | | | | Add painting of sets of lines, both connected and unconnected, that go outside the device area. This prepares for fixes & improvements in the painting code. Pick-to: 6.2 6.1 5.15 Change-Id: I9cffc760524e9ade42362c9a04949270ac24180f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tests: Remove unused SRCDIR definesIevgenii Meshcheriakov2021-08-171-2/+0
| | | | | | | | | | | Remove SRCDIR defines from tests that don't use them. There is a standard define called QT_TESTCASE_SOURCEDIR that is available to all tests and serves the same purpose. Pick-to: 6.2 Change-Id: I2aa237739c011495e31641cca525dc0eeef3c870 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix some compiler warnings from deprecated QFont constructorVolker Hilsheimer2021-08-111-1/+1
| | | | | | | | QFont should be constructed with a list of font families. Pick-to: 6.2 Change-Id: I61141b25d3f6e25f4fea141acbfa8e164d7af58f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* testlib: Deprecate QWARN() in favor of qWarning()Tor Arne Vestbø2021-08-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The QtTest best practices documentations recommends using output mechanisms such as qDebug() and qWarning() for diagnostic messages, and this is also what most of our own tests do. The QWARN() macro and corresponding internal QTest::qWarn() function was added when QtTest was first implemented, but was likely meant as an internal implementation detail, like its cousin QTestLog::info(), which does not have any corresponding macro. This theory is backed by our own QtTest self-test (tst_silent) describing the output from QWARN() as "an internal testlib warning". The only difference between QWARN() and qWarning(), besides the much richer feature set of the latter, is that qWarning() will not pass on file and line number information in release mode, but QWARN() will. This is an acceptable loss of functionality, considering that the user can override this behavior by defining QT_MESSAGELOGCONTEXT. [ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning() Pick-to: 6.2 Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in concurrent disconnectLars Knoll2021-06-171-0/+49
| | | | | | | | | | | | | | This does not fix all data races that we have in the system yet. One major issue is the virtual disconnectNotify(), that can be called from any thread and thus is inherently problematic, as it can collide with the object getting destroyed at the same time in another thread. Pick-to: 6.2 6.1 5.15 Task-number: QTBUG-88248 Change-Id: I9d841eb363b7e4f0de1657aeb8f5340d0fd55190 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce float QImage formats and renderingAllan Sandfeld Jensen2021-05-262-0/+33
| | | | | | | | | Useful for some HDR representations and HDR rendering. Change-Id: If6e8a661faa3d2afdf17b6ed4d8ff5c5b2aeb30e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add tests for QAndroidApplication's sdkVersion and activityAssam Boudjelthia2021-05-132-6/+21
| | | | | | | While at it, move tst_android under corelib/platform/android. Change-Id: Icf91cd75cb5e04d03fe6a81d52fba52a485ca41f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QObject: port to new property systemIvan Solovev2021-04-211-1/+1
| | | | | | | | | | | | | | | Extended QObjectPrivate::ExtraData to store a pointer to its parent, and reimplemented qGetBindingStorage() function for QObjectPrivate::ExtraData. This allows to use Q_OBJECT_COMPAT_PROPERTY macro for a property, stored in QObjectPrivate::ExtraData and solves all the problems with calling a custom setter. Task-number: QTBUG-85520 Change-Id: I40e01c29430846359ef9160fa1ae97c702be9a18 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove Qt dependency from some test helper executablesJoerg Bornemann2021-04-151-9/+1
| | | | | | | | | | | pro2cmake did not take into account the QT -= qt bit of the .pro files. Fixes: QTBUG-91676 Change-Id: If1373ee966312e4246490bd7389d75be9fa739cb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid processing-intensive painting of high number of tiny dashesEirik Aavitsland2021-04-141-0/+34
| | | | | | | | | | | | When stroking a dashed path, an unnecessary amount of processing would be spent if there is a huge number of dashes visible, e.g. because of scaling. Since the dashes are too small to be indivdually visible anyway, just replace with a semi-transparent solid line for such cases. Pick-to: 6.1 6.0 5.15 Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Extend blacklisting of tst_gestures including all RHEL'sHeikki Halmet2021-04-131-10/+5
| | | | | | | | These are also failing in RHEL 8.2 Task-number: QTBUG-52523 Change-Id: I1448124376a2b415351d1a755043431050808e38 Reviewed-by: Jani Heikkinen <jani.heikkinen@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. Pick-to: 6.1 Task-number: QTBUG-20984 Change-Id: I3211ecf565995578c83a092c637890c0e8bfd766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make it even more obvious on what to do when tst_toolsupport failshjk2021-03-221-0/+7
| | | | | | | | Triggered by 6778b247. Pick-to: 6.0 6.1 5.15 Change-Id: Ic8e7136cd82eb8d3891450cfa8994f43b7cc09fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Tests: Clarify the course of actions when touching tst_toolsupporthjk2021-03-191-0/+4
| | | | | Change-Id: Ifc9caa8f1b05cd642c1bb57b0f37866de97ca2c2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Disable two tests in tst_QAccessibility on WaylandEskil Abrahamsen Blomfeldt2021-03-181-0/+6
| | | | | | | | | | | These two tests (applicationTest() and mainWindowTest()) require QApplication::setActiveWindow() to work, which it does not on Wayland. Task-number: QTBUG-91418 Change-Id: I0e7b4e24050684b437de63d19bd885bab53d36b9 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Move QEMU emulation detector to QTestSamuli Piippo2021-02-132-5/+4
| | | | | | | | | The emulation detection has been usable only on qtbase tests, move it to QTest so that it can be used in other modules as well. Pick-to: 6.1 Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Split up the QMetaType unit testVolker Hilsheimer2021-02-091-4/+2
| | | | | | | | | | | gcc 9 consumed enourmous amounts of memory building the test, regularly dying on a VM with 4GB RAM. Splitting it up helps. As a drive-by, use inline static variables, and rename the header used by other tests to tst_qmetatype_common.h. Change-Id: Ib716d8e3506aac6c87845e57b04cb1a4f6c68387 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist tst_macgui::scrollBarPainting()Tor Arne Vestbø2021-02-081-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>
* a11y: Report mixed state if QCheckBox is PartiallyCheckedJan Arve Sæther2021-02-043-3/+7
| | | | | | | | | | Previously it only returned checked or unchecked for a tri-state checkbox. Fixes: QTBUG-84616 Pick-to: 5.15 6.0 6.1 Change-Id: Ife72098e35f8295fd389bda232de5478ffa7e87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix lancelot GL painting test for GLESEirik Aavitsland2021-01-181-5/+8
| | | | | | | | | RGB10 internal texture format is not supported on GLES, use RGB10_A2 instead. Pick-to: 6.0 Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-128-196/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0725-262/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* tst_toolsupport: fix expected alignment on ARMv7Samuli Piippo2021-01-071-1/+1
| | | | | | | | | The alignment has been recently updated but never correctly tested, as test has either been disabled or marked as insignificant. Change-Id: If6e529c290b2057f58c3b27c89279d9e90728ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-2222-22/+29
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Check size of QObjectPrivate::ExtraData in tst_toolsupport.cpphjk2020-12-181-0/+6
| | | | | Change-Id: I96a5ec886fe862e0ee5d25120dda625478ecf420 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Tests: Fix building with qmake on WindowsFriedemann Kleint2020-12-171-4/+1
| | | | | | | | Apparently some library definitions went overboard, link them directly. Pick-to: 6.0 Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-103-1/+39
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: blacklist tst_NetworkSelfTest::smbServer() on openSUSELiang Qi2020-12-101-1/+2
| | | | | | Task-number: QTBUG-89209 Change-Id: I8d7d9bbf30a8f0654bc9aa84f7833c950e838b34 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Inline access to the QBindingStorageLars Knoll2020-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | And inline the fast checks inside the methods in QBindingStorage. This allows QObjectBindableProperty and friends to inline all the fast checks and almost completely eliminates the overhead for property accesses when no bindings are being used. Read and write times of QObject based properties when no bindings are being used: Read Write Old style property: 3.8ns 7.3ns QObjectBindableProperty (no notification): 4.5ns 4.3ns QObjectBindableProperty (with signal): 4.5ns 7.6ns QObjectBindableProperty (inline accessors): 3.2ns 3.4ns Numbers without this patch: Old style property: 3.8ns 7.9ns QObjectBindableProperty (no notification): 7.2ns 7.7ns QObjectBindableProperty (with signal): 7.2ns 16.0ns QObjectBindableProperty (inline accessors): 6.3ns 6.7ns Change-Id: Ifd1fa3a489c3be8b1468c0b88af547aac397f412 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 98c82fb445acf45cc4c4bc86a5adda43358127bf) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Android: fix tst_android testAssam Boudjelthia2020-11-252-3/+2
| | | | | | | Fixes: QTBUG-88506 Pick-to: 6.0 Change-Id: I938de388fce8ec393b03b2f0f42ddfe9094e6a5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Network self-test: make it work with docker/containersTimur Pocheptsov2020-11-173-77/+144
| | | | | | | Fixes: QTBUG-87740 Pick-to: 5.15 Change-Id: Idfe73708784774188afd40048f81406aa720a554 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Conditionally disable tests that depend on cxx11_future flagTony Sarajärvi2020-11-171-0/+4
| | | | | | | Task-number: QTBUG-88392 Change-Id: Ic8451ca4052ec4a94f0d78307e1b32965eb18c4e Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Android: exclude failing test tst_android:assetsReadAssam Boudjelthia2020-11-161-0/+3
| | | | | | | Task-number: QTBUG-87025 Task-number: QTBUG-88506 Change-Id: I11137fadd1455ae782af5ada1c6d88d65050440d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-045-8/+21
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSsl: Further work around to pass network testMårten Nordheim2020-10-261-0/+9
| | | | | | | | | | Our tls certificate/key are a bit on the old side and need to be updated. But for now let's lower the openssl level. In this case openssl complains about the server's key used for DHE being too short. Task-number: QTBUG-86187 Change-Id: I142a7d52f7599f60b8f4f3ff3ac5ce61fed06b4c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Get rid of all usage of QApplication:desktopVolker Hilsheimer2020-10-141-1/+1
| | | | | | | | Use QScreen APIs instead. Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-077-18/+18
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove compiler testAllan Sandfeld Jensen2020-10-0212-1763/+1
| | | | | | | Outdated test for old buggy compilers Change-Id: I605a2318a21121bde9a80c046a7beb6edcd2d546 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-2328-54/+38
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Purge Q_{STDLIB,COMPILER}_UNICODE_STRINGSEdward Welbourne2020-09-141-4/+0
| | | | | | | | | These were now always defined, hence redundant. Leave the #define in place so that we can verify we actually do always define it, in a #else of an existing #if check on it. Change-Id: Iea4c3dbc8f9982268bcf81da5ef17fe2ebf5c462 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>