65876 Commits

Author SHA1 Message Date
Marc Mutz
2f7cdec2c9 tst_QNetworkReply: use QtCore's QScopedPointerDeleteLater
... instead of rolling your own.

Pick-to: 6.6 6.5
Change-Id: I4fee2218eb874bfee34bd3a0abac3f85b0746540
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 17d2550ed09c564977d4e9414f60c5514ce4f76a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 23:54:10 +00:00
Marc Mutz
2ec659b175 QSignalSpy: fix indexed loop (int instead of qsizetype)
While a signal with more than 2Gi arguments is only a theoretical
possibility, still use the correct index variable for the indexed loop
over this QList<int>.

Pick-to: 6.6 6.5
Change-Id: I2ed33238c2cd9d2d1c39cd29c988a2adfd821897
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a90c3cc3c7ed24c83b9ffa4020cb3652678b36bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 23:54:06 +00:00
Marc Mutz
beabcc5436 QObjectPrivate::Signal: initialize all members
A recent change in that area triggered Clang-SA to rescan the code and
complain about this pre-existing bug: If receiver == nullptr, then the
`previous` member was never initialized.

Fix by null'ing it using NSDMI. This is a trivial type, the compiler
will be able to avoid the redundant write.

Amends ab92b9e40025dcf08c14232de762a268201a78b4(!).

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ideed71f0f36d5f896fb6a4614f233757c1371ee3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 40714c1ddd886f6d0bde53e05f27d6b3e9e6649b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 23:54:04 +00:00
Paul Wicking
611366f1ba Doc: Fix QDoc syntax in bindable properties overview
Drop the \c command when in front of \l commands as that doesn't work.

Pick-to: 6.6
Change-Id: I0aa092461807e068e9c2368f5d6f04e77b56c910
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: James DeLisle <james.delisle@qt.io>
(cherry picked from commit c8fb376de50683c81cbf64b4422058d4dd2e9f07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 16:56:25 +00:00
Lucie Gérard
8d1d4f9479 Rename files for header generation
Task-number: QTBUG-121039
Change-Id: I45eec26e93e5aa3e4a08ef4b326427338f63e3f2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 402e47745636a36419b021385f137f5ceaa65f48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 15:33:12 +00:00
David Faure
67487f004c QObjectPrivate: fix data race on ConnectionData contents
The atomic pointer "connections" is always populated under
mutex in QObjectPrivate::ensureConnectionData() but isn't necessarily
read under mutex protection (e.g. in maybeSignalConnected()).
This caused a data race, fixed by using storeRelease and loadAcquired.

Task-number: QTBUG-100336
Pick-to: 6.6 6.5
Change-Id: Ifd605e65122248eb08f49e036fdda6e6564226bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 75d82afa0d3aad9b4f9857e439535fc49c4616bc)
2024-03-20 13:22:16 +01:00
Alexandru Croitor
665fd3848f CMake: Allow configuring a minimal subset of examples to deploy
When building examples as part of Qt in the CI, it's best to skip
running deployment for all examples to save resources
(space and time).

Add a QT_DEPLOY_MINIMAL_EXAMPLES option similar to our
QT_BUILD_MINIMAL_STATIC_TESTS option, which will set
QT_INTERNAL_SKIP_DEPLOYMENT at the root examples directory scope, to
skip deployment for all examples.
Each example can then opt into the minimal subset by unsetting the
QT_INTERNAL_SKIP_DEPLOYMENT variable before its
qt_internal_add_example call.

Add Coin instructions to enable this option when building our examples
in the CI.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-102057
Change-Id: I2efcda455b400c27fe1efd1bcf81b133137fa2d1
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 224b7c6b6a2a425487df19643709d105e8f3cdd5)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:16 +01:00
Alexandru Croitor
bc227037b8 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>
(cherry picked from commit d644f2e02ce36520b4d101ea03fbbcf1b72e7e6f)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:15 +01:00
Alexandru Croitor
7b4c6ff81d CMake: Fix finding standalone parts config file for yocto
When building standalone tests of qtsvg targeting yocto, the
standalone parts config file was not found.

