Restore 'QT_STAGING_PREFIX' logic when generating
'qt-cmake-standalone-test'. Relative paths now calculating depend on
'QT_STAGING_PREFIX'. For prefix builds QT_STAGING_PREFIX should be
prepend to '__qt_cmake_standalone_test_path'
Fixes: QTBUG-88764
Pick-to: 6.0
Change-Id: I655c60847f2ab872948cfe9aedc27835e5cc4fb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
...and include it in QtBuild.cmake.
Commit e8d8b1a5e4 added two different code paths to include
QtBuildInternalsAndroid.cmake.
This was needed, because:
In a top-level build, we must not include files that are not yet
installed. We have the source tree available, and
"${QT_SOURCE_TREE}/cmake" is in CMAKE_MODULE_PATH.
We can use the "module syntax" of the include() command.
In a per-repository build, when building against an installed qtbase, we
must not include files of the source tree, because that's not guaranteed
to be available. However, Qt6BuildInternalsConfig.cmake is installed,
and we can directly include QtBuildInternalsAndroid.cmake, which is
right next to it.
We can circumvent this whole issue by moving the Android-related
functions out of the Qt6BuildInternals package and including it in
QtBuild.cmake.
Pick-to: 6.0
Task-number: QTBUG-88718
Change-Id: I5192ba19bb77952505c20d053d7285f798d16ac5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
One test in tst_qfiledialog2 only succeeded if the directory "~/foo"
did not exist. This patch changes the path used to "~/Vugiu1co"
which has hopefully a much lower probability of existing.
The string "Vugiu1co" is taken from a call to "pwgen".
Pick-to: 6.0
Change-Id: Ia82b07902a91eb908a74aa90cdbdf4761d432d9a
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
tst_qlibrary depends on a library (targets mylib and mylib2) to be
built. They create a library with the same name, in two versions.
This is done in order to test versioned library loading.
However, those two libraries were fighting over the creation of
"libmylib.so". In a fresh build, mylib2 wins, as intended. But after
a rebuild, mylib won, which led to failing unit tests.
This patch changes the situation. With this change, mylib no longer
tries to create "libmylib.so". Thus no fighting and no problem.
Pick-to: 6.0
Change-Id: Id89baa5503c9f078a8737ff0b8616edf09044f72
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We need this to enable headersclean functionality to work with CMake
<=3.18 which is our minimum required CMake version to build
Qt (it's not a problem for 3.19).
Otherwise we hit a configuration error while trying to evaluate
generator expressions for INTERFACE only libraries for which we need
to do the headersclean check (e.g. UiPlugin in qttools).
Sample error message:
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "QT_NO_ENTRYPOINT" is not allowed.
More info:
https://gitlab.kitware.com/cmake/cmake/-/issues/21484
Naming it lower case avoids the issue, but is inconsistent with all
our other public property names.
Furthermore if we do this change, it should probably go to 6.0.0 due
to it being a property that a user is meant to set in their project.
Task-number: QTBUG-82615
Change-Id: I1f1439f1e5cbc816010eba7301605a8f60b88fd1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6ca66de9120537134b63d42de6c53c6e5834e8f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function may take a wildcard expression, not a general regular
expression.
Pick-to: 5.15
Change-Id: Ia7ba3bac47c310bc035620583b9d2102fdc5ffb0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Two unit tests fail at the moment with the offscreen theme because
the font function of the offscreen theme does not return a monospace
font when asked for a monospace font. This patch fixes it.
Change-Id: Id682c75e2a94b246cffe97b342b1b562bac82a68
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The comments in enumdata.py indicating macrolanguages meant nothing to
me, until I stumbled on a reference that lead me to ISO 639's usage of
the term. Add a minimal explanation to save such confusion for others.
Change-Id: Ia1d849d93a1d94c04c8c461debdecf879e9a7db5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Qt container overview documentation contained outdated information
on container growth strategies. This patch updates the documentation
to reflect the current implementation.
Task-number: QTBUG-86584
Pick-to: 6.0
Change-Id: I8fd014138f9a2e73925dafaa270d4c98ab672d96
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
When we are using the offscreen plugin, there might or might not
be a working system tray icon. This patch disables the unit test in
that case as we do not know what to expect.
Change-Id: I34fded516300cc9aab1eb67644dcef8631ecfdf1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
- Add test for static hash() method
- Add tests for addData() overloads
- Add input data for sha384 and sha512
Task-number: QTBUG-88183
Change-Id: I7e16419b3a582468fd1de15613e1157af428bc4c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The conditions are AND, not OR. Technically we don't rely on
not having constructors any more, but we may reserve the right
in the future to have uninitialized resizes.
Change-Id: Icfae61079a544f7ac8e90a32ad605c12cfa8b4aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit bcd38a96149f5397375b57e948c05c7a8f172194)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The scope of the variables 'bind', 'field', 'i' can be
reduced if the variable 'meta' is a null pointer. So
declare the variables when the variable 'meta' is valid.
Change-Id: I599406c034168dd73799c69dfb9c5e676861cdf2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
A layout takes ownership of the QLayoutItem passed to addItem.
Change-Id: Iea3c64453f3cbf4f1b5660e505c1a35dca537833
Pick-to: 6.0 5.15 5.12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
tst_qlibraries needs to test libraries to be built in order to run
successfully. However, these libraries were not mentioned as
dependencies in CMake.
This patch fixes that.
Fixes: QTBUG-88445
Pick-to: 6.0
Change-Id: Ic335e46664edd98217bd55a9bca5a58a39cffe66
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
By extending (a bit) an auto-test to cover paths found by LCOV. All of them
is just to trigger the code that checks input parameters.
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I62f9a9045038ff8d123fd1396f4bfd85e75c6d8f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
By adding auto-tests that were missing/not triggering the paths found
by LCOV.
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I472f59e8e7292786c80d7c8dcebde53a2982e1ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Restrain patterns to sensible lengths and values.
[ChangeLog][QCosmeticStroker] Pen patterns are restrained to a
maximum length and values of 1024, fixing oss-fuzz issue 25310.
Pick-to: 5.12 5.15 6.0 6.0.0
Change-Id: If062f8336ff5ad113258391b0d70b8ac6f42c4b3
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When multi-config build, the output directory of Qt6EntryPoint.lib is
<build_dir>/lib/Release, the output directory of Qt6EntryPointd.lib is
<build_dir>/lib/Debug. This behavior is different from other lib files.
Both release and debug lib files should be outputted to <build_dir>/lib.
Pick-to: 6.0
Change-Id: I81d284e4630afebb40ba90fe822dd5bda2b2036a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Not testing the result of the copying, just verifying that it doesn't
assert.
Pick-to: 6.0
Change-Id: Ib51129134b74c17eada7e3819ccfff10bb9affbf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
C++ allows overrides to return a covariant type, so if calling code has
already cast the callee down to the right type, don't require it to cast
the returned clone down as well.
Pick-to: 6.0 6.0.0
Change-Id: I802f00a3c78e03047046986d0ed0a479b47573b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Some of the new functions were added without documentation, or without
updating the docs to mention the optional calendars. Shuffle the
methods so that the one with calendar is what the primary
documentation comment describes and the one without is documented as
an overload.
Pick-to: 5.15
Change-Id: Iee4cdb1d3b0ed21a50e205a5275a0695a2667550
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Commit 9e0fb9c4fb introduced build
failures in non-top-level builds when building Qt modules against
qtbase.
This was observed on in the CI for CentOS.
Partly revert above commit by taking the old code path for non-top-level
builds.
Fixes: QTBUG-88718
Change-Id: I8926e1e4628ec5bdcea99e10497c1f65c10d072d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 510186a218e63c88100efc38cb1611f122f94570)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This information is required in the QML engine to handle list properties
(instances of QQmlListproperty<T> and list<T> types from QML).
Pick-to: 6.0.0 6.0
Change-Id: I1e30572f1c91f58b290cb9b4b07433af99a1db6f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
[ChangeLog][QtCore][QFuture] Add convenience functions to create
a ready QFuture and a QFuture with an exception
Task-number: QTBUG-86713
Change-Id: Ic7f9ca590a8ea8a9696b84f35bad074780794461
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This also fixes the cursor changing during resize mode
Fixes: QTBUG-85361
Pick-to: 5.15
Change-Id: Ic85a5c31a8a2dc4265a84f16fd5fcdc231062c6d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Two issues here, timestamp value was getting smashed, and
MouseButtonDblClick was not getting sent.
Fixes: QTBUG-85712
Pick-to: 5.15
Change-Id: I912e968f1eb0fb9c6f4cf8548b114e23d182396e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Suppress warning:
..\tst_qprocess.cpp:272:13: warning: 'void childProcessModifier(int)'
defined but not used ...
Change-Id: Idf601df78be256cfbee0ca80252d1c364c712c8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
[ChangeLog][QtCore][QMargins] QMargins is usable in a structured
binding.
[ChangeLog][QtCore][QMarginsF] QMarginsF is usable in a structured
binding.
Change-Id: I0c501847b9377c47bd0e63da3735792075bd0079
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By unconditionally removing the existing entry we never
hit the if (result.initialized) branch. Change it to
only remove the existing entry if we don't plan on inserting.
Task-number: QTBUG-88183
Pick-to: 6.0 6.0.0
Change-Id: If4e7ebac23aa63d4b9d4b0a22882dd7d90a58e8b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Coverage tests revealed that
QAnyStringView::compare(QAnyStringView, QAnyStringView, CaseSensitivity)
was not tested in our unit tests. This patch adds a test for this.
Pick-to: 6.0
Change-Id: Id8e0d8af87e7e7ab192fb7554a278ddbb890fb14
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_qprinterinfo compared the output of "lpstat -p" with the
result of a call to "cupsGetDests". "lpstat -p" only returns local
printers, "cupsGetDests" also returns printers on the local network.
This patch fixes the test by using "lpstat -e", which also
shows printers on the local network.
Pick-to: 6.0
Change-Id: Ia70adad8b8467f4c738f769d34757786fc9645b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's nice not to leave garbage in QPointingDevicePrivate::activePoints
between events; on the other hand, this garbage doesn't matter, because
every press event sets the target and window independently, without
caring what was stored there from before. But it was wrong to clear
it before we've even delivered the TouchCancel event.
Pick-to: 6.0
Pick-to: 6.0.0
Change-Id: I924039a7c7a8ed75f420d1837c63dc19d3cc98b6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As of 19f9b0d5f5 we define a protected copy
constructor and assignment operator. Static analyzers warn about missing
move variants, so delete those in addition.
Pick-to: 6.0 6.0.0
Change-Id: I28c1a2afd4560ce35a258bde507dafd93245b75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QFont::fromString() needs to differ between strings
produced before and after Qt 6.0 when interpreting the
weight value, since in older strings this will be the legacy
scale.
Luckily the number of tokens in the string can be used for this
purpose, since many tokens were added in Qt 6.0.
This broke KDE, where font settings are stored in QSettings
and serialized using QFont::toString() from Qt 5.
Fixes: QTBUG-88589
Pick-to: 6.0.0 6.0
Change-Id: I199737fed61917f8b9d8f86176ead29a89eb8e0c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Once user-defined margins are set on a layout, there's no way
to unset them, except by abusing setContentsMargins and passing
-1, which is a total API abuse (does a negative margin mean that
contents *overflow* the layout?). Add a proper function.
[ChangeLog][QtWidgets][QLayout] Added unsetContentsMargins().
Change-Id: I089788a7470f9649a8f00e42914dafb7242f12cd
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Ensure the resulting QScFixed values are no larger than can
be safely returned to int after shifting the fixed factor
away.
Pick-to: 6.0 6.0.0
Fixes: QTBUG-88683
Change-Id: Id0754b021e5fa9a3cf0d15e37ac643cfc1509993
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
For consistency, apply the following renamings:
QT_NO_MAKE_EXAMPLES -> QT_BUILD_EXAMPLES_BY_DEFAULT
QT_NO_MAKE_TESTS -> QT_BUILD_TESTS_BY_DEFAULT
QT_NO_MAKE_TOOLS -> QT_BUILD_TOOLS_BY_DEFAULT
BUILD_EXAMPLES -> QT_BUILD_EXAMPLES
BUILD_TESTING -> QT_BUILD_TESTS
This should help to better convey the difference between "BUILD" and
"NO_MAKE".
To configure tests, but not to build them by default, pass the
following to CMake:
-DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF
Analoguous for examples:
-DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF
Tools can be excluded from the default build with:
-DBUILD_TOOLS_BY_DEFAULT=OFF
The variable BUILD_TESTING is still available and initialized with the
value of QT_BUILD_TESTS.
Pick-to: 6.0 6.0.0
Change-Id: Ie5f29dfbdca8bfa8d687981dfe8c19c0397ca080
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Just shows how bad an idea to call this function it is.
Pick-to: 5.15
Fixes: QTBUG-88653
Change-Id: If51855da004b4f3fbf43fffd1648fc294065160d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>