The highligh color we have looks too different to what system menus
have. Accent color seems to be better matching this color, though
it's not really what we can see in menus, which are transparent and blend
with watever lies below them.
Fixes: QTBUG-75386
Change-Id: I03f66808eb885594862ad9b31398cae4ca186593
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add the CONFIG value c++2b that represent the upcoming C++23 standard.
Add QMAKE_CXXFLAGS_CXX2B and QMAKE_CXXFLAGS_GNUCXX2B.
On MSVC, use /std:c++latest when c++2b is active.
This fixes an issue with MSVC where c++latest implied the /std:c++20
compiler flag.
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-102202
Change-Id: Ie00ee5793c1a649195013c8c19efc8d59cf0acc9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
QNX tests are run under QEMU so have the same problem as Ubuntu.
Pick-to: 6.2 6.3
Task-number: QTBUG-100928
Change-Id: Id7c7639b743062c777502e2ba8b28f9bb18deb19
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Removes some #ifdef'ery.
Also remove the unneeded dtor. While this is a polymophic class, it's
not in a header, so we won't run into the scenario described in
QTBUG-45582.
Pick-to: 6.3
Change-Id: I1a8598402ff2a564cc53da2f85ed3ed00ca3ddbf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
As all other 20+ users of the state variable, use a relaxed atomic
load under the protection of the mutex. There's no need for the
loadAcquire() that the implicit conversion operator uses under the
hood, because a) we're under mutex protection and b) the state doesn't
guard any other data but itself.
Found by disabling said implicit conversion operators.
Change-Id: I2a76242271cec96175cde503ca883805db6b9212
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Since the class is exported, both ctors from source_location (std and
experimental) need to be in the DLL, otherwise a Qt built with C++20
(using std::source_location) may break C++17 users that, however, have
experimental::source_location (and therefore expect the DLL to export
it).
This is exactly the same issue we had with QPolygon and
QVector::begin() with and w/o QT_STRICT_ITERTORS, therefore the same
fix applies, with the difference that we don't need a separate TU here
to inject the missing symbols, because both versions can be
overloaded.
[ChangeLog][QtCore][QPropertyBindingSourceLocation] (Windows only)
Fixed a binary-incompatibility where source_location constructors were
missing in the ABI.
Pick-to: 6.3 6.2
Change-Id: I4a514565cceea5f92975eff3a3e936efa5f7d8da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It's one of our best tools to improve compile times.
Can't backport to Qt 6.2 because the macros don't exist there.
Pick-to: 6.3
Task-number: QTBUG-102206
Change-Id: I80734b4d43928fce0e66329b5b897a2738db9b30
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It's one of our best tools to improve compile times.
Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.
Task-number: QTBUG-102206
Change-Id: Ib8224ed60afa893744f369fe7394d27e89b66c11
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
These are sometimes needed for passing objects on
to native API.
Change-Id: I89a1a95e6d51932ae3b49eec072261bcb5dbb463
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Android permissions query blocks Qt main thread. If the input method
was activated before the permissions query started, android would try
to invoke input method before returning back to permissions query.
This will cause a deadlock.
Fix the issue by moving the deadlock counter to Qt core and
incrementing the value before the permissions query. This will prevent
the input method queries to enter Qt main thread.
Fixes: QTBUG-99484
Pick-to: 6.2 6.3 6.3.0
Change-Id: I54ea59578880cde4095c26fa2a6a264c4dc1b7ff
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The signal can be emitted not only when user fonts are added or removed,
but also when the system fonts change.
Change-Id: I8f066ac87e7bc68843cd9014cd3c31af2f3a7890
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
If a test returns 0 but writes an XML logfile that contains FAIL or a
corrupted XML file, then qt-testrunner considers it a CRASH and exits
with 3.
Previously any test execution returning 0 (success) was considered
a PASS. Changing this behavior with this patch finds a lot of test
crashes on Android (QTBUG-100470), because the tests are run indirectly
on the emulator and the test wrapper process could not detect the crash,
thus returning 0 to qt-testrunner. But the corrupt XML file is caught
now.
Likewise, if a test returns != 0 but the XML logfile contains only PASS,
qt-testrunner considers it a FAIL. This used to be the case but now
tests are added.
Finally changed logging for such cases from INFO to WARNING.
Task-number: QTBUG-100470
Change-Id: I404c9d2211c7de027bf776d1914519d37f513ca1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The macro enables tabbed content in the online style
only. It's usage must be gaurded with a conditional
block as shown in the following example to handle
the offline style usecase:
\if(onlinedocs)
\tab {build-qt-app}{tab-cmake}{CMake}{selected}
\tab {build-qt-app}{tab-qmake}{qmake}{}
\tabcontent {tab-cmake}
\else
\section1 Using CMake
\endif
CMake-specific instructions go here
\if(onlinedocs)
\endtabcontent
\tabcontent {tab-qmake}
\else
\section1 Using qmake
\endif
qmake-specific instructions go here
\if(onlinedocs)
\endtabcontent
\endif
Pick-to: 6.2 6.3
Change-Id: I02d50c057280a9ffea913642284e67ddcda7aa94
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The printed lib path did not appear when building the project with the
Unix Makefiles generator.
Make sure the printing does not depend on the shell used by the
generator, by making it VERBATIM.
Amends 39f657032b
Pick-to: 6.2 6.3
Task-number: QTBUG-101653
Change-Id: I3853bbed3b121ecdc8b2e9da42eb3399f347b8c2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
To do that, we install the example binaries into a new directory
rather than the main install dir.
The contents of the dir is not archived by the Coin agent.
This decreases the size of the binary artifacts.
This will be especially important when the examples contain deploy logic
which will install the shared Qt libraries next to each example binary.
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: I0b112698514309bb9b0794ce4117e8bf30c3a819
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Originally, QT_INTERNAL_EXAMPLES_INSTALL_PREFIX was added to
control the installation of examples when they are built as
ExternalProjects, and was not considered for the non-EP case because
we hoped to switch entirely to EP-based building.
Due to some unsolved issues regarding using EP builds in CI, add the
ability to control the installation of non-EP examples.
This will be used in the CI to allow removing the hacky
INSTALL_EXAMPLEDIR and INSTALL_EXAMPLESDIR assignments in example
projects.
It is also likely that we will not deprecate the non-EP based
building, because it is useful for IDE integration (EP targets
are not as developer-friendly to work with in an IDE in regards
to rebuilding).
Amends 98c89c8cc1
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I02264aaa1daa2c80bb9ef3d02b1831b4ca5d2b84
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
to QT_INTERNAL_EXAMPLES_INSTALL_PREFIX so it's clear that the
variable only affects the location of where examples
are installed.
And make sure the paths are passed as CMake paths.
Amends 1031fa1547
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ib92c55488b736d980da2bd88255de78e183de824
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
By default when building ExternalProjects, even if the main ninja
invocation has -v passed, that won't be passed to the nested ninja
calls.
When building examples in the CI, we want to see the full command line
invocations.
Allow passing -v to the nested EP ninja calls by configuring Qt with
-DQT_INTERNAL_VERBOSE_EXAMPLES=ON, which we will use in our CI.
We don't want to add -v by default because if the main ninja does not
have one, the nested calls will still be verbose.
Pick-to: 6.2 6.3
Change-Id: Ifd4b312c6eaa7354e8870f4fb0a77fadf0f33ab7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
So we can see the command line invocations of the built cmake
auto tests.
To achieve that, we create a ninja shell script wrapper, because
ctest --build-and-test does not currently allow specifying custom
build tool options.
Details at
https://gitlab.kitware.com/cmake/cmake/-/issues/22443
Pick-to: 6.2 6.3
Change-Id: I7fb3b7f7f802943a7013c859b2cf39842a34e2e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Read the ANDROID_<SDK|NDK>_ROOT environment variables in qt toolchain
file and use them to chainload the android toolchain file.
Pick-to: 6.2 6.3
Change-Id: I1940ffbaa557974fc26005f4d051030f2cc5c7e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Adds multi-threading to span handling routines in
qdrawhelper, effectively multi-threading almost all fills.
Also increases the number of spans processed at a time to
make the multithreading wider.
Change-Id: Iad04e187f880666855bebcd87d668f6c6fb5db7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This makes it easier to understand which plugin and theme are loaded.
Change-Id: I0eee395e1b7da5d5017d8f7839beefb547fdc7b0
Pick-to: 6.2 6.3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In Qt 6, QByteArray can hold more than two GiB of data on 64-bit
platforms, so QBuffer should be able to handle writes of more than two
GiB, too. But the implementation didn't check for overflow and held
sizes in int variables, so it happily reported success but wrote data
only mod INT_MAX.
Fix by carefully avoiding overflow and using size variables of proper
type.
[ChangeLog][QtCore][QBuffer] Fixed silent data truncation when writing
more than two GiB at once on 64-bit platforms.
Pick-to: 6.3 6.2
Fixes: QTBUG-102171
Change-Id: Ib666f9f7db24495b4ed64191a48b35edc410f7e9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is part of a series of patches deprecating implicit conversions
of QAtomic<T> variables to T.
Use relaxed atomic loads and stores on the 'isDebugging' variable. The
old code used the implict conversions to and from int and therefore
loadAcquire/storeRelease. Here, the int is the only value, it's not
guarding the construction of any other data, so relaxed loads and
stores suffice.
A further optimization would be to make the initial value of
isDebugging 0, to send it into the BSS instead of the TEXT/DATA
segment, but seeing as this is just compiled in for the auto-tests,
this patch leaves that particular change for another round (or never).
Pick-to: 6.3
Change-Id: Ide92f6c1a12137fcbc3ec15e146f6dcbdb6b481b
Reviewed-by: David Faure <david.faure@kdab.com>
It's one of our best tools to improve compile times.
Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.
Task-number: QTBUG-102206
Change-Id: Iae9d4017a984c845a76d0b9b088ad3e467fe1d54
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Use fromRawData() to create a QByteArray-as-a-view instead.
Pick-to: 6.3
Change-Id: Ic6083ec438bc089a6f11d7e4718eca72c0d51fe3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The function-call operator of QGlobalStatic creates the payload object
unless is has already been deleted. When performing read-only
operations on the payload object, it's better to use
QGlobalStatic::exists() + the dereference operator instead, because
that prevents the creation of the payload just to find it empty.
Pick-to: 6.3
Change-Id: I367add516520d076412cbbc542ee7a3b6ea45c14
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Unlock the QReadLocker after we're done with the registry, before we
perform expensive operations such as I/O and QByteArrayList::join().
Pick-to: 6.3
Change-Id: I96549c517a2b4ffe34a70ea83f8c061ff9620795
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This reverts commit b39d3cfe30.
Reason for revert: the test fails in dev again
Task-number: QTBUG-87404
Change-Id: Icc51e36e037e9c7e8154266def129dd8ad412775
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Fix the documentation to pass Qt::NoButton instead 0 to
QGraphicsItem::setAcceptedMouseButtons() since 0 is no longer accepted
by QFlags.
Change-Id: Ib98d509382e5b5407a07c74565adb7ee5afbb35f
Pick-to: 6.2 6.3
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
To allow other cases to run while finding the reason. Most of these
cases fail only on CI and not locally.
Pick-to: 6.3 6.2
Task-number: QTBUG-102043
Change-Id: Ib552ab00b4232f6aabdf85acf050633251d9e71d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The native dialog window is not being hidden or destroyed when the
QAndroidPlatformMessageDialogHelper object is destroyed. This makes
sure to not leave any native dialogs open.
Pick-to: 6.2 6.3 6.3.0
Task-number: QTBUG-97482
Fixes: QTBUG-101758
Change-Id: I2e50caebd286ea6abd3e948a4873dc3c971626a4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Update docs and add tests.
[ChangeLog][QtCore] Documented existing support for 'F' format when
converting floating-point numbers to strings in QLocale::toString(),
hence equally for QString's floating-point formatting. Previously it
was supported but the documentation neglected to mention it; it only
differs from 'f' for infinities and NaN.
Change-Id: Ic946c0f7b9e86fdf512daa3124bea57fc664b34b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The testing of infinity and NaN somewhat duplicated existing tests in
tst_QNumeric and, in any case, belongs there.
Change-Id: I6b5d1ff9767daf8e4bbe0025d3efab3d74ed35de
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Replaces 0, 0.0, 1, 1.0 and 2.0 with zero, one and two constants of
the templated floating-point type, to avoid type-conversions which
might have meant the test only checked doubles, or similar.
Change-Id: Id9d4488f0cc7226b5b8958d2a204a76fe5ae469d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Use the modern "portable" _clearfp() and _controlfp(), that work
regardless of the hardware MS is running on, rather than the
x86-specific _clear87() and _control87(); and move some defines into
the #if-ery context in which they're used, rather than defining them
regardless of whether they're used.
Change-Id: I13abf2c85525b1182b99bc2c366aadd6b5fc656f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Instead of QSKIPing the whole test, ignoring what was already tested
Change-Id: Iced928ce1bce92b447c8698a9942973cb78b6c15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Both QByteArray and QString can contain more than 2^32 elements on 64
bits platforms, so the warning does not apply any more.
Change-Id: I4604c1fe225922a0df7e78135eeb5a1e2b84fea3
Pick-to: 6.2 6.3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Use a view of the line, within the larger data buffer, to avoid some
complications.
Change-Id: Iaf79068487ac6b92fe9e415fb63f6b0e9ad0c5a2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
MSVC 19 does not allow using constinit on thread_local objects of
non-trivial type:
https://developercommunity.visualstudio.com/t/C:-constinit-for-an-optional-fails-if-/1406069
Instead of revoking Q_CONSTINIT for that compiler or removing
Q_CONSTINIT from such variables, add a new macro for this situation,
so the constinit static assertion will still be checked on other
platforms.
Amends 32692667a6.
Change-Id: Ic2247768b0d64e0c01648cffc9532fe5bd4bbd5d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Same ole trick[1] as usual: Instead of an array of pointers (causing
relocations), declare an array of strings (char arrays; not causing
relocations).
[1] http://library.bagrintsev.me/CPP/dsohowto.pdf, Section 2.4.3.
As for storage requirements: We pay a few bytes per entry for extra
padding, as not all entries have length seven, but we save the
per-entry pointer variable, so sizeof(void*) bytes per entry, too, so
on 64-bit, at least, we're guaranteed to come out ahead.
Needed to replace nullptrs with empty strings here, and adjust the
sole user to check for emptiness instead of nullness.
Pick-to: 6.3 6.2
Task-number: QTBUG-100536
Change-Id: I4f07d72116eda2ebf1fdb327133f315417e2b0f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Documentation of QNetworkProxyFactory::systemProxyForQuery does not
include the libproxy integration, and may be misleading by hinting that
desktop environment integrations on other systems are unsupported.
Add this piece of information to the documentation to avoid
misunderstanding.
Pick-to: 6.3 6.2
Change-Id: Id3f14d4a617c25576cb1bd57a494ea77c882635d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>