That's because it specifies a new CMAKE_STAGING_PREFIX for each built
repo, and the QtSvgTestsConfig.cmake file will be located there,
rather than in QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX, where
the QtBuildInternalsConfig.cmake file is.

So in this case, we always have to prefer looking into
CMAKE_STAGING_PREFIX for the file.

Amends 62905163bf887c2c2c9ba7edcd64c96d237a6e95

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I8902381afa4267e40dfb2ad47e44285a806a35e2
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 270315e019a569bebf83e7c293b44f36c555fb3c)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:13 +01:00
Alexandru Croitor
4b63662c45 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>
(cherry picked from commit 62905163bf887c2c2c9ba7edcd64c96d237a6e95)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:11 +01:00
Alexandru Croitor
5f242ab804 CMake: Adjust QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES for EP examples
Make sure to consider all qt_prefixes for adjusting
QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES with locations where qml plugin
config files might be present.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I5a7eec434635db1953871d735e2420c331ccee48
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 06fef6219e992489dae15e9851725e1675ff0bf6)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:09 +01:00
Alexandru Croitor
97ec9e9742 CMake: Allow specifying additional glob paths for QmlPlugins.cmake
Currently we hard-code to look for qml plugin Config.cmake files
in the current list dir, whether the Qt6Qml directory is.

This is not sufficient for finding qml plugins in a prefix build of a
repo that has not been installed yet.
For example qtquick3d plugins will be in
qtquick3d_build_dir/lib/cmake/Qt6Qml/QmlPlugins, which
won't be picked up by the Qt6Qml Config file in the installed Qt
location.

Allow specifying extra qml plugin glob prefixes via a new
QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES variable.
This is similar to QT_ADDITIONAL_PACKAGES_PREFIX_PATH.

Any path specified via QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES
will have the
 QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake
glob appended to it, and then used for globbing files in that
location, after processing the main location wherever Qt6Qml is.

This will be used by ExternalProject example machinery.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I469863c965b8b13cf007c611976a64fbff6e9111
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 40fa36db22b67363a4a05a4d74b0fcfc2f4833b8)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:07 +01:00
Alexandru Croitor
ec9b70c561 CMake: Disable ExternalProject examples for -debug-and-release builds
Unfortunately when using CMake <= 3.27 together with
-debug-and-release, it's not possible to reliably build examples as
external projects due to clobbered files in the same build dir.

Disable building examples as EPs in such a case.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Icea9fdab47986c2608e1952a0bbae72365ac7a62
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c668dd4044283b6eac86f7ab8177595e207567d7)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:05 +01:00
Alexandru Croitor
0c38013c71 CMake: Adjust CMAKE_MODULE_PATH for ExternalProject examples
When building EP examples for a repo that defines a bundled library,
we need to make sure the relevant FindWrapBundledFooConfigExtra.cmake
file is found when looking up dependencies.

For a prefix build, that file is placed in the build dir of the repo.
Use the list of qt_prefixes that includes the build dir of the repo,
append lib/cmake/Qt6 to it and pass that as additional values to
the CMAKE_MODULE_PATH variable of the external project.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I85d5f360380856fcfb8be7235b8365dcf15aa0c0
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 31c5d50e84b210843ccdec58a86c4fce3125b679)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:03 +01:00
Alexandru Croitor
a94fef3e04 CMake: Fix syncqt IMPORTED_LOCATION path for multi-config builds
When building examples as ExternalProjects as part of a multi-config
qtbase build, syncqt can not be located with the following error:

CMake Error at Qt6CoreToolsAdditionalTargetInfo.cmake:10 (message):
   Unable to add configure time executable Qt6::syncqt
   qtbase/libexec/syncqt doesn't exist
Call Stack (most recent call first):
  qtbase/lib/cmake/Qt6CoreTools/Qt6CoreToolsConfig.cmake:44 (include)
  qtbase/cmake/QtPublicDependencyHelpers.cmake:65 (find_package)
  qtbase/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:34
      (_qt_internal_find_tool_dependencies)
  qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:42 (include)
  qtbase/lib/cmake/Qt6/Qt6Config.cmake:165 (find_package)
  CMakeLists.txt:13 (find_package)

