Commit Graph

66237 Commits (2dbcb25bfa7157729370d964efb3df582e98239d)

Author SHA1 Message Date
Wang Zichong 2dbcb25bfa QMessageBox: ensure setTextFormat() also apply to informative text
QMessageBox::setTextFormat can set the text format for its text label,
but the informative label will still use its default text format. This
change allow the setTextFormat also apply to the informative label, thus
user can use their preferred format like Markdown in the informative label.

Task-number: QTBUG-122712
Change-Id: I6f7487b29712ca07cee27171453312ff1707eea3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-14 21:40:53 +08:00
Marc Mutz 2ff93ea0ee QRestReply: fix "No relevant classes found." moc warning
QRestReply is no longer a QObject, so remove the includemocs line from
the .cpp file.

Amends 9ba5c7ff6a.

Pick-to: 6.7
Change-Id: I6c0ba6b9e3b82f84f3b509755e7da5b33e607776
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-03-14 11:44:16 +01:00
Alexandru Croitor d644f2e02c coin: Add instructions to build standalone examples
If a qt5.git configuration is marked with the StandaloneTests feature,
tell CMake not to build the examples in-tree, and instead use
qt-internal-configure-examples to build the examples out-of-tree.

This brings a couple of improvements:
- higher chance of building examples as ExternalProjects without
  issues
- ability to use deployment api in examples, without installing the
  examples into a main install prefix

The new coin instructions files use a copy of the standalone tests
instructions as a base.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: If89e6da0b327a38b9c2738f58aa1b5b5fb9fda37
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-14 11:44:16 +01:00
Alexandru Croitor 62905163bf CMake: Allow building all examples as standalone just like tests
Introduce a new libexec/qt-internal-configure-examples script that
allows to configure and build "standalone examples" just like
"standalone tests".

This is a prerequisite for using deployment api in examples for prefix
builds, otherwise deployment api gets confused not finding various
information that it expects from an installed qt.

Because the various conditions in the build system for standalone
examples are similar to standalone tests, introduce a new
QT_BUILD_STANDALONE_PARTS variable and use that in the conditions.
The variable should not be set by the user, and is instead set by the
build system whenever QT_BUILD_STANDALONE_TESTS/EXAMPLES is set.

Unfortunately due to no common file being available before the first
project() call, in qtbase builds, per-repo builds and top-level builds,
we need to duplicate the code for setting QT_BUILD_STANDALONE_PARTS for
all three cases.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ia40d03a0e8f5142abe5c7cd4ff3000df4a5f7a8a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-14 11:44:16 +01:00
Alexandru Croitor d298a05ed1 CMake: Move most of CMakeLists.txt into QtBaseHelpers.cmake
Pick-to: 6.7
Change-Id: I19761dbeebdd2529ef0c493a9a61a1c6fe58667b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-14 11:44:16 +01:00
Marc Mutz ef7b641a3c QTest::qWaitFor: scope a variable tighter
When fa296ee1dc ported this function
from int timeout to QDeadlineTimer, the need to keep this variable
outside the do-while so it could be checked in the loop exit condition
fell away.

Moving the definition of the variable to the first (and only)
assignment makes the code clearer and the variable a constant.

Amends fa296ee1dc.

Pick-to: 6.7
Change-Id: I7a0fe01dc68ff140beeb0e76b141c84d4bd28458
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-14 06:35:42 +00:00
Thiago Macieira 6708107873 Bootstrap: remove unused sources
qiterable.cpp is even a comment-only source.

Change-Id: I01ec3c774d9943adb903fffd17b79d567a435594
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-13 18:48:21 -08:00
David Faure d1aa7b3d19 Remove QObjectPrivate::isSender/senderList, no longer used
Only QAccessibleWidget was using them, and this was changed some time
ago. No point in keeping dead code.

Change-Id: I14bc40e6d87df234987e82385ce13433c2b82744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-14 02:58:02 +01:00
Timothée Keller a88b6bca21 Windeployqt: improve multiple directory warning
The multipleDirs warning was added to avoid surprises related to where
windeployqt would deploy files when using binaries from different paths.
To do this properly, make the warning message more meaningful, and
suppress the warning when the --dir option is specified, i.e. when the
user is already explicitly choosing where to deploy.

