summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix compiler warnings about missing overridesLars Knoll2020-09-133-23/+29
| | | | | Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warnings coming from using the deprecated overload of qCheckSumLars Knoll2020-09-111-1/+1
| | | | | | | Change-Id: I719c2d56a690fd245d3917045de4005f118c688b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-113-18/+20
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-101-2/+2
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* pro2cmake: Fix qmake parser's line continuation handlingJoerg Bornemann2020-09-022-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | The qmake parser of pro2cmake handles completely commented lines to make assignments like this work: SUBDIRS = \ foo \ # bar \ bar However, assignments like SUBDIRS = \ foo \ #bar \ bar were cut off at the commented line. Fix this by allowing leading whitespace for "fully commented lines". Change-Id: Ib5de850a02fd9b9ebb7c056c2f64f9d684334b08 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a QBindingStorage classLars Knoll2020-09-021-2/+2
| | | | | | | | | | | | | | | | | | | QBindingStorage is a class that can store a set of binding objects for the properties of a QObject. This will get used to reduce the memory overhead of the property system when adding bindable properties to QObject based classes. The binding storage has a pointer to the TLS entry containing the currently evaluating binding. Like that we avoid repeated TLS lookups and reduce the overhead of the property system to one pointer lookup and one compare for the case that properties aren't being used. Each QObject now owns one binding storage object, that can be used to store binding data for properties that members of the QObject. Change-Id: I27427c03c2ba281f072e074be96147bdbcaac246 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Take the right lock before using a connection's receiverGiuseppe D'Angelo2020-09-011-0/+87
| | | | | | | | | | | | When a signal/slot connection is activated, a lock on the receiver object is taken (to be sure it doesn't get destroyed). The path for blocking queued connections however took the lock on the sender by accident, fix that. Pick-to: 5.15 5.12 Change-Id: I8cd938a50eca2bf71e7bfb86768ee0c8431afdfa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid inifinite recursion call in tst_Compiler::cxx11_noexceptTor Arne Vestbø2020-08-281-1/+2
| | | | | | | warning: all paths through this function will call itself [-Winfinite-recursion] Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use OpenType font weightsJonas Karlsson2020-08-283-3/+3
| | | | | | | Task-number: QTBUG-42248 Change-Id: Icdb301b27d6699c2b842c4563fbef9df73c23cbc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Don't skip QFileDialog retranslatability test on macOSVolker Hilsheimer2020-08-261-3/+0
| | | | | | | | The test explicitly asks for a non-native file dialog, which works on macOS as well. Change-Id: I964c6d98501b4207c2b6c2ce1df39f654c801a43 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Implement QAbstractFileIconProvider to use theme and mime databasesVolker Hilsheimer2020-08-261-3/+0
| | | | | | | | | | | | | | This doesn't give useful defaults on all platforms; icon themes are not provided on platforms other than Linux, and the mime database doesn't always return user-friendly names based on file names. However, both icon themes and the mime database can be customized by application developers by shipping a data file side-by-side with the application, without the need for reimplementing the provider class. Change-Id: Ie4b18ac1b861e2da64f01d1f209986b27fbe6bd5 Task-number: QTBUG-66177 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIODevicePrivate: rearrange class membersAlex Trotsenko2020-08-241-2/+2
| | | | | | | | | | | | | | As this class is a subject of the library hook data, there must be a solid understanding of the member's alignment and padding across different architectures. By reordering the layout, this patch provides a clearer way of adding new members to the class. Bump the TypeInformationVersion field in qtHookData, to notify the Qt Creator developers that the offset of QFilePrivate::fileName was changed and dumpers should be adapted. Change-Id: Ied8b69bdeb9da50ff05aba2107bc75509674b18e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-241-35/+35
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Generate less code when creating QMetaTypeInterfacesLars Knoll2020-08-241-3/+2
| | | | | | | | | There is no need to generate wrapper functions for equals, lessThan or debugStream for pointer types, as those can easily be handled by a few lines of code in QMetaType itself. Change-Id: If79b3bc3a629249c1d17c9e592202f08b59f80ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Automatically register data/debug stream operations in QMetaTypeLars Knoll2020-08-241-37/+0
| | | | | | | | | | | | | | | | | | | | | | And remove the old manual registration code for those operators. Add some special handling for long/ulong, as these types could be streamed as a QVariant so far, but are not directly streamable through QDataStream. [ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators() and QMetaType::registerDebugStreamOperator() methods have been removed. The streaming operators for a type are now automatically registered together with the type registration. This implies that the operators should be visible wherever the type is visible and being used. [ChangeLog][Behavior Incompatible Changes] Because the QDataStream and QDebug serialization operators are automatically registered with QMetaType, the declarations of those functions must be present at any point where the type is used with QMetaType and QVariant. Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Properly deprecate Qt::MidButton in favor of Qt::MiddleButtonEdward Welbourne2020-08-221-4/+4
| | | | | | | | | | | | MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QIODevice: implement a "zero-copy" strategy for buffered writesAlex Trotsenko2020-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It works as follows: - user calls write(const QByteArray &); - this function keeps a pointer to the chunk and calls a regular write(data, len); - write(data, len) calls a virtual writeData(); - subclass calls a new QIODevicePrivate::write(); - QIODevicePrivate::write() makes a shallow copy of the byte array. Proposed solution is fully compatible with existing subclasses. By replacing a call to d->writeBuffer.append() with d->write(), subclasses can improve their performance. Bump the TypeInformationVersion field in qtHookData, to notify the Qt Creator developers that the offset of QFilePrivate::fileName was changed and dumpers should be adapted. Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Disable warning about self-move and self-assign-overloadTor Arne Vestbø2020-07-261-0/+3
| | | | | Change-Id: I1d20d3f424eced5cc5787934663b9d243f75d46e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning when printing of qsizetypeTor Arne Vestbø2020-07-262-6/+6
| | | | | | | warning: format specifies type 'int' but the argument has type 'qsizetype' (aka 'long long') Change-Id: I6099b53efecea46d191d5dc019c986f99e49c1f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: Use QVERIFY instead of QCOMPARE for empty listsFriedemann Kleint2020-07-101-2/+2
| | | | | | Pick-to: 5.15 Change-Id: I4da02fa11583eca3844bf42efcdf818b8bbd6a94 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CMake: Regenerate subdir test projectsAlexandru Croitor2020-07-092-1/+8
| | | | | | | | And generate a few more test projects that were missing. Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-0926-37/+37
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate testsAlexandru Croitor2020-07-093-3/+0
| | | | | | | | This is in preparation for regenerating them with the new qt_foo prefixed APIs. Change-Id: Iff34932d642b1c0186ee39f952adf3ad367fd602 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove unnecessary ; after function implementationsLars Schmertmann2020-07-062-31/+31
| | | | | | Task-number: QTBUG-82978 Change-Id: Iea3bcaec1ef9f4bd0f73e5dccca33354650f5bf4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use QList instead of QVector in other testsJarek Kobus2020-06-255-34/+25
| | | | | | Task-number: QTBUG-84469 Change-Id: I656c9f73bd2364be39ee67747524e7c4a25c0935 Reviewed-by: Lars Knoll <lars.knoll@qt.io>