summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * tst_qsslkey: Clean up #if-eryMårten Nordheim12 days1-12/+12
| | | | | | | | | | | | | | | | It was more complex than needed in a few places. Change-Id: I0609423f82420f72c65637cf398ccd7694ee85e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Specify QT_TESTCASE_BUILDDIR for Qt::Test users implicitlyAlexey Edelev12 days6-2/+83
|/ | | | | | | | | | | | | | | | | | | QT_TESTCASE_BUILDDIR was implicitly defined by Qt::Test target for library users in Qt5. By default, this definition will point to CMAKE_CURRENT_BINARY_DIR. This logic works similarly to qmake logic. From user's perspective it might be useful to not rely on standard search paths, but specify own. This can be done by setting the QT_TESTCASE_BUILDDIR property for the user's target. CMake will substute the value of the QT_TESTCASE_BUILDDIR property into the QT_TESTCASE_BUILDDIR definition. The implicit QT_TESTCASE_SOURCEDIR also seems to be useful. According to the current logic, it points to CMAKE_CURRENT_SOURCE_DIR. Fixes: QTBUG-92079 Change-Id: I8a9065f08e859c713b3c8cc08142a9ced0677770 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add binary compatibility files for Qt 6.0.0Milla Pohjanheimo12 days11-0/+93524
| | | | | | | | Binary compatibility files added. Pick-to: 6.0 6.1 Change-Id: I89fe7daae970af697ec57a414e3c90b24d4f9a86 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge integration refs/builds/qtci/dev/1617813097Qt CI Bot13 days1-19/+3
|\
| * Add the SIMULATE_IN_SOURCE argument to _qt_internal_test_expect_passAlexey Edelev13 days1-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | test_QFINDTESTDATA builds the project in the source tree, this is necessary because the test requires relative paths to the source file names. This function could be useful for other tests, so it makes sense to extend the _qt_internal_test_expect_pass/fail macros to support build in the source tree. Note that, the SIMULATE_IN_SOURCE argument doesn't build the test in the existing source tree, but copies source files to the build tree first to do not litter the source directory. Change-Id: I16e790d74be2a0c5ca0593e0f88580dbe09882b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge integration refs/builds/qtci/dev/1617798649Qt CI Bot13 days1-0/+17
|\ \ | |/ |/|
| * Fix get out of bounds index in QSortFilterProxyModel::filterAcceptsRowChunLin Wang13 days1-0/+17
| | | | | | | | | | | | | | | | | | Before calling the index function, we need to check the validity of the parameters. Fixes: QTBUG-91878 Pick-to: 5.15 6.0 6.1 Change-Id: I9ec7265fff3f81b8a288c4ba8fae606a2ec808a6 Reviewed-by: David Faure <david.faure@kdab.com>
* | CMake: Choose better defaults for qt_add_plugin STATIC/SHAREDAlexandru Croitor13 days3-0/+57
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a recent behavior change where the public CMake API qt_add_plugin API took into account the value of BUILD_SHARED_LIBS to decide whether the plugin should be a static or shared library. Instead, use the following new behavior - If no explicit option STATIC / SHARED option is passed, default to whatever flavor Qt was built as. Aka if Qt was configured with -shared, qt_add_plugin defaults to creating shared plugins. If it's a -static Qt, create static plugins. - If an explicit STATIC / SHARED option is set, override the default computed value with the given value. As a result BUILD_SHARED_LIBS does not affect Qt plugins anymore. This is more in line with Qt expectations. Add SHARED as a new valid option to pass to qt_add_plugin (it wasn't before). Add tests to check for the above behavior. Amends aa4a1006cbccbc180c600f9b4dc9e882bb5ed5ca Pick-to: 6.1 Fixes: QTBUG-92361 Task-number: QTBUG-88763 Change-Id: Iae806024ddd5cf10cfe58ddbcebd2818084b0bd7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge integration refs/builds/qtci/dev/1617702467Qt CI Bot2021-04-061-0/+20
|\
| * QList: Satisfy contiguous_range requirementsFabian Kosmale2021-04-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With C++20, there is a new iterator_category: contiguous_iterator, for containers whose elements are stored contiguously in memory. In Qt 6, QList satisfies this requirement. However, we still need to tell the standard machinery about it. Step one is to mark the iterators as contiguous_iterator; as that exists only in C++20, we have to ifdef accordingly. We also have to ensure that the iterators satisfy pointer_traits by defining element_type due to how contiguous_range is specified. As this runs afoul of LWG 3346, we check for known bad _GLIBCXX_RELEASE versions. Change-Id: I8c134544e694ba937e4d912393eb72fa75b49e3d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QWindowsPipeReader: determine pipe state before signalingAlex Trotsenko2021-04-061-0/+35
| | | | | | | | | | | | | | | | | | The 'pipeBroken' flag must be updated before emitting the readyRead() signal to avoid deadlock of waitForReadyRead() inside slot connected to readyRead(). Change-Id: Ie393fdd594c6691da6609ea18307589b7157c624 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* | CMake: Build minimal subset of tests in desktop static buildsAlexandru Croitor2021-04-065-15/+33
|/ | | | | | | | | | | | | | | | | | | | | | | Add new configure option -make minimal-static-tests and CMake option QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS it will enable building a minimal subset of tests when targeting a static desktop Qt build. In qtbase the minimal subset includes all the auto tests of testlib, tools, corelib and cmake. In particular this will also do cmake build tests and qmake build tests (tst_qmake) Adjust CI instructions to enable building a minimal subset of static tests when a platform configuration is tagged with the MinimalStaticTests feature. Fix and skip a few tests that were failing. Pick-to: 6.1 Task-number: QTBUG-87580 Task-number: QTBUG-91869 Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* BLACKLIST tst_qfont for Red HatHeikki Halmet2021-04-061-0/+2
| | | | | | | | Task-number: QTQAINFRA-4363 Task-number: QTBUG-84248 Pick-to: 6.1 Change-Id: I791aba3bf2b26f9c90201b1dcd67c2a85d28f08b Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS when using the signalIvan Solovev2021-04-031-2/+68
| | | | | | | | | | This commit amends 4ceaf22bed1bc0ed2dec4628fd9d9814c0e0fd86. Signal parameter was not actually used, even is the signal was specified. This patch fixes it and also introduces unit-tests for this issue. Change-Id: I029d413644eb6a72af3bdce27cc5f5bcadfe946a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add support to set thread priority to QThreadPoolSamuel Gaist2021-04-031-0/+20
| | | | | | | | | | | | | | | | | | Currently, QThreadPool's generated threads inherit the priority from the thread they are created and that cannot be changed. This merge request adds a property to QThreadPool so that the priority of the threads can be different. The default behavior does not change. [ChangeLog][QtCore][QThreadPool] QThreadPool can now be configured to use a different thread priority when creating new threads than the one it inherits from the thread it was created in. This will only apply to the threads started after the property is changed. Fixes: QTBUG-3481 Change-Id: Ic98d4312d055a3357771abb656516ebd0715918d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge integration refs/builds/qtci/dev/1617264361Qt CI Bot2021-04-011-10/+11
|\
| * QObjectCompatProperty: Emit signal in notfiyFabian Kosmale2021-04-011-6/+6
| | | | | | | | | | | | | | | | | | There is no need to write emit and notify at the same time, as not emitting after notify does not make sense. This naturally only applies to properties with a changed signal. Change-Id: I99ff7863a509262ad9d4f7c9c5afbc66fd37001c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QObjectCompatProperty: Require explicit notifyFabian Kosmale2021-04-011-7/+8
| | | | | | | | | | | | | | | | | | | | For QObjectCompatProperty, which allows to do basically anything in its setter, it is actually easier to manually specify when the change should become visible. This is in line with manually writing emit calls in the old property system, and allows the preservation of class invariants. Change-Id: I585bd3f25d722ca3fd721ead85fe73dbee26c5f6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Linux: Add abstract address support for QLocal{Socket,Server}Piotr Mikolajczyk2021-04-011-10/+126
|/ | | | | | | | | | | | | Takes advantage of Linux's and Android's support for abstract namespace when binding sockets, which is independent of the filesystem (see man entry for unix domain sockets). To make QLocalServer and QLocalSocket use an abstract socket address, one needs to set the socket options to QLocalServer::AbstractNamespaceOption. Fixes: QTBUG-16090 Change-Id: Ia9f9c9cc1ac5c28f9d44b0a48d854a7cfbd39b11 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QEXPECT_FAIL for tests that pass now on AndroidVolker Hilsheimer2021-03-312-9/+0
| | | | | | | | | Fixes: QTBUG-69214 Fixes: QTBUG-69218 Fixes: QTBUG-69220 Change-Id: I8b780db8d9dad1a877bc16e802e6ae92de0c8f23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Merge integration refs/builds/qtci/dev/1617183127Qt CI Bot2021-03-312-3/+6
|\
| * Fix some warningsAndreas Buhr2021-03-312-3/+6
| | | | | | | | | | Change-Id: Ief00228f83e16421fb4eec4c678632d5c996624f Reviewed-by: Karsten Heimrich <karsten.heimrich@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>
* Merge integration refs/builds/qtci/dev/1617116580Qt CI Bot2021-03-301-1/+62
|\
| * rhi: Add support for custom bytes-per-line for uncompressed raw dataLaszlo Agocs2021-03-301-1/+62
| | | | | | | | | | | | | | Fixes: QTBUG-90770 Change-Id: Icba328c417bcce256e7b44f1d540af7f8e83376b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge integration refs/builds/qtci/dev/1617109351Qt CI Bot2021-03-301-3/+7
|\ \ | |/ |/|
| * tst_qobject: enable some tests for narrowingGiuseppe D'Angelo2021-03-301-3/+7
| | | | | | | | | | | | | | | | | | | | Compilers are catching up, so some #if 0 codepaths can now be conditionally enabled. Change-Id: Ia9e87a096bc2ae4789ab390a9170d9c1eb9690d6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge integration refs/builds/qtci/dev/1617098611Qt CI Bot2021-03-302-6/+48
|\ \ | |/ |/|
| * Remove meaningless QT_NO_UNICODE_LITERAL check in QString literal testsAndrei Golubev2021-03-302-6/+0
| | | | | | | | | | | | | | | | | | | | | | This check doesn't really do anything useful anymore: QStringLiteral is used in Qt without any extra QT_NO_UNICODE_LITERAL #if-ery Additionally, clean the related (and outdated) comment in {QString, QByteArray}::literals() Change-Id: I65b1eac33c5470508997be24f9ba6cf56d8578ea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Add literal operators for QString and QByteArrayAndrei Golubev2021-03-302-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QString] Added literal operator u"..."_qs that converts a char16_t string literal to QString [ChangeLog][QtCore][QByteArray] Added literal operator "..."_qba that converts char string literal to QByteArray Change-Id: I4aa59b28cc17bff346b378eb70008fb8185d21ac Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QAbstractItemModelTester: fix false positive when model has zero columnsDavid Faure2021-03-301-0/+10
| | | | | | | | | | | | | | | | | | | | Regression introduced by me in commit 72e0d699cec09458ca9325035d477d4899e8e47b Fixes: QTBUG-92220 Change-Id: Ic7dd4eda0a1993f9763933882baf928bfc83b08b Pick-to: 6.1 6.0 5.15 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Android: Add select and copy capability to read-only text widgetsPiotr Mikolajczyk2021-03-301-0/+18
|/ | | | | | | | | | | | | | | | In case of a read-only text editing widget it was imposibble to copy text from it. In QtWidgets you could not even see the selection handless. Text selection in QtWidgets module was filtered depending on readOnly property of the widget. Additionally, in InputMethod the read-only state was translated into disabled. Patch also makes the edit menu to be aware of the read-only status of the control - the menu items are different for rw and ro controls. Task-number: QTBUG-91417 Change-Id: Ic7b27f78678eeaa87a38607af787f254db1383b8 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Replace QTextDocumentResourceProvider with a std::functionVolker Hilsheimer2021-03-302-35/+41
| | | | | | | | | | | | | | | | | | | | | | 376e3bd8ecf40881685714f6f19e12d68e92127e added the new class for Qt 6.1, but during header review we concluded that using a class introduces complexity wrt instance ownership and API design that can be avoided by using a std::function instead. The functionality is tied to QTextDocument, so the type definition and the default provider API is added there. Since std::function is not trivially copyable, the atomicity of the previous implementation is not maintained, and concurrent modifications of and access to the global default provider from multiple threads is not allowed. The relevant use case can be supported by implementing a resource provider that is thread safe. Task-number: QTBUG-90211 Fixes: QTBUG-92208 Pick-to: 6.1 Change-Id: I39215c5e51c7bd27f1dd29e1d9d908aecf754fb7 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix some warningsAndreas Buhr2021-03-298-14/+37
| | | | | Change-Id: I546300b4e630a2234c83c03ece65a08f4c8652d2 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Silence a bunch of gcc warnings for the moc testVolker Hilsheimer2021-03-293-1/+11
| | | | | | | | We deliberately expose moc to warning-worthy C++, but we don't want the compiler warnings coming from those. Change-Id: I09c36d7c8bfbb88f7bde61fa7bcc52a5adde81da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename QUrlResourceProvider to QTextDocumentResourceProviderVolker Hilsheimer2021-03-292-4/+4
| | | | | | | | | | | | | | | | | While the class name is now a bit more than a mouthful, it's purpose is very narrowly tied to QTextDocument, so don't use a very generic name for it. That resources are provided based on a URL is to some degree an implementation detail, and URLs are resource locators so we don't need that in the class name. Address code review comment for 6.1. Add documentation and links to existing APIs with a similar purpose. Task-number: QTBUG-90211 Task-number: QTBUG-92208 Pick-to: 6.1 Change-Id: I4f09057cc2f53a5595513c1c9422e6ccaad6ca13 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Repair tst_qwineventnotifierAlex Trotsenko2021-03-292-1/+3
| | | | | | | | - add missing include - fix platform detection in CMakeLists.txt Change-Id: If7d04765eb40310d2841e792e8f80e083e067ad2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Skip a tst_QRhi test case with the Android emulatorLaszlo Agocs2021-03-291-0/+3
| | | | | | | Pick-to: 6.1 Task-number: QTBUG-92211 Change-Id: I63ff17b226d502189bc769b0b28640b849b8d39a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qobject: fix the detection for GCCGiuseppe D'Angelo2021-03-261-4/+14
| | | | | | | | | | | | | Q_CC_GNU is defined on compilers that masquerade as GCC (Clang, ICC), so using it to work around GCC-specific bugs is wrong. Introduce a local define for _only_ GCC and use it in place of Q_CC_GNU. Drive by: version-fence a test we now know it's been fixed upstream, and correct the link to the corresponding bug report. Pick-to: 5.15 6.0 6.1 Change-Id: I9059d6e6bf86157aca71590ac22afb1a1c114313 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-03-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | fillRule() contained a major blunder: instead of checking if the d-pointer was allocated, and return a default value if it wasn't, it checked whether the path contained any points. This means that QPainterPath p; p.setFillRule(x); Q_ASSERT(p.fillRule() == x); was failing. As a drive-by to test this change, fix another mistake in clear(): clear is documented to clear the elements in a path, but instead it also changed the fill rule. This commit partially reverses 697910e5fbd382e78bc1bcbac3f5824aded059b4. Change-Id: Ieb8145694b672439c3380d9ccb87d1206a2dd115 Pick-to: 5.12 5.15 6.0 6.1 Done-with: Milian Wolff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Rename QJniEnvironment exceptionCheckAndClear to checkAndClearExceptionsAssam Boudjelthia2021-03-261-3/+3
| | | | | | | | | Address feedback from header view. Task-number: QTBUG-90211 Pick-to: 6.1 Change-Id: Iad2b609598b16f66fd6ab09484fe6e6899981263 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce QMetaObject::metaTypeFabian Kosmale2021-03-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function returns the metatype corresponding to the metaobject, or an invalid metatype for namespaces. This works as follows: First we increment the metaobject revision for new metaobjects. Metaobjects with older revisions are handled by doing a lookup by name. That fallback is also used for dynamic metaobjects (from QtDBUS and those created by QMetaObjectBuilder). For new metaobjects, we store the metatype in its metatype array, behind the property metatypes. This avoids any changes to the property and method metatype extraction logic: For properties, the metatype access does not change, as the new metatype is after their metatypes. For method metatypes, we already have an indirection layer (using offsets), so by adjusting those offsets by one, the same logic keeps working. To distinguish between namespaces and dynamic metaobjects, namespaces store the metatypeinterface pointer for void in the metatype array, whereas dynamic metaobjects store a nullptr. One nice additional benefit is that this simplifies the generator logic in moc, as the metatype array is now never empty. Task-number: QTBUG-92077 Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Merge integration refs/builds/qtci/dev/1616671507Qt CI Bot2021-03-251-1/+7
|\
| * Adapt Catch2 to Apple SiliconAndreas Buhr2021-03-251-1/+7
| | | | | | | | | | | | | | | | | | We are still using Catch2 2.11.3 which is not adapted to Apple silicon yet. This patch backports the required change from Catch v3.0.0-preview.3. Change-Id: Ifa14a1fdd6cd1f661c94a0a78648cb01bd9699c1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge integration refs/builds/qtci/dev/1616667899Qt CI Bot2021-03-251-0/+10
|\ \
| * | QTypeInfo: Handle T::value_type being equal to TFabian Kosmale2021-03-251-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix operator checks for containers whose value_type equals themselves. It does not make sense to recurse on value_type in that case. Thanks to std::disjunction having short-circuiting semantics, we can avoid that issue by checking first whether T is T::value_type. As a drive-by, check for value_type typedef before checking for begin/end in is_container. This works around an issue in gcc <= 8.1, which fails to correctly SFINAE the case where begin and end are private methods. Pick-to: 6.0 6.1 Fixes: QTBUG-89456 Change-Id: I27305a7cfe050f13a279c07f00bc229c01daa25b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge integration refs/builds/qtci/dev/1616664803Qt CI Bot2021-03-251-0/+14
|\ \ | |/ |/|
| * Fix removing columns when QSortFilterProxyModel has not been sorted yetJoni Poikelin2021-03-251-0/+14
| | | | | | | | | | | | | | Fixes: QTBUG-91788 Pick-to: 6.1 6.0 5.15 Change-Id: Iddcafd3171f0f3703b94893a32b4ccaaeea9e713 Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix some warningsAndreas Buhr2021-03-252-3/+3
|/ | | | | Change-Id: I9460606cefd8c4b5c01e576043c1bc8660b19de4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge integration refs/builds/qtci/dev/1616419842Qt CI Bot2021-03-221-11/+61
|\