Pick-to: 6.7 6.6
Change-Id: Ie2984f4af740776c568610370d49ad4ff85ffff0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-14 02:58:02 +01:00
Thiago Macieira a30824a984 Bootstrap: remove the UTF-16 and UTF-32 codecs
Unlike most of everything else in the Bootstrap lib, this is code that
couldn't be eliminated by the linker because they were referenced in one
static array. Maybe an exceptionally smart whole-program analysis could
do it, but GCC and Clang LTO modes don't do that now.

I removed the code that performed detection from HTML and from data too.
I could have left the detection of UTF-8 and "other" but this code
wasn't necessary. In particular, QTextStream couldn't benefit from it
because it already defaults to UTF-8, so the detection code would never
determine anything different from the input.

Drive-by removed QStringConverter::availableCodecs() too because it was
in the middle of functions #ifdef'ed out to.

This reduced the size of release-mode moc
   text    data     bss     dec     hex filename
1079858    5440     640 1085938  1091f2 original/moc
1074386    5200     640 1080226  107ba2 updated/moc
  -5472    -240       0   -5712         difference

Change-Id: I01ec3c774d9943adb903fffd17b7f114c42874ac
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-03-13 17:29:14 -08:00
Thiago Macieira 6508902d89 Bootstrap: remove qnumeric.cpp by using qnumeric_p.h
That is, use the inline functions that refer to <numeric_limits> and
<cmath> directly, instead of the out-of-line wrappers. Someone should
verify if the hacks for QNX's <math.h> are still required.

Change-Id: I01ec3c774d9943adb903fffd17b7ee560b4b71b9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:14 -08:00
Thiago Macieira d637bc0a5a Bootstrap: remove QDirListing/QDirIterator
Bootstrapped tools don't usually need to list directories; they should
operate on file lists passed to it by the build system instead.

This may deserve a QT_FEATURE.

Change-Id: I01ec3c774d9943adb903fffd17b7ecfba2702fc5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 18:29:13 -07:00
Thiago Macieira c636129c13 Port two tests' QAbstractEventDispatcher overrides to V2
Change-Id: I83dda2d36c904517b3c0fffd17b52c421bf08d5b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:13 -08:00
Thiago Macieira af383319f6 QSingleShotTimer: use the Duration alias from the event dispatcher
Just so we don't accidentally use different precisions. Amends commit
bfc7535a10.

Change-Id: I83dda2d36c904517b3c0fffd17b5258e88dd194e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:13 -08:00
Thiago Macieira f8da484d57 QEventDispatcher*: port the Unix dispatchers to V2
They're all ported in one go because all the changes are the same and
they all rely on QTimerInfoList. The changes are:
 - use Qt::TimerId to uniquely identify timer IDs
 - use Duration (nanoseconds) to specify the timer interval
 - rename registeredTimers() to timersForObject(), which is const

Change-Id: I83dda2d36c904517b3c0fffd17b52958767d8a68
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:13 -08:00
Thiago Macieira 9dc2935462 QTimerInfo: store nanoseconds instead of milliseconds
No change in behavior, other than the ability for the precise timers to
be even more precise. There's a reduction in the stored interval range
from 292 million years to 292 years, but there's no change in behavior
because the timeout is stored as a steady_clock::time_point, which is
nanoseconds with libstdc++ and libc++. Now, if there's an overflow,
it'll happen on the call to registerTimer() instead of inside the
calculation of the wake-up.

Change-Id: I83dda2d36c904517b3c0fffd17b3d1f2d9505c1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:13 -08:00
Thiago Macieira 1ca89b65d8 QAbstractEventDispatcher: port timer uses to the V2 API
Change-Id: I83dda2d36c904517b3c0fffd17b52b71739928dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:13 -08:00
Thiago Macieira afa86c60e6 QTimerInfo: correct CoarseTimer beyond the [20ms,20s] range earlier
Simplifies some code.