The Qt6CoreToolsAdditionalTargetInfo.cmake file is used both for
install(EXPORT) Config files as well as export(EXPORT) Config files,
and in the latter case, the path that syncqt is looked up in is not
correct because syncqt is not yet installed.

In addition to checking whether syncqt exists in the install path,
also check if it exists in the build dir.

Ideally the additional path would be stored in a separate file that
is not installed, but the current code infrastructure does not provide
such a feature. Because we store a relative path instead of an
absolute path, the build path does not leak, so the situation is
bearable.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I16ad5c280751e050bc9b039ebd38ec9a66a6554c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cc537d927b23a34296767fec8d3885a95f714255)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:57:01 +01:00
Alexandru Croitor
a33732ab74 CMake: Pass CMAKE_MODULE_PATH to external project examples
Some examples depend on FindWrapFoo.cmake scripts that are part of
a repo. An example is qtgrpc with FindWrapProtoc.cmake.

These need to be available when building external project examples in
a prefix build where the repo is not installed yet, and thus the
source dir FindWrap scripts need to be used instead.

Make sure to pass the value of CMAKE_MODULE_PATH to the external
projects to ensure these scripts are found. CMAKE_MODULE_PATH is
populated by qt_set_up_build_internals_paths as part of the
qt repo build.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I3e977919bc137ed60e8eb9300625e5d8b87b373e
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 20bd9fad1cf6d41c773056949e334c3ab75e8b1c)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:56:59 +01:00
Alexandru Croitor
e67704c40f CMake: Allow passing extra variables to external project examples
In some repos we need to be able to pass extra cache variables to find
3rd party packages when building examples as external projects.

Introduce QT_EXAMPLE_CMAKE_VARS_TO_PASS to allow passing vars like
OpenSSL_ROOT or Protobuf_ROOT if they are set in the repo project.

It should be noted that QT_EXAMPLE_CMAKE_VARS_TO_PASS expects a
special syntax for its values, of the from VAR_NAME:CMAKE_TYPE, due
to the pre-existing implementation on how we pass variables
to ExternalProject.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ie3e74d4fde106f947d12e51d27e41a310157aab6
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 43d0c5ed6ef666b4ef9f33c018240f551fb6ebae)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-20 09:56:57 +01:00
Liang Qi
167287e11a xcb: Avoid recreating xcb window in QXcbWindow::requestActivateWindow()
12203e94f5a34b59b6a7389402c854e823135a35 exposes the issue in xcb
qpa plugin.

We should not recreate xcb window via the call of focusWindow->winId().

Fixes: QTBUG-123032
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I6da4f3e64a9d7a92a2aab714591986c5d128fbd4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 23a906335e0d8a03388bbd73db43682c724d04a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 01:24:06 +00:00
Tor Arne Vestbø
5195c6683d iOS: Use UIWindow bounds for fullscreen/maximized geometry on macOS
In modern iPad apps, windows can be moved between screens, just like
regular macOS apps, but we don't reflect this as changes to the QWindow's
screen, meaning the screen() is not reliable input when computing
a window's full screen or maximized geometry.

In addition, when running iOS apps on macOS as "Designed for iPad",
the system will scale the UI down by 77%, to better match metrics
(fonts, sizes) to the macOS environment. Classes like UIView and
UIWindow are oblivious to this scaling, and will think they are
larger than what they really are on the screen. However, UIScreen,
for some reason, reflects the actual screen size, instead of taking
part in the "inflated" view of the world.

As a result, even if screen() would reflect the correct screen the
window is on, we can't use the screen geometry for clamping the
window geometry, as the two have separate coordinate systems.

We could scale up the QScreen geometry accordingly to work around
this, but we don't know if the UIScreen behavior is a bug or not,
so instead we skip the screen() as input and use the UIWindow
bounds directly.

