summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* QtConcurrent: use variable templates for compile-time checksSona Kurazyan2022-01-203-17/+10
| | | | | | | | | Noticed during the API review. Pick-to: 6.3 6.2 Task-number: QTBUG-99883 Change-Id: I19571343a0cf0609beae2422ef1f69f7a34eb9ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add QCheckBox test in tst_baseline_widgetsAxel Spoerl2022-01-201-0/+57
| | | | | | | Task-number: QTBUG-99748 Pick-to: 6.3 Change-Id: I45fe3b102fba4dd6a6f8cd08bab5543f12265aa7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Add OUTPUT_TARGETS option to qt_internal_add_resourceUlf Hermann2022-01-201-1/+5
| | | | | | | | We need it for shadertools. Change-Id: I9e9c76e535e5cd698564b48beedb7380b08173e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simeon Kuran <simeon.kuran@gmx.at>
* CMake: Add support building Qt with the 'mold' linkerAlexandru Croitor2022-01-203-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | The mold linker is a new linker for Linux that provides faster link times compared to BFD ld, ld.gold and lld. It can be found at https://github.com/rui314/mold To build Qt with mold, ensure that the binary in your PATH and then configure Qt with with either cmake /path/to/qtbase -DINPUT_linker=mold or /path/to/qtbase/configure --linker mold The change was tested with gcc 9, clang 10, clang 12, mold 1.0.0. Only qtbase and qtdeclarative (and dependencies) were tested. Pick-to: 6.2 6.3 Task-number: QTBUG-99270 Change-Id: I2e64a1f4257c37ff5b64a9326e548b9b46e07c80 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QTabBar: Improve scrolling with high resolution mouse wheelsNoah Davis2022-01-203-2/+62
| | | | | | | | | | | | | | | | | | | | | The current behavior for handling the angle delta of a wheel event changes index the instant there is a change in angle delta. This works fine for mouse wheels that send events with 120 angle delta units and there is also already behavior defined for devices with pixel deltas, but there is nothing good for handling events from high resolution mouse wheels that don't have pixel deltas. This patch makes it so that the current index doesn't change until the accumulated angle delta for the X or Y axis reaches 120. [ChangeLog][QtWidgets][QTabBar] Scrolling with a high resolution mouse wheel changes the current index at a rate more like a normal mouse wheel. Task-number: QTBUG-97844 Pick-to: 6.3 Change-Id: I2e7fd88984a253f6ef8a0008deb7233e4cb4d84a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QTlsBackend/QSslSocket - check the arguments we pass to QObject::connectTimur Pocheptsov2022-01-202-7/+11
| | | | | | | Not to have warnings about invalid (nullptr) parameters. Change-Id: I5fdfa7e99df0f3c9907055cf244efa5a56b21c11 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add documentation for the Android Multi-ABI related variablesAlexey Edelev2022-01-202-0/+95
| | | | | | | | | | | | | | | Document: QT_ANDROID_BUILD_ALL_ABIS - cache variable QT_ANDROID_ABIS - cache variable QT_PATH_ANDROID_ABI_<ABI> - cache variables ANDROID_ABIS - new argument of qt6_add_executable function Pick-to: 6.3 Task-number: QTBUG-99261 Change-Id: I7061065a6f329864ec9004ef41121f1225c5fc80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix minor grammar error in configure's closing messageEdward Welbourne2022-01-201-1/+1
| | | | | | | | | | | | | | | Minor glitch in wording, but it's been bugging me for months. The meaning of "try to remove [a file]" implicitly says you might be unable to do so; while the attempt might help with your situation, the experiment might merely be a diagnostic, e.g. because if you can't remove the file, that would imply things that would help you solve your problem. For contrast, "try removing [a file]" says removal might actually solve the problem for which this action is proposed as a fix. Change-Id: Ic995cfdef1523094bb368dcda8bd0d2bbd2e9434 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix queue passed to vkQueuePresentLaszlo Agocs2022-01-201-1/+1
| | | | | | | | | | | | | | | | | We do not test actively test setups where a separate graphics and present queue is used because there is no combined queue at all. (it won't be tested because we neither want to nor have the possibility to do so) However, QVulkanWindow (unlike, say, QRhi's Vulkan backend) attempts to support this. It turns out the argument passed to vkQueuePresent is wrong: the present is to be submitted to the present queue. So fix this up. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-73470 Change-Id: Ic9b589aba52e3326637216b98a074e27fdc3e3b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Coin: use CMAKE_STAGING_PREFIX for cross-compilationsSamuli Piippo2022-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Use CMAKE_STAGING_PREFIX instead of CMAKE_INSTALL_PREFIX when cross-compiling. This separates the host path used in staging prefix and the target path used in the install prefix for the device. This prevents for example Windows paths from being used in a device that does not support those. It also tells qmake not to sysrootify paths when building with it. Embedded linux and QNX builds are mostly affected and need this to use correct RPATHs and to unsysrootify qmake. Mobile platforms (Android and iOS) are not affected since they package binaries separately. WASM and INTEGRITY are static builds and device paths are not used. Cross-compiled auto tests keep staging prefix in RPATHs due to the behavior implemented in commit 20292250d44e08437306096e9096fc655cc9fb8b which keeps the QEMU test runs working as before. Pick-to: 6.3 6.2 Change-Id: If464ccd8cd9318a853df9afcb2aa709fbb2c1837 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: fix installation when staging prefix is usedSamuli Piippo2022-01-201-1/+2
| | | | | Change-Id: I2f9acdd977702f78c75eaeb67fc67f1b82836ff7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* convertDoubleTo: add an x86-64 intrinsics versionThiago Macieira2022-01-191-5/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The UB that the C and C++ standards talk about do not apply if we use intrinsics. We can rely on the processors' architectural behavior instead. There are two ways to detect a conversion that cannot be represented in the result. One would be to check if the #IE bit got set in the MXCSR, but in order to do that we'd need two issue an STMXCSR+LDMCXSR pair to clear the bit first and then another STMXCSR at the end to see if it got set. Those instructions are 4 uops long and necessarily target memory, so that's a bit slow. This commit implements the second way, which is to check if the result of the conversion is the "undefined" value. Unfortunately, that value is a valid, precise value that double can hold for all data types except unsigned 64-bit, so we need to recheck if that was the actual value stored in the original double. This implementation targets 64-bit exclusively because that avoids having to deal with the 64-bit intrinsics not even being defined in 32- bit code (converting a double to 64-bit integer in 32-bit is messy). The unsigned implementation is only implemented with AVX512F because of the unsigned conversion instructions that were introduced then. Change-Id: I89446ea06b5742efb194fffd16bb9f04b2014bab Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_QtJson: fix test for numbers above the limit of qint64Thiago Macieira2022-01-191-10/+7
| | | | | | | | | | | | | Commit 289f909621a8d83320d33e3ff7d651c164034098 ("Test conversion of ulonglong variant to JSON") was trying to ensure the result becomes a double. So there's no reason to make a test in the _data() function. Drive-by fix the UB condition on Windows (ulong is 32-bit, so 1ul << 63 is UB). Change-Id: I0e5f6bec596a4a78bd3bfffd16ca4f8f5219f785 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* tst_QMetaType: remove call to pthread_yield()Thiago Macieira2022-01-191-3/+0
| | | | | | | | | It was Linux-only and now even Linux is complaining: tst_qmetatype.cpp:421:26: warning: ‘int pthread_yield()’ is deprecated: pthread_yield is deprecated, use sched_yield instead [-Wdeprecated-declarations] Change-Id: I0e5f6bec596a4a78bd3bfffd16cb1eadfa301f16 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_QMetaType: remove the IsInitialized checkThiago Macieira2022-01-192-28/+11
| | | | | | | | | All primitive types are initialized and have been since at least commit 33cd680ddbaccf6139e215d851a39e657ae36394 ("New QMetaType representation"). Change-Id: I0e5f6bec596a4a78bd3bfffd16cb1fe22dc5c8f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qmetatype: add a few more row for QMetaType::UknknownTypeThiago Macieira2022-01-191-0/+23
| | | | | Change-Id: I0e5f6bec596a4a78bd3bfffd16cb215d7f6c6ddb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Merge QCC with GCC and ClangThiago Macieira2022-01-201-14/+1
| | | | | | | | | Because that's what it is. Change-Id: Ib42b3adc93bf4d43bd55fffd16c144ef04d68d83 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QStylePainter when painting widgetsMorten Johan Sørvig2022-01-205-11/+15
| | | | | | | | This makes it easier to set global painter options which affect all style painting. Change-Id: I6a38204ed2d874255e92345e6a6a50d27939fb24 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Cross-link QString's methodsIvan Tkachenko2022-01-191-3/+5
| | | | | | | | | | Arguably, when talking about «null-string» constructor, it might be useful to read about which strings are considered null, and which methods one can use to test that. Change-Id: Ie30144f33000aac53f4041cfb99da28a79dad946 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qeventdispatcher: avoid influence between test functionsAlex Trotsenko2022-01-191-0/+8
| | | | | | | | | | | | | | | | | When some test function fails (even as expected), it can leave the event dispatcher in an inconsistent state where the posted events queue might not be empty. As a result, this may break the internal logic of the next test function that is run. So, calling eventDispatcher->processEvents() after each completed function resets the event dispatcher to its initial state, which fixes the problem. Pick-to: 6.2 6.3 Change-Id: I5a54f892d09a6eca73c8fc82875ce3b9ce4a3242 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QVersionNumber: don't detach() in rvalue QList/QVector ctorMarc Mutz2022-01-191-2/+2
| | | | | | | | | | | | Qt 5 uses begin() so the fix there will be to use cbegin(). Found by Clang -ftime-trace pin-pointing repeated instantiations of QList<int>::data(). Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-97601 Change-Id: I6410e5b303766fdbc7e158a9ac1263adec973099 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QColorTransform: optimize member-swap()Marc Mutz2022-01-191-1/+1
| | | | | | | | | | | | | | | | | | | We know decltype(d), so we don't need to jump though the ADL-enabling that qSwap() does. Just call QExplicitlySharedDataPointer's member-swap directly. Found through Clang -ftrace-time over PCH'ed libQt6Gui.so build: **** Templates that took longest to instantiate: [...] 4050 ms: qSwap<QExplicitlySharedDataPointer<QColorTransformPrivate> > (87 times, avg 46 ms) which is gone afterwards. Task-number: QTBUG-97601 Pick-to: 6.3 6.2 Change-Id: Ie054848922a50dbf746781491cb28e598c0e12bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* rhi: d3d: Fix up non-vsynced presentationLaszlo Agocs2022-01-192-24/+48
| | | | | | | | | | | | | | | Doing Present(0, 0) is not necessarily sufficient to get rid of blocking. It may very well start blocking after a few frames. This does not apply to a non-flip-discard swapchain (when running with QT_D3D_NO_FLIP=1), but for flip-discard we should also try using DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING and DXGI_PRESENT_ALLOW_TEARING in case a swap interval of 0 is wanted. Pick-to: 6.3 Fixes: QTBUG-99949 Change-Id: I9cb13b139ba04e41b4f25b94bcd3d1e973496414 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Win32: always allow the event loop to be woken up by posted eventsVolker Hilsheimer2022-01-192-3/+2
| | | | | | | | | | | | | | | | | | | We set the wakeUps atomic to prevent multiple WM_QT_SENDPOSTEDEVENTS from being posted. However, this might happen right after the event processing thread cleared the atomic, but before it processed the previous WM_QT_SENDPOSTEDEVENTS message. In that case, we end up with a set atomic and an empty event queue, resulting in the event loop to block even though there are posted QEvents. To prevent that, always reset the atomic when we handle the WM_QT_SENDPOSTEDEVENTS message. In that case, we either call sendPostedEvents, or startPostedEventsTimer. The former already resets wakeUps; reset it in the latter as well. Fixes: QTBUG-99323 Pick-to: 6.2 6.3 5.15 Change-Id: I931c02be9c42b02e8ca20daba5059cd8185f0a37 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
* Add more tests for event dispatcher waking upVolker Hilsheimer2022-01-191-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two tests for some problematic scenarios where the behavior is not consistent across platforms and depending on which event dispatcher is used: 1) reliably waking up the dispatcher when posting events from a worker thread. That test fails 100% of the time on Windows no matter what type of application is created. It passes reliably on Linux and macOS for both core and gui applications. 2) waking up the dispatcher when we post an event from within an event handler. That test fails 100% of the time on Windows, both with core and GUI event dispatchers. On macOS, the test fails 100% of the time with the core dispatcher, and passes 100% of the time with the GUI dispatcher. On Linux, it passes only if a Glib based event dispatcher is used; the default Unix event dispatcher (which is also the one used on macOS for core applications) fails. Task-number: QTBUG-99323 Pick-to: 6.2 6.3 5.15 Change-Id: I2489533b9f0032488707777be0512bb933669a7d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
* Doc: Remove "Docs about UI Design" book overviewKai Köhne2022-01-192-81/+4
| | | | | | | | | | | | | | Recommending a Qt 4 book in Qt 6 documentation tells us something about how much we maintain the list :) The other books might still be good sources. Anyhow, the chances of a customer looking exactly in this place to learn good books about icons are not very high. So let's just ditch the page, and use external links instead. Pick-to: 6.3 Change-Id: I8013a5ab9d3416fe795f4aaed647e26db79508a1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Baseline test framework: follow rule of zero for PlatformInfo typeVolker Hilsheimer2022-01-192-29/+1
| | | | | | | | | The compiler generated special functions are just fine. Pick-to: 6.3 6.2 Change-Id: I64fba1fac59f55d2a82ab18e32c1a2b854df72f0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Baseline test framework: fix bug in internal data structureEirik Aavitsland2022-01-192-23/+2
| | | | | | | | | | | | | | | | | | The 'misc' data field was not copied in the assignment operator. That field is normally not used, so this bug went undiscovered for a long time. But in certain cases, the bug would cause an image size mismatch to be reported as just a normal mismatch. Fix the source of the problem by following the rule of zero - the compiler generated special functions are just fine for this value type. Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Pick-to: 6.3 6.2 Change-Id: I8fc8d32d1b83b78cd4ef3f4ec9a8f22661b0e025 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPolygon: de-inline setPoint()Marc Mutz2022-01-192-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5 times, the core of QList::realloc() was out-of-line by design, because it was independent of T. Now that QList is QVector, its equivalent detachAndGrow() function on QArrayDataPointer is inline and instantiated for each type anew. We therefore need to be careful to not use detach()ing QList operations in non-generic code inline code (in public, but also private, headers), because (common) PCH builds force this code to be compiled over and over again. Generic code is only instantiated when used in a TU, so that's ok. But for non-generic code, the only option is to de-inline. If there is an effect on compile-times, it's hidden in the run-by-run noise of building QtGui, but at least this entry is gone afterwards from clang -ftime-trace: **** Templates that took longest to instantiate: [...] 4676 ms: QList<QPoint>::operator[] (261 times, avg 17 ms) Added 'inline' to the definition of the setPoint(int, QPoint) overload, since MinGW used to complain about it missing. Task-number: QTBUG-97601 Pick-to: 6.3 Change-Id: Ie6f67da7ef39a16c98a7451d37b6d96531656392 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QPropertyBindingPrivate: move static_assert()s to .cpp fileMarc Mutz2022-01-192-2/+6
| | | | | | | | | | | | | | | | | | One of them has managed to percolate up to the top of the Clang -ftime-trace list of expensive template instantiations when building libQt6Gui.so with -pch: **** Templates that took longest to instantiate: 7882 ms: std::is_trivially_destructible<QPropertyBindingSourceLocation> (135 times, avg 58 ms) The checks aren't really necessary, because the compiler would complain about the union's deleted dtor if any of the members were not trivially destructible. Keep it around, though, but in the .cpp file. Task-number: QTBUG-97601 Pick-to: 6.3 6.2 Change-Id: I74a513a907735bde298e0bd9557d10abbcee5c91 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDBusMessage: de-inline createReply(QVariant)Marc Mutz2022-01-192-4/+5
| | | | | | | | | | | | | | | | | | | | | The building of the QList has percolated to the top of the lists of most expensive template instantiations in Clang -ftime-trace PCH builds of libQt6Gui.so: **** Templates that took longest to instantiate: 7137 ms: QList<QVariant>::operator<< (260 times, avg 27 ms) 7115 ms: QList<QVariant>::append (263 times, avg 27 ms) 7071 ms: QList<QVariant>::emplaceBack<const QVariant &> (256 times, avg 27 ms) 6651 ms: QtPrivate::QMovableArrayOps<QVariant>::emplace<const QVariant &> (256 times, avg 25 ms) [...] 5649 ms: QArrayDataPointer<QVariant>::detachAndGrow (256 times, avg 22 ms) [...] 4668 ms: QArrayDataPointer<QVariant>::reallocateAndGrow (256 times, avg 18 ms) Task-number: QTBUG-97601 Pick-to: 6.3 Change-Id: Ib766e70e4f741e057f9032bf232160cf6e83f4b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: use char16_t in ucstr{n,i,}cmp & ucstreq instead of QCharThiago Macieira2022-01-181-26/+24
| | | | | Change-Id: I0e5f6bec596a4a78bd3bfffd16c907b827f08519 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: optimize equalStrings() with a template in ucstrncmp()Thiago Macieira2022-01-181-6/+27
| | | | | | | | | If the SIMD code has already determined that the byte content differs, we don't need to actually subtract the bytes we loaded from memory in vector operations to return a sorting result. Change-Id: I0e5f6bec596a4a78bd3bfffd16c908b2902e1b1b Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: merge the two ucstrcmp overloads into a templateThiago Macieira2022-01-181-11/+8
| | | | | | | So we don't accidentally make modifications to one and not the other. Change-Id: I0e5f6bec596a4a78bd3bfffd16c94f1025aea521 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: introduce ucstreq() to optimize equalStrings()Thiago Macieira2022-01-181-2/+15
| | | | | | | | | If the lengths aren't equal, the strings can't be equal either, so we can skip the entire comparison. Some of the front-end functions that call these entry points already check for this, actually. Change-Id: Ib42b3adc93bf4d43bd55fffd16c8ceb9594512f2 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: make ucstricmp() parameters match the compareStrings'Thiago Macieira2022-01-181-27/+20
| | | | | | | | | | | | | The compareStrings() entry points take QStringView and QLatin1String, which are both ordered [size, pointer], so match that in the ucstricmp() parameters. This further reduces the prologue of the compareStrings() functions before reaching the case-sensitive comparison. There's no need to do the same for the case-sensitive functions because they're getting inlined. Change-Id: I0e5f6bec596a4a78bd3bfffd16c8ffc980c8af0c Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: add Q_NEVER_INLINE for ucstricmp()Thiago Macieira2022-01-181-3/+3
| | | | | | | | | | | | | | | Case-insensitive comparisons are not common, but both GCC and Clang inlined the ucstricmp() functions into QtPrivate::compareStrings(), with the side-effect that a lot of unnecessary setup code saving CPU registers was executed in the prologue of those functions. After this, Clang 13 emits both compareString() functions without any push/pop to save registers on x86-64; GCC 11 still emits a few, but fewer than before (it's emitting some unnecessary overhead for the loops). Change-Id: I0e5f6bec596a4a78bd3bfffd16c8fc2c0be9165f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QString: remove the old unaligned 4-byte compares in ucstrncmp()Thiago Macieira2022-01-181-60/+9
| | | | | | | | | | | | | This is very old code, predating the public Qt history (Qt 4.5). It predates all other SIMD code in qstring.cpp, actually. Now that we do have implementations for MIPS DSP, ARM Neon and x86 SSE2, this content has very little value. It would be relevant for other architectures Qt still supports (POWER and RISC-V come to mind), but I guess the compiler's auto-vectorizer functionality can do a better job than this content. Change-Id: I0e5f6bec596a4a78bd3bfffd16c90733fb0d8f22 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* CMake: add support for GNU/HurdPino Toscano2022-01-196-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add a "HURD" CMake platform specification, so it can be properly checked in the build system. Set QT_DEFAULT_MKSPEC to the existing hurd-g++ mkspec. Hurd supports $ORIGIN in RPATH, so enable it. Hurd uses X11, so add it to the X11_SUPPORTED list. Enable few more feature checks that apply to Hurd as well: either because they are provided by GNU libc itself, or because they are implemented on Hurd. Check and set the ELF interpreter, as it is a common functionality of the GNU toolchain. Change-Id: Id347033560bbc5a2a4e2c3abb493c948c002b40e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* coin: Move AUTOGEN and tests options addition into a common locationAlexandru Croitor2022-01-196-8/+30
| | | | | | | | | As a drive-by this fixes the qtbase build to also have the CMAKE_AUTOGEN_VERBOSE option set. Pick-to: 6.2 6.3 Change-Id: I32324fb1e8e16299c5f34517edbc7ff335d84e14 Reviewed-by: Toni Saario <toni.saario@qt.io>
* Further improve QShortcut testVolker Hilsheimer2022-01-181-68/+67
| | | | | | | | | | | | | | | | | | Get rid of the function-static main window, which would be destroyed after QApplication if the test is run with a subset of test row (that does not include the TestEnd state test). Make the MainWindow a class member of the test class instead, and rename it from "mainW" to "mainWindow" to avoid shadowing by "mainW" widgets in other test functions. Amends 55928821d1b119112c520af3b83dc9ed210cf5f0. Task-number: QTBUG-99630 Pick-to: 6.2 6.3 Change-Id: I83efce5b54afc3a0027a7c0e63efee6a235af585 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Restore std::as_const() where a qAsConst was lost between 5.15 and 6Edward Welbourne2022-01-181-2/+2
| | | | | | | | | | Amends commit 837a29b0b92c72b7b9d66a427c24a9fa8037f4f4's fix for shadowing to take account of the loss of const-qualification of uiLanguages where it was then used in a ranged-for loop. Pick-to: 6.3 6.2 Change-Id: Ic4021bd9917cb27832a197126cc80a7f384a14a2 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNetworkRequest: Document how Qt handles 301 and 302 status codesMårten Nordheim2022-01-181-0/+5
| | | | | | | | | To make it explicit Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-92909 Change-Id: I8f8dc99628168a566158acef72ae2a5e001eef88 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qt-testrunner: be more clear that it was the test that crashedDimitrios Apostolou2022-01-181-4/+9
| | | | | | | Task-number: QTBUG-99970 Change-Id: Id2d01b6ab7d428356d9dfc953107014791393d35 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add QDial test in tst_baseline_widgetsAxel Spoerl2022-01-181-0/+41
| | | | | | | Task-number: QTBUG-99712 Pick-to: 6.3 Change-Id: Ib133dd4c1395060be2aac4d3ca1b17eaccc24676 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove (set but) unused member from QTimerPrivateEdward Welbourne2022-01-181-3/+1
| | | | | Change-Id: I004fef8ce84cdc74837f674239c05901000bee33 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Turn a condition into a lambda to save needless evaluationEdward Welbourne2022-01-181-5/+6
| | | | | | | | | | | | The public suffix list scanner's utf8encode()'s main loop always worked out whether a character is a hex digit, even when it didn't need to know. Package the computation in a lambda and only test it when it is needed. Also assert non-empty input generates non-empty output. Change-Id: Iaf48aad382624e421cea9c9cdb8bba5fc47b1596 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Conan: Add optional ICU Conan package dependencyIikka Eklund2022-01-181-1/+54
| | | | | | | | | | | | | | | | | | | If the "icu" option is passed for the build then add the optional ICU Conan package dependency. The ICU version needs to be parsed from a file which is provisioned by the Qt CI. If the ICU version can not be parsed, e.g. if "conan export" is being executed outside Qt CI machines, then use a fallback version for it. For the Qt build system to pick up the ICU dependency built by Conan we need to pass the ICU package path via CMAKE_PREFIX_PATH. Pick-to: 6.2 6.3 Task-number: QTBUG-97072 Change-Id: I83059664c59dff68af76da8509e618442b530516 Reviewed-by: Toni Saario <toni.saario@qt.io>
* CMake: Fix qt_run_linker_version_script_support to use active linkerAlexandru Croitor2022-01-182-1/+12
| | | | | | | | | | | | | | | The version script compile test did not use the linker that the build system determined to use to link Qt, but rather the system linker. Run qt_run_linker_version_script_support only after the global qtbase features have been evaluated and make sure to include the active linker flags. Pick-to: 6.2 6.3 Change-Id: I0ff82406828daaf0dc5ec25a55f53ac7d98e3347 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Fix detection of linker availabilityAlexandru Croitor2022-01-184-19/+39
| | | | | | | | | | | | | | | | | | | | Previously we passed flags like -ld-fuse=lld only to compile calls, but not to the link call of a compile test project. Make sure to pass it to the link call instead by using check_cxx_source_compiles + CMAKE_REQUIRED_LINK_OPTIONS instead of check_cxx_compiler_flag. Note the flag that is passed is still via passed via the compiler launcher and not directly to the linker. Remove duplicate flag handling code. Pick-to: 6.2 6.3 Change-Id: I1bf90573904a9df83240b6debfee3cc9e425c6bb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>