Pick-to: 6.7
Change-Id: I83dda2d36c904517b3c0fffd17b3d18f2dfbc2b3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:12 -08:00
Thiago Macieira 7ce75b1a2b QAbstractEventDispatcher: add an adaptation layer to use V2 methods
This way, we can begin using the V2 methods now, regardless of whether
the concrete dispatcher class has been ported or not.

Change-Id: I83dda2d36c904517b3c0fffd17b52a6256b083af
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:12 -08:00
Thiago Macieira af6afad3b3 Short-live QAbstractEventDispatcherV2
This class is a temporary hack to enable transition to an API based on
std::chrono for the Qt event dispatcher. In Qt 7, it will be merged with
QAbstractEventDispatcher, replacing the pure virtuals there with the
ones defined here.

The new API differs from V1 in the following ways:
 - uses Qt::TimerId instead of int to identify timer IDs, so we can't
   accidentally confuse them with something else
 - uses Duration (nanoseconds) to specify the interval, instead of a mix
   of int and qint64
 - add the missing const to remainingTime()
 - rename registeredTimers() to timersForObject() (I'd have kept the
   original name but we can't overload the name if the parameters are
   exactly the same; we could have used QT6_DECL_NEW_OVERLOAD_TAIL, but
   I think the new name is actually better)

Because the old API was mixing int and qint64, we didn't officially
support any timer for more than 2^31 ms (~24.85 days). This should
extend the valid range to 292 years once the dispatchers are ported
over.

Change-Id: I83dda2d36c904517b3c0fffd17b3a7e0afef4b59
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 17:29:12 -08:00
Thiago Macieira d18d8a7ad1 tst_QHostInfo: increase the timeout to 15s
That seems to be enough for me when trying to reverse-resolve host names
inside the corporate network.

Pick-to: 6.7
Change-Id: I6818d78a57394e37857bfffd17bc6b0ebd39f51b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-13 18:29:12 -07:00
Thiago Macieira 78cf5740a9 tst_QHostInfo: don't use the test class to store results
Because QHostInfo is threaded, so if the look up times out and we exit a
given test, the results may still be delivered to the next test.
Especially if the next test is also about to time out -- in which case
it doesn't and prints a nonsensical output.

Before:

FAIL!  : tst_QHostInfo::lookupIPv4(WithCache:literal_ip4) '!QTestEventLoop::instance().timeout()' returned FALSE. ()
   Loc: [tst_qhostinfo.cpp(220)]
FAIL!  : tst_QHostInfo::lookupIPv6(WithCache:aaaa-single) Compared values are not the same
   Actual   (tmp.join(' ').toLower())     : "192.0.2.1"
   Expected (expected.join(' ').toLower()): "2001:db8::1"
   Loc: [tst_qhostinfo.cpp(281)]

Now:

FAIL!  : tst_QHostInfo::lookupIPv4(WithCache:literal_ip4) 'helper.waitForResults()' returned FALSE. ()
   Loc: [tst_qhostinfo.cpp(278)]
PASS   : tst_QHostInfo::lookupIPv6(WithCache:aaaa-single)

Pick-to: 6.7
Change-Id: I6818d78a57394e37857bfffd17bc66e241cab24d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-14 01:29:12 +00:00
Alexandru Croitor fb69efb9c9 CMake: Make a few more auto tests standalone
Pick-to: 6.7
Change-Id: I80988114bd906447a2ab712d5432a489e095a5c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-14 01:14:18 +01:00
Joerg Bornemann 2cf66d49ef configure: Fully remove support for -c++std c++14/c++17
This amends commit 205f8fbff0.

We silently supported the values c++14 and c++17 for the -c++std
argument. Support for both versions of the C++ standard was removed in
above mentioned commit.

Change-Id: I8f7dbc33f0a23164f712ac3d2e0a40bb8d12f225
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-13 20:43:14 +01:00
Anton Kudryavtsev e10c9b5c0f QTextMarkdownImporter: use string view more
to reduce allocations. While touching code, reorder condition
and extract string literal to remove magic number

Change-Id: I3972097dc9b976438e9ba0029f674cea2614f966
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-13 19:34:23 +00:00
Anton Kudryavtsev ed553b720d QTextDocumentFragment: use range for more
to improve readability