Task-number: QTBUG-121781
Fixes: QTBUG-106709
Pick-to: 6.6 6.5
Change-Id: Ie734fc477b37a7e39e6fb16d7738d3f69731a975
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2da738f03589b2bb53e921b5fec347bdd6b68b16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-20 01:24:06 +00:00
Ulf Hermann
24cc41f77f Suppress bogus warning from gcc 12
It says:

/home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h: In function ‘auto QtPrivate::sequential_erase_with_copy(Container&, const T&) [with Container = QList<void (*)()>; T = void (*)()]’:
/home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h:383:14: error: ‘D.282000’ is used uninitialized [-Werror=uninitialized]
  383 |     const T &tCopy = CopyProxy(t);
      |              ^~~~~
cc1plus: all warnings being treated as errors

We can avoid storing the value into a const ref to silence this. Storing
a non-const pointer into a const reference is quite confusing anyway.

Fixes: QTBUG-123486
Pick-to: 6.6 6.5
Change-Id: I77fcd871724ce7f81b9567603dc5b4cb31f121c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4662e80755b3002585280cfe9076d2c6c14f1e5b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 21:26:34 +00:00
Marc Mutz
a6fba61545 tst_QSignalSpy: check (thereby suppress) intended runtime warnings
Use QTest::ignoreMessage() to prevent the runtime warnings being
printed, cleaning up the test log, and to document that they're
intended.

Pick-to: 6.6 6.5
Change-Id: Ia0ba888cce83529217642be0e7e321d9406ba386
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ce913bff5df668787dc904469fca09763acf0f27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 20:09:59 +00:00
Marc Mutz
24c2b8f8ab QSignalSpy: fix C'n'P mistake in a qWarning()
The warning for the new-style signal constructor was copied from the
old-style signal constructor, but not adjusted to its new home. The
signal pointer passed here is not the signal "name", but a signal
"pointer" (-to-member-function, but no need to go into that much
detail).

Amends 6fc7d76e7309c01a364b0f72d253735366674f29, but not picking to
very strict LTS branches, just in case someone has a
QTest::ignoreMsg() installed on it.

Pick-to: 6.6 6.5
Change-Id: Ia1f6b7001f38202ac72f9945c4a822d81562cdbf
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7565034aadf955537be908a94e4cef16096a041f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 20:09:52 +00:00
Alexandru Croitor
cf932db57f CMake: Recompute QT_DEPLOY_PREFIX for each built example
The current deployment api implementation sets the value of
QT_DEPLOY_PREFIX based on CMAKE_INSTALL_PREFIX, if no QT_DEPLOY_PREFIX
was previously specified.

This does not work properly when multiple examples are placed in the
same subdirectory and are using deployment api.

Make sure to unset the QT_DEPLOY_PREFIX for each
qt_internal_add_example call, so that a correct prefix is computed for
each example, based on the modified CMAKE_INSTALL_PREFIX value that we
set for each example.

Task-number: QTBUG-102057
Change-Id: I931e5f2d683ab94a940e20a2bdfeaa4ac5d8c5f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c5d0e93199beea314e4e4607c8ef5f7c29162666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 19:41:43 +00:00
Alexandru Croitor
c7be15e717 CMake: Add option to allow skipping app deployment when building in CI
We would like to add deployment api calls to all our examples.
Doing that in the CI, where we build all examples, would mean running
the deployment tools for each example. This takes time and space.

Add the option to skip running deployment code by setting the
QT_INTERNAL_SKIP_DEPLOYMENT variable.
This can be set per-directory or at the root directory.
In that case we will generate an install script that does nothing.

With this option, we can ensure we run deployment for a few examples,
but skip it for the rest.

Also skip running the deployment api for non-prefix builds, because it
only partially works. In such a case, show a warning. The warning
can be hidden by setting the QT_INTERNAL_HIDE_NO_OP_DEPLOYMENT_WARNING
variable. This might be revisited in the future.