Change-Id: I42109e33fc076763c5b681d4837a81399c5aed5d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-03-13 22:34:23 +03:00
Tatiana Borisova 1cd95e3165 QCborValue: use new comparison helper macros
Replace public operators operator==() and operator!=() of QCborValue
to friend method comparesEqual().
Replace public operator<() of QCborValue to friend method
compareThreeWay().

Use QT_CORE_REMOVED_SINCE to get rid of current comparison methods
and replace them with a friend.

Delete #if 0 && __has_include(<compare>) blocks,
since they are not required anymore.

Task-number: QTBUG-120300
Change-Id: I884ff6ce2a71618b0e3eaa907f0852f93c2a073c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-03-13 20:34:22 +01:00
Alexey Edelev e7d7eded4c Fix the condition for creating of the plugin init target aliases
Make sure that plugin_init_target is not empty. It's empty when
creating qml plugins.

Amends 566b726b84

Pick-to: 6.7
Change-Id: If23998d50d8d31e20b3966730afb8b4b46b9990c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-13 19:34:22 +00:00
Ivan Solovev 5ea434b09f QOperatingSystemVersion: use partial ordering for relational operators
QOperatingSystemVersion intentionally does not define operator==() and
operator!=() since ae072cd9c4.
It means that we cannot use comparison helper macros.

Still, we can manually define four relational operators or
operator<=>() in C++20 mode, and give the class a partial ordering.
We choose partial ordering, because versions of different OS types are
incomparable.

Implement the operators in terms of helper function compareThreeWay(),
which potentially allows to use this class in some templated code.

As a drive-by: make the static compare() function noexcept, because
it really is.

Fixes: QTBUG-120360
Change-Id: Id4c9ce740e42baa719ca0ee84146d087b21675c6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-13 20:34:22 +01:00
Ivan Solovev e55ee873e9 QTypeRevision: use comparison helper macros
QTypeRevision consists of two quint8 values: major and minor version.
Each of the versions can be unknown.
The rules for comparing with the unknown version are as follows:

 zero version < unknown version < non-zero version

At the same time, two unknown versions are considered equal.

This makes the comparison a bit tricky, but it still fits into the
category of strong ordering.

Replace the existing friend relational operators with helper functions
and comparison helper macros, making this type strongly ordered.

Update the unit-tests to use the new comparison helper test functions.
As the test functions check the reversed arguments as well, we can
reduce the number of rows for the data-driven comparison test.

Fixes: QTBUG-120359
Change-Id: Ib6f1037fc7b5fed148e35ee48b56b05dcd36b3b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-13 20:34:22 +01:00
Ivan Solovev 81dcb7c8be QTypeRevision: convert comparison test to data-driven
This patch simplifies the checks when migrating the class to comparison
helper macros.

Task-number: QTBUG-120359
Change-Id: I47a6ba20d3b89c31edc2f432621eae9385fbd0a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-13 20:34:22 +01:00
Thiago Macieira b57a9a3cd9 Bootstrap: remove QTemporaryFile
Done by harmonizing the use on the QT_CONFIG(temporaryfile) macro and
fixing one test that was missing. We can't remove the older macro
because it is marked PBULIC) but we don't need to use it ourselves.

Change-Id: I01ec3c774d9943adb903fffd17b7eb4dd1a4e63f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-13 09:41:02 -08:00
Tinja Paavoseppä 7942f7eedf Android: Resize QWindow when its QtView is resized
If the Android View is resized, the QWindow instantiated by it
should be resized accordingly.

Task-number: QTBUG-122626
Pick-to: 6.7
Change-Id: I7bfbca149f927718d1e28cdabfa8759afbd06039
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-13 15:50:14 +00:00
Tinja Paavoseppä d899cdb3a4 Android: Synchronize window creation in QtEmbeddedDelegate
Qt window loading is initiated either when the QtView is attached
to its Android window, or when the Android QPA plugin has been loaded
and is ready, depending on the order. Since the window attachment
happens in the Android UI thread, and the Android QPA plugin callback
happens in Qt thread, add synchronized block to make sure the execution
stays ordered.

Fixes: QTBUG-122626
Pick-to: 6.7
Change-Id: Id476032f02aa8990432a02f62b6bf6237a17e7ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-03-13 15:50:14 +00:00
Kai Köhne 39c4c868a4 Use canonical capitalization of Unicode-3.0 SPDX tag
The SPDX database lists the license as 'Unicode-3.0', and 'Unicode
License v3'. Now, the SPDX standard actually says that

   License identifiers (including license exception identifiers) used
   in SPDX documents or source code files should be matched in a case-
   insensitive manner.

But the website at https://spdx.org/licenses/ doesn't treat it this way,
so the link we generate out of the identifier actually gives a 404. So
it's just easier to use the 'original' capitalization.

Amends 063026cc50

Pick-to: 6.5 6.6 6.7
Change-Id: I826077a914721b7b9499ad62c08fdf20be94e88d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-03-13 14:43:10 +00:00
Assam Boudjelthia 4bb4d015f7 Android: don't add lib prefix to loaded libs unconditionally
Some libs don't necessarily have the lib prefix in their names,
3rd party libs and Qt for Python might have that, so no need to
always add that prefix to loaded libs is the lib name already
contains a .so suffix.

Fixes: QTBUG-123286
Pick-to: 6.7 6.7.0
Change-Id: Ib65215d9b4410c5c9e00aa0642f48ab45c92fe03
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-03-13 18:43:10 +04:00
Paul Wicking 08e6d4b43d QDoc: Drop default arguments from some \fn documentation strings
In the \fn commands for a limited number of methods in the
documentation for Testlib and Widgets, `= 0` is passed as default
argument instead of `= Qt::KeyboardModifiers()`. Until QDoc with Clang
17, inclusive, QDoc generated the correct signature. However, with
Clang 18, QDoc outputs `= 0` in the documentation. While strictly
speaking still correct, this change impacts the documentation
negatively in terms of readability.

Dropping the default argument from the \fn command ensures that QDoc
generates the right signature with both Clang 17 and Clang 18.

Task-number: QTBUG-123130
Pick-to: 6.7
Change-Id: I94ccec2f2c9a02241095fb5b18feb74aa55f97e1
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-03-13 15:43:10 +01:00
Mikko Hallamaa 342ae435a1 OpenGL: Add parameters to choose FBO grab orientation
We want to be able to pass as an argument whether the texture grabbed to
an FBO is supposed to have a flipped y-axis or not. This is required for
screen capture on the EGLFS platform.

Task-number: QTBUG-121835
Pick-to: 6.7 6.6 6.5
Change-Id: I6dddc879a4be7ff2c2c189747193423644be55a0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-03-13 14:38:52 +00:00
Alexey Edelev 8db0a12e84 Collect CMAKE_MODULE_PATH from QT_ADDITIONAL_PACKAGES_PREFIX_PATH
This is sensitive for the 'include' calls that expect cmake scripts
to be found in some staging prefixes. In yocto
QT_ADDITIONAL_PACKAGES_PREFIX_PATH points to the package image
path(installation snapshot). If repo provides bundled 3rdparties
the 'include' statement that includes 'FindWrap<3rdparty>ConfigExtra'
is unnable to locate it, since it's expected to be found in Qt
installation, but the file didn't land there at ptest stage.

Fixes: QTBUG-122205
Pick-to: 6.5 6.6 6.7
Change-Id: Idd03f44efd2e3fdaa476873068c73ac28cd0a7b5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-13 15:38:52 +01:00
Giuseppe D'Angelo 3a6c8e02b6 Long live QT_ENABLE_STRICT_MODE_UP_TO
We already have fine-grained macros to individually disable APIs
that we consider "suboptimal" or "dangerous". This commit adds
a shortcut for the user to set all such macros in one go.

QT_ENABLE_STRICT_MODE_UP_TO is versioned, just like
QT_DISABLE_DEPRECATED_UP_TO; the idea is that users should set it
to the minimum Qt version they want to support.

Also, if QT_DISABLE_DEPRECATED_UP_TO is not set, then
QT_ENABLE_STRICT_MODE_UP_TO will set it as well, to the same value.