The newly introduced helper functions are also meant to be used in
qtdeclarative.
qtbase only uses one of them, because currently it does not contain
POST_BUILD deployment logic.

Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-102057
Change-Id: If5a4102137e9dfc4a8bfde7b26d511ed1700340e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c90964788cb1d6ffbfde6e9dc930bbb3e915fb98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 19:41:43 +00:00
Alexandru Croitor
d7b4937e24 CMake: Evaluate genexes for extra deploy file paths
Since d08fa86e63448377dde4297bc94680a9d7daaaeb we add extra deploy
files with target file information.

The file paths contain a $<CONFIG> genex to handle multi-config
builds. These were not evaluated in the DeploySupport file content.

Add a TARGET_GENEX_EVAL genex around the TARGET_PROPERTY genex, to
ensure they do get evaluated.

This avoids an error like:
 include could not find requested file:
   C:/Users/qt/work/qt/qtbase_build/.qt/QtDeployTargets-$.cmake

Amends d08fa86e63448377dde4297bc94680a9d7daaaeb

Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: Ia3898c31d80b82bdb25fe733fc73b45c6d689ed0
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a6965441d72a1e453d80d0083c1a3fd6803d96bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 19:41:43 +00:00
Chris Lerner
ed8b651143 Correct a typo in the reference documentation of D-Bus Chat example
In the sentence "Users connect and send message to each other",
change "message" to "messages".

Pick-to: 6.6 6.5 6.2
Change-Id: Ib4d0991d314cd300a56def8797cac604fa88ea35
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 379f23cfdc5f28557de516d837895b27364354df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 13:28:01 +00:00
Tor Arne Vestbø
8ee25c66d9 Reparent QWindow children when reparenting QWidget
When a QWidget was reparented, we would take care to reparent its
backing QWidgetWindow as well, into the nearest QWindow of the
new QWidget parent.

However we would only do this for the reparented widget itself,
and not any of its child widgets. In the case where the widget
has native children with their own QWindows, the widget itself
may not (yet) be native, e.g. if it hasn't been shown yet, or
if the user has set Qt::WA_DontCreateNativeAncestors.

In these scenarios, we would be left with dangling QWindows,
still hanging off their original QWindow parents, which
would eventually lead to crashes.

We now reparent both the QWindow of the reparented widget (as
long as it's not about to be destroyed), and any QQWindow
children we can reach. For each child hierarchy we can stop
once we reach a QWindow, as the QWindow children of that
window will follow along once we reparent the QWindow.

QWindowContainer widgets don't usually have their own
windowHandle(), but still manage a QWindow inside their
parent widget hierarchy. These will not be reparented
during QWidgetPrivate::setParent_sys(), but instead
do their own reparenting later in QWidget::setParent
via QWindowContainer::parentWasChanged(). The only
exception to this is when the top level is about to
be destroyed, in which case we let the window container
know during QWidgetPrivate::setParent_sys().

Finally, although there should not be any leftover
QWindows in the reparented widget once we have done
the QWidgetWindow and QWindowContainer reparenting,
we still do a pass over any remaining QWindows and
reparent those too, since the original code included
this as a possibility.

We could make further improvements in this areas, such
as moving the QWindowContainer::parentWasChanged() call,
but the goal was to keep this change as minimal as possible
so we can back-port it.

Fixes: QTBUG-122747
Pick-to: 6.7.0 6.6 6.5
Change-Id: I4d1217fce4c3c48cf5f7bfbe9d561ab408ceebb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c956eb8eddb1b3608d7e3d332fbe55df5ec41578)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-19 13:28:00 +00:00
Tor Arne Vestbø
51ef5b0d65 cmake: Propagate Apple platform build requirements to qconfig.pri
So we don't have to maintain the requirements in two places.

None of the variables removed from the qmake configs are
referenced before we do load(qt_config), so this should
be safe.

Change-Id: Iabd5884a2fd1c4b1cd7b44416bebb2624050229e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 640a3f24741dbd50cc5aff425c81d09f908054b4)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-19 09:56:22 +00:00
Mitch Curtis
78b7b0472c Doc: explain how to check for the existence of a font family
bb6d68703b67e042e2a7254c2ca6a004a1441cc5 fixed warnings in the
Universal style by using a faster alternative. It's possible that users
will run into these warnings too, and they should be provided with
information to make a more informed choice about which approach they
can use.