[ChangeLog][QtCore][QtGlobal] Added the QT_ENABLE_STRICT_MODE_UP_TO
macro.

Change-Id: I5466465986104e047a6a86369928be9294f24ab7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 13:08:29 +01:00
Giuseppe D'Angelo 03baf08d2b QT_NO_AS_CONST: rename and add docs
Give it a name in line with the function name:
qAsConst -> QT_NO_QASCONST, as already done for qExchange.
We can do this because we never documented the macro itself.
So, while at it: also document the macro.

Change-Id: I6eb0834df438e4f4e818ef2cf8e702ed156dc253
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 13:08:29 +01:00
Giuseppe D'Angelo 5fe805dcfb QT_NO_QEXCHANGE: doc fix
A \relates was missing.

Change-Id: I30c8a721b2d1e38ac87bebac37aef5a350dfe683
Pick-to: 6.7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 13:08:28 +01:00
Lucie Gérard 05ed4a85bf Correct license for statically compiled helper file
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I19222cbe8a45a27853933191677f433dd0a60771
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-13 13:08:28 +01:00
Marc Mutz 92eb2f691b QGuiApplication: copy a Prealloc value instead of hard-coding 16
The EventPointMap QPointingDevicePrivate::activePoints is actually a
QVarLengthFlatMap<., ., 20>, not 16, so copy the value instead of just
hard-coding something.

Amends 296ede3aab.

Change-Id: Ic8e83f4095f57be74f7708d5cec6a19971772b76
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 10:23:52 +00:00
Marc Mutz 73c52ba268 QTest::qWaitFor(., int): restore lost Qt::PreciseTimer'ness
Before the qWaitFor() port from int to QDeadlineTimer, the
implementation constructed a QDeadlineTimer internally, passing int
timeout and Qt::PreciseTimer. The int overload that was retained for
source-compatibility, however, constructs the QDeadlineTimer without
the PreciseTimer flag, which is a behavior change.

Restore the Qt 6.6 behavior and pass Qt::PreciseTimer.

Amends fa296ee1dc.

Pick-to: 6.7 6.7.0
Change-Id: Ib8e5b912c74b70d32a77195edb0d2a30cd7c241d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-13 11:23:52 +01:00
Marc Mutz 097f0edc9f QLibrary: fix Clazy warning about QString(const char*)
Wrap dlerror() in QLatin1StringView(), like we already do in
unload_sys().

Amends a6a5681470.

Pick-to: 6.7
Change-Id: Ia8c91d6962c74d5916c47b2abbb3920f051c8e5e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-13 11:23:52 +01:00
Piotr Wiercinski 05f4a77e17 wasm tests: Use WebDriverManager to install chromedriver
Use WebDriverManager to install the correct version of chromedriver.
This will help avoiding mismatch of Chrome/chromedriver versions,
which sometimes happen in CI.

Fixes: QTBUG-122729
Change-Id: I40cf62c02c2cb6f57b031cc83b9fa38f6ed2610e
Reviewed-by: Simo Fält <simo.falt@qt.io>
2024-03-13 09:19:48 +00:00
Thiago Macieira 9e214cbcdd Bootstrap: remove QRandomGenerator
The bootstrapped tools really mustn't produce random output (they must
always be reproducible exactly). Therefore, ensure we don't need this
file.

Change-Id: I01ec3c774d9943adb903fffd17b7eb94dbd4be89
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-03-13 00:00:48 -08:00
Thiago Macieira cdbc76360a Bootstrap: remove QVariant
I added QT_NO_VARIANT to qconfig-bootstrapped.h to be clearer on what
the #ifs are, but there's no testing of that feature outside of
QT_BOOTSTRAPPED.

Change-Id: I01ec3c774d9943adb903fffd17b7e8ac4340fb89
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-13 00:00:48 -08:00
Thiago Macieira 4be7c046b1 Bootstrap: remove QDataStream
It was only used by the cmake_automoc_parser so it would write a 64-bit
in big-endian format. So bypass QDataStream and write it native
endianness.

Change-Id: I01ec3c774d9943adb903fffd17b79c78e56db4cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-13 00:00:48 -08:00