Fixes: QTBUG-123360
Pick-to: 6.6 6.5
Change-Id: I4170e9ade40c4b54dbc2bd73d124b2ade4d8c939
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit ce9f06c1579efda7ae0d259bfaa565f99d89e4f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 06:44:13 +00:00
Yifan Zhu
56247e4a32 qxkbcommon: fix isKeypad
This amends a34e81ab8be6445877e040b1afb85deeaa725f86 .

The previous range comparison doesn't work since XKB_KEY_KP_9 is 0xffb9
while XKB_KEY_KP_Equal is 0xffbd. Change to an explicit switch.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I3a340bac61fb074eef505ef9b06300a6468877f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit daa5f7bd5f3951e459f10666a8001c8a0076e827)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 00:52:42 +00:00
Tor Arne Vestbø
eefb27bb3f iOS: Remove NSView.safeAreaInsets wrapper
The API is available on all iOS versions we support nowadays.

Pick-to: 6.6 6.5
Change-Id: Ia58c5ad1649e7e6b22f9c56a809e2455586a8e5a
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a89a916377f774ea55b43afc56cb89070097883f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-19 00:52:40 +00:00
David Faure
3b428d6f28 QSignalSpy: fix data race between wait() and emit from another thread
Detected by TSAN in tst_QThread::terminateAndPrematureDestruction()
but better have a dedicated unittest, with values emitted by the signal
and recorded in the spy.

Pick-to: 6.6 6.5
Change-Id: I141d47b0ea0b63188f8a4f9d056f72df3457bda5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c837cd75936cbeeb898dd5808edb9dfaf716a76e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 23:55:25 +00:00
Thiago Macieira
9ffed81b15 QDBusArgument: disambiguate between QMap on std::pair and std::map
For QMap on a std::pair, QMap::iterator{}.operator->() would result in a
type that has "first" and "second" members: std::pair itself. But it
would be wrong to marshall and demarshall the first and second elements
thereof as the key and value, so give preference to the .key() and
.value() selection, which would store the std::pair as the type.

Fixes: QTBUG-123401
Pick-to: 6.6 6.5
Change-Id: I6818d78a57394e37857bfffd17bd69bb692dd03b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5401a9a6cd3263eda15911c3fbfc81ebea2e798f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 23:30:17 +00:00
Øystein Heskestad
fbdcae954e QHttp2Connection: Send error for CONTINUATION without preceding data
Send connection error type PROTOCOL_ERROR when receivng CONTINUATION
frames without any data received from previous HEADERS or PUSH_PROMISE
frames, instead of assert.

Task-number: QTBUG-122375
Change-Id: Ib14e4610692dc4832b1f3e99dca497d9baf3d9d3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 89467428f8173524083fd7d2cca9c2985141d567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 20:39:06 +00:00
Marc Mutz
bf7eff0188 QTest::qWaitFor: scope std::chrono using directive tighter
... moving it away from between a comment and the C++ code the comment
pertains to.

Change-Id: I56b3ded01d1800bae19121e4b9340d0c43f1da85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c1d1437b4a8609f4b6e7eb5f39352d4951b4f507)
2024-03-18 21:39:04 +01:00
Marc Mutz
449551eea1 QTest::qWaitFor: move ceil<> to after the check
There's no reason to check whether the timer has expired after
rounding the timer's native nanoseconds up to milliseconds, so delay
the ceil<ms> operation to after the timer expiry check.

As a drive-by, protect the std::min call from Windows macros with the
parentheses trick and employ C++17 if-with-initializer.

Remove the break-if-expired, as it now obviously duplicates the while
exit condition.

Change-Id: If30421012143640c75a9a44fe711d0c1c7cd23b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 59549657a3699b5ea963b7cdc0bd69f08ab6513a)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-18 21:39:04 +01:00
Liang Qi
2a6015914c Fix dangling references - GCC 14
This amends 18def77d27f88ce26b6af29fe56a80429fed555d .

Pick-to: 6.6 6.5
Change-Id: Icadf46326f1fda1bdbcd40d101170581e510b87a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8a6750475410629741de0417c28f574c25c65338)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 20:39:04 +00:00
Thiago Macieira
fa601afd52 qfloat16: further disable the -Wfloat-conversion warning
It shows up in our headersclean mode.

Fixes: QTBUG-123374
Pick-to: 6.6
Change-Id: I6818d78a57394e37857bfffd17bcf9e350dc493c
Reviewed-by: Simo Fält <simo.falt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 58796ac177cde3f558aec92c00e7ee8e174ba228)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 20:39:04 +00:00
Mårten Nordheim
305deaca22 Http/2: fix active streams counting
We were looking at all active streams, but that also includes promised
streams.

By the RFC the limitation that our peer specifies only applies to the
number of streams _we_ create, not the total amount of active streams.

More importantly, for the qhttp2protocolhandler it could mean that we
could end up having a few promised streams push the active stream count
over the limit, which could lead us to start more streams than intended
(then bounded by the number of queued requests).

The worst case in this scenario is that a **non-compliant** server
doesn't track how many connections we open and the user has queued
a ton of requests, so we open a ton of streams.

But on the upside: server-push is not widely used.

Change-Id: I2a533472eb9127fd176bb99e9db0518f05c3fffe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5ed736b053eb9d04ecd1a6f2f375cce7fcefe4e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 16:42:41 +00:00
Ulf Hermann
933d695ecb QProperty: Destroy binding when refcount is 0
This has to be done from all places where we deref it. Otherwise we leak
memory.

Pick-to: 6.6 6.5
Fixes: QTBUG-116086
Change-Id: I57307ac746205578a920d2bb1e159b66ebd9b2cc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 717dc9450ffc13ef8209a10073552ac4574a4160)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 16:42:35 +00:00
Mårten Nordheim
fb5ff98d32 Http2: fix streamsToUse logic
The settings frame with the max streams might be received late
or be revised later, so we cannot assert something on the
relation with the max streams allowed.

Amends 22c99cf498103c86baa5a415ca34630396e5b6aa

Change-Id: I973dfcf91541becc8c3d6363f9065bb1b9183062
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit b0b2b7d39d9689dfdcb69394d2c1b3a3e20f9999)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 16:42:35 +00:00
Mårten Nordheim
50af22aa8d tst_qnetworkreply::httpConnectionCount: tentatively increase timeout
It is failing a bunch on macOS in CI, but not locally.
So just assuming the timings are too tight in CI and increasing
them.

Amends 8de1ed89797cabc883b5651673daa747f6ee9c0e

Change-Id: Icb44fdbd2aa117de7350c5df2e8351bb19c865c4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 88763730cc9bc5929e0ff2af0a78276636bc91ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 16:42:29 +00:00
Eskil Abrahamsen Blomfeldt
cdee812bdb Fix default hinting with dpr scaling on Wayland
When high-dpi scaling is enabled, we default to HintNone
currently, since otherwise text layouts (and widget layouts
and anything depending on text size) will have to be updated
when the window is dragged onto a screen with a different dpr.

The check for whether scaling is enabled was based on
QHighDpiScaling::isActive(), which is technically incorrect
since this does not return whether there is a scale on the
painting, rather whether the coordinate system in Qt matches
the one of the platform.

Now that we support agreeing on fractional scale factors with
the Wayland compositor, this issue has become visible, since
QHighDpiScaling::isActive() will now return false for these
compositors, even for fractional scales. For integer scales,
the issue existed before as well, but the kerning issues are
less noticeable in that case.

Pick-to: 6.6
Fixes: QTBUG-122910
Change-Id: Ic82b07d57a06a351255619f9227dd60396903ade
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
(cherry picked from commit e7ddd490cf44ecd1c59b3798294ed2812fc5a940)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 14:19:16 +00:00
Axel Spoerl
359b648280 Documentation: Clarify palette/font/stylesheet inheritance/propagation
Palette and font changes made by a style sheet are propagated to
existing widgets and their children at change time.

Palette and font changes made by setPalette() and setFont() are
inherited by all existing and future children of the widget to which the
call was made.

Clarify this in the documentation.

Fixes: QTBUG-122588
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ic40d96fc1e5e4507f84a33138303b7193948d3fe
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f2b681dc590c7fd3cd19cbde20363339ceae15f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 14:19:14 +00:00
Edward Welbourne
28911a81d4 Condition inline fromString() definitions on datestring feature
Amends commit 41f84f3ddb780ec751e3fc706dd242fc4a99de7a - QDate and
QDateTime declare fromString() methods only when feature datestring is
enabled. So their inline implementations should also be conditioned on
that feature.

Pick-to: 6.7.0
Change-Id: I84fc877001d3fc97c6ca149864e4ad5a2dbabe87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1618ff825c2198705fedde9c284a0c52bcce5b89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 13:59:42 +00:00
Mårten Nordheim
a3ee0db4bf tst_qfuture: Update EXPECT_FAIL msvc condition
It is passing on my machine with Visual Studio 17.10 Preview 1.
But only with C++20 enabled.

Pick-to: 6.6 6.5
Task-number: QTBUG-101761
Change-Id: Ia5af3d75d35dda1df9b39bdc94f07dd746ff60af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6c0be8acc44df9eec2c64527696bb137650124ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 13:59:40 +00:00
Øystein Heskestad
b71a4b9a2f QHttpConnection: Create new streams returns error when ids are exhausted
CreateStream returns a new error code, StreamIdsExhausted, when next
stream id counter exceeds max stream id instead of assert.

Task-number: QTBUG-122375
Change-Id: I653b20c24c1429fe88d476beb1ca952aa1bbb320
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9b386127a091ff12229709b4a60ad6d4e8b05512)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 13:17:29 +00:00
Eskil Abrahamsen Blomfeldt
5b3fd5e9d2 Revert "Don't do font merging for PUA characters"
This reverts commit fc33fea999365c36ed446eee0db0d59d94be306b.

The change caused issues with system-wide PUA fallbacks on
platforms where this is supported. It needs to be replaced by
an approach which still falls back, but only for fonts which
are explicitly categorized as PUA fallbacks.

Pick-to: 6.6 6.5
Task-number: QTBUG-110502
Change-Id: I985a1f8076645593c50e81759872b4227d0fcd0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 4913511d3bf8ec7838f80fbfe92c0fe900b2f003)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-18 11:12:02 +00:00
Ahmad Samir
8e8b300337 QCommandLineParser: remove redundant #ifdef from unittest
C++11 has been required for a long time.

Pick-to: 6.6 6.5
Change-Id: Ib6c1571b100dd4eb8194d515f2180ca26481b556
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 66dd00dcfd8a715ff6bc736e6beb5f2d3b2c69cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-16 14:41:15 +00:00
Shawn Rutledge
091ce6477c Revert default FlickDeceleration to 1500
At the time of bb1f616ff19586225cd712195ca78bfc64944103 the
Flickable.flickDeceleration property still applied to both touch
flicking and mouse wheel scrolling. In qtdeclarative
b1766d9d629f61d824146e69f1f3b319cbee3d11 we decoupled them. Switching
from the traditional 1500 logical pixels/sec² to 5000 was not enough to
satisfy those who complained about the mouse wheel "not being linear"
and at the same time made touch-flicking feel too sluggish. So let's
restore the traditional default deceleration value.

The flickDeceleration property is still adjustable, and the default
can still be overridden in any QPlatformTheme subclass.

[ChangeLog][QPA] The default value for the platform FlickDeceleration
hint is reverted to 1500 (rather than 5000 as in Qt 6.6). This sets
the default value for Flickable.flickDeceleration, which can be
overridden directly; and the default can also be overridden in any
QPlatformTheme subclass.

Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-52643
Task-number: QTBUG-97055
Fixes: QTBUG-121500
Change-Id: If52b61dfcd0c08a7c6e753f39dbe01f417e94bf4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ed66cf8a045cc65e13d951b0ff41abff634935bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-16 04:47:14 +00:00