Commit Graph

62939 Commits

Author SHA1 Message Date
Mikolaj Boc
a6d40467de Make IDB settings work sync with JSPI
IndexedDB version of QSettings will now use solely the sync versions
of data access functions. Those will suspend with JSPI.
This makes IDB settings conform to the QSettings contract - and also
allows us to enable tests in tst_qsettings for the IDB version of
QSettings.
Also, do not treat the IndexedDB format as one defining read/write
functions in QSettings - those are the same as for ini format, as
IndexedDB settings backend uses a backing ini file.

Change-Id: Iee3471cc79c0cea87378923cf9baac58e56d1272
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-21 19:39:21 +02:00
Timur Pocheptsov
c1b287c531 tst_QDtls: use DTLS v 1.0 test data conditionally
Starting from OpenSSL v 3.1.1 DTLS 1.0 is only available, if the
security level is 0, which is not the case most of the time. So
we consider this version number to be a 'threshold' after which
we don't test v 1.0 anymore.

Pick-to: 6.5 6.6 6.2 5.15
Task-number: QTBUG-116166
Change-Id: I9763703f36ae742e1d3c7cb17872cf8d0d82ab85
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-21 16:13:48 +02:00
Ulf Hermann
9306db6d46 QObject: Do not register an observer when writing objectName property
Observers should only be registered when _reading_ the property.
Otherwise we get binding loops.

Pick-to: 6.6 6.5
Change-Id: I974f6ea444fa7a5d333ed79eea6f34e3d757d169
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-08-21 14:15:51 +02:00
Ievgenii Meshcheriakov
7c9e61a3fe QDBusConnectionManager: Use invokeMethod() to create servers
Use QMetaObject::invokeMethod() with a lambda instead of setting
up a permanent signal/slot connections with BlockingQueuedConnection
type. This makes the code flow easier to follow.

Change-Id: Ib6566e7a4694ecbd69900b645d020b3331fb3462
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-21 12:18:33 +02:00
Ievgenii Meshcheriakov
338de68395 QDBusConnectionManager: Move to a separate source file
Split the source code into a separate file for easier code
navigation and to better match the rest of Qt.

Update the link to the blog post explaining the
preventDllUnload() function, mention the blog post title
to make it easier to find it again when the link breaks.

Change-Id: I061d72bc795110f03352abf10fc639ddd6243527
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-21 12:18:33 +02:00
Mikolaj Boc
7a0de7fda2 Add WebLocalStorageFormat, WebIndexedIDBFormat to public API
Fixes: QTBUG-115587
Change-Id: Icb5dc795ad60608effbf08200592899d1a3d7fd1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-21 12:12:44 +02:00
Joerg Bornemann
e05b779c88 CMake: Don't create superfluous qtrepo_XXX_for_examples targets
Only create a qtrepo_src_for_examples target that examples, built as
external projects, can depend on.

Change-Id: I334bc67b9b78f49d5c345cb256132f42dc2c5f5e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-21 08:35:52 +02:00
Ievgenii Meshcheriakov
cff1c12eca QAbstractEventDispatcherPrivate: Create free timer ID list in constructor
Create the global static free timer ID list in the constructor
so that it is destroyed after any global static QDaemonThread instance
that may be using it.

Fixes: QTBUG-58732
Pick-to: 6.6
Change-Id: Ic2d33ac3aa2ec3ca0261be9996920aae260e16fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-20 23:38:06 +02:00
Christian Ehrlicher
e26a87f1ec WindowsVista style: fix subControlRect() in rtl mode
During refactoring of the vista style in
46f98147f4 a regression slipped into
subControlRect()'s default branch which lead to a double call of
visualRect(). This breaks nearly all subControlRect() calculations in
rtl mode.

Fixes: QTBUG-116224
Pick-to: 6.6 6.5
Change-Id: Ida722e1b6c6a311b27a9b48d1fe1378b47c21cf4
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-08-19 21:15:03 +02:00
Ahmad Samir
ea24142ab5 tst_QPrintDevice: compile with QT_NO_FOREACH
The loop was iterating over a temporary, so it couldn't have changed it.
Store the container in a local const variable and port to ranged-for.

Drive-by change: don't call ps->availablePrintDeviceIds() multiple
times.

Task-number: QTBUG-115839
Change-Id: If2cabec68040dc7096acf0b7ddeff72d7c8c7750
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 19:17:18 +03:00
Ahmad Samir
78f0250053 tst_QPrinter: compile with QT_NO_FOREACH
resolution(): a local const container, Q_FOREACH wasn't needed here to
begin with, port to ranged-for

The rest, the loops were iterating over temporaries, so just put them in
local const auto variables and use ranged-for.

Task-number: QTBUG-115839
Change-Id: Iebe6d164661d74df9fefb764c370cdc9a8e817ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 19:17:17 +03:00
Ahmad Samir
7889dcda95 tst_qmimedatabase: compile with QT_NO_FOREACH; port to ranged-for
msgMimeTypeForFileNameFailed(): the method takes the container by const&
and I've made the container const at the call site, so now it's
iterating over a const container.

allMimeTypes(): iterating over a const container.

checkHasMimeType(): was iterating over a temporary, store it in a const
auto variable.

Task-number: QTBUG-115839
Change-Id: If10eb425d55484bc1857dfdeafa9d65b2beb765f
Reviewed-by: David Faure <david.faure@kdab.com>
2023-08-19 19:17:17 +03:00
Ahmad Samir
6864576577 tst_qmakelib: compile with QT_NO_FOREACH
proEval(), proParser(): the loop was iterating over a temporary so it
couldn't have changed it. Hold the container in a const auto variable
and use ranged-for.

formatValue(): iterating over a const QList& parameter, and the container
isn't changed at the call sites during iterating, so Q_FOREACH wasn't
needed to beging with. Use ranged-for instead.

Task-number: QTBUG-115839
Change-Id: Idabe0bbd84b5bcc86cef275f80497651353a4d9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-08-19 19:17:17 +03:00
Ahmad Samir
7101dcab7a tst_qmake: compile with QT_NO_FOREACH
systemEnvironment(): the loop was iterating over a temporary; hold the
temporary in a local const auto variable and use ranged-for.

runCommand(): the container is a const&, the loop doesn't change the
container and the containers the method is called on aren't changed
during iteration.

Task-number: QTBUG-115839
Change-Id: I6687e5ff64ff8c2fa26e34abf4044b98718e65d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-08-19 19:17:17 +03:00
Ahmad Samir
192e1ed649 tst_moc: compile with QT_NO_FOREACH
specifyMetaTagsFromCmdline(): the loop was iterating over a temporary so
it couldn't have modified it; hold it with a const auto variable and use
ranged-for.

relatedMetaObjectsNameConflict_data(): make the container const and port
to ranged-for.

Task-number: QTBUG-115839
Change-Id: I6a5afdf0e5a3dd47818da0025fbbeacd05335b39
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-19 19:17:17 +03:00
Ahmad Samir
890a61fba0 tst_selftests: compile with QT_NO_FOREACH
The loop was iterating over a temporary container, so it couldn't have
changed it. Use a const auto variable to hold the container and port to
ranged-for

Task-number: QTBUG-115839
Change-Id: I66e7cbdb811666ca352cdf064b1228caa346d876
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:30:13 +03:00
Ahmad Samir
f516cf93b4 selftests/badxml/tst_badxml: compile with QT_NO_FOREACH
badString(): const'ify the static QList, this is both faster as the
compiler doesn't need to check if it has been already initialized, and
it means we can use it directly in ranged-for as the method returns
const QList&.

Drive-by change: don't go the long way around to get a const char*:
qPrintable(QString("fail %1").arg(ba))
instead use:
QTest::addRow("fail %s", ba.constData())
(thanks to dfaure for pointing it out in review).

Task-number: QTBUG-115839
Change-Id: I6e8efa6df47ee94f1d71a63e22ab121647e6bf20
Reviewed-by: David Faure <david.faure@kdab.com>
2023-08-19 16:30:05 +03:00
Ahmad Samir
9aeb38650d tst_QFreeList: build with QT_NO_FOREACH
The container is local to the function, but can't be made const due to
the way it's filled. The loop clearly doesn't modify the container so
use std::as_const and ranged-for.

Task-number: QTBUG-115839
Change-Id: Ia9f01dfaccfca3225fe0487aafd0a386605cf466
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:54 +03:00
Ahmad Samir
964e6c6754 tst_QTemporaryDir/File: compile with QT_NO_FOREACH
These are member containers of nested (in the test function) structs.
It's clear the container isn't modified in the loop body, so use
ranged-for and std::as_const.

Remove "#undef QT_NO_FOREACH".

Task-number: QTBUG-115839
Change-Id: I0588bf4b6520b42d6d8678d702192fb894956b05
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:47 +03:00
Ahmad Samir
1612ddac40 tst_QStorageInfo: compile with QT_NO_FOREACH
This is a local container that isn't modified in the loop, so use a
ranged-for loop with std::as_const.

Task-number: QTBUG-115839
Change-Id: Ie9129e065f8ae9bd8c93cf95093a77529aef0803
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:40 +03:00
Ahmad Samir
71397212ef tests/auto/*: port Q_FOREACH to ranged-for, make container const
Use std::initializer_list/std::array for data known at compile time.

In files where Q_FOREACH isn't used any more, remove
"#undef QT_NO_FOREACH".

Drive-by change: de-duplicate some trivial code.

Task-number: QTBUG-115839
Change-Id: Ifb1a93579bd4ab8fd10f78665a28559cc61da7e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:30 +03:00
Ahmad Samir
8e0281a8be tests/auto/: port Q_FOREACH to ranged-for, local const containers
These are local containers that are either:
- Already const and didn't need Q_FOREACH to begin with
- Can be simply made const, just by adding const keyword

In one case the unittest checked that the container's size is 1, so use
list.first() instead of a for-loop.

In files where Q_FOREACH isn't used any more, remove
"#undef QT_NO_FOREACH". Also remove those files from NO_PCH_SOURCES.

Drive-by changes:
- Remove parenthesis from one-line for-loops
- Make the for-loop variable a const& where a copy isn't needed

Task-number: QTBUG-115839
Change-Id: Ide34122b9cda798b80c4ca9d2d5af76024bc7a92
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:25 +03:00
Ahmad Samir
e7b07b64c7 tests/auto/*: port Q_FOREACH to ranged-for
The loop was iterating over a temporary container, so it couldn't have
changed it. Store the container in a const auto variable and use
ranged-for.

In files where Q_FOREACH isn't used any more, remove
"#undef QT_NO_FOREACH".

Task-number: QTBUG-115839
Change-Id: I402df5fa48f4287f3cc989ddae1524da43999049
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:09 +03:00
Ahmad Samir
c7a8e1e992 tst_QDirIterator: build with QT_NO_FOREACH
cleanupTestCase: the loops don't change the member containers, so use
std::as_const and ranged for.

iterateRelativeDirectory(): the for loop doesn't change the container,
so make it const to begin with, and use a ranged-for loop.

Drive-by change: make the for-loop variables const&, no need to create
unnecessary copies.

Task-number: QTBUG-115839
Change-Id: Ic2776459f695c9f334f83916b1c9bbe5646a3b9d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:29:03 +03:00
Ahmad Samir
019554a399 tst_QDir: compile with QT_NO_FOREACH
Each loop was iterating over temporary containers, so use a const auto
variable to hold it and use ranged-for

Drive-by change: make the for-loop variable a const& (QString,
QFileInfo).

Task-number: QTBUG-115839
Change-Id: Idffaedb8e2e8782a0f4f907995f62f3c0de44bba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:28:53 +03:00
Ahmad Samir
9812df02db tst_QDir: port Q_FOREACH with QList::removeIf
filterLinks() is always called on a temporary QStringList, so make it
take by && (which proves it's always called on a temporary), and modify
the parameter directly.

Task-number: QTBUG-115839
Change-Id: I40611f40cc0096a58d5c9d8e68c5df06d43152e5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-19 16:28:45 +03:00
Ahmad Samir
645dcc27d3 tst_QAbstractFileEngine: compile with QT_NO_FOREACH
cleanupTestCase(): the loop doesn't modify the member container, so use
std::as_const and a ranged-for.

mounting(): the loop was iterating over a temporary QList, store it in a
local auto variable and use ranged-for.

Drive-by change: add braces to a multi-lined for block.

Task-number: QTBUG-115839
Change-Id: I0542cad4df3730d6a09b39e64a54a84fc0d57062
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-08-19 16:28:33 +03:00
Ahmad Samir
0766d55d22 tst_QtConcurrentMedian: compile with QT_NO_FOREACH
One trivial case: container newly marked as const.

Task-number: QTBUG-115839
Change-Id: Ief788beab2f84b656e429ce3e96bbd691f6d4c71
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-08-19 16:28:20 +03:00
Joerg Bornemann
ba96238600 Fix running CMake test projects in prefix builds
Consider the following situation: There are CMake tests in
qttools/tests/auto/cmake that configure and build CMake test projects,
essentially as external projects. One of those test projects does
find_package(Qt6 COMPONENTS LinguistTools). This call fails in a prefix
build, because Qt6LinguistToolsConfig.cmake is not installed yet. It
merely exists in qttools-build/lib/cmake/Qt6LinguistTools.

We must adjust CMAKE_PREFIX_PATH to be able to find Qt6LinguistTools. We
also must adjust QT_ADDITIONAL_PACKAGES_PREFIX_PATH to be able to find
the LinguistTools component of the Qt6 package.

Use the prefixes setup from the support for building examples as
external projects and use it for CMake test projects as well.

Task-number: QTBUG-84884
Change-Id: I1bd5d5084cf931196bdb014cd75ca7578cd9decb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-19 11:03:36 +02:00
Marc Mutz
f780893c39 QRecursiveMutex: make tryLock(QDeadlineTimer) the default (was: int)
The default argument staying on the old int overload meant that on
Windows a nullary tryLock() call would need to go through both DLL-
exported functions (int, then QDeadlineTimer) and on non-Windows
platforms, it would hit the out-of-line QDeadlineTimer(qint64)
ctor.

By moving the default argument from the old to the new function, we
reduce the nullary call on Windows from two to one exported functions.
On non-Windows, we make it to hit QDeadlineTimer's constexpr inline
default ctor instead.

Found in API-review.

Amends ff9da1db0b.

Pick-to: 6.6
Change-Id: Id3e9923cf97ee1673fe05c85c30b5a12531857b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-19 10:30:41 +02:00
Marc Mutz
02add2a807 tst_QImageReader: fix a trivial Q_FOREACH and remove #undef QT_NO_FOREACH
Other recent commits have fixed the other Q_FOREACH uses in this file.

Task-number: QTBUG-115839
Change-Id: I03063f3e8f1e99c5a2aa2d9188260f3e79ca43bd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-19 08:19:47 +03:00
Marc Mutz
11d6932560 Mark all of Qt as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses in this and some other modules is still
extremely high, too high for anyone to tackle in a short amount of
time. Even if they're not concentrated in just a few TUs, we need to
make progress on a global QT_NO_FOREACH default, so grab the nettle
and stick to our strategy:

Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from
creeping in, and whitelist the affected TUs by #undef'ing
QT_NO_FOREACH locally, at the top of each file. For TUs that are part
of a larger executable, this requires these files to be compiled
separately, so add them to NO_PCH_SOURCES (which implies
NO_UNITY_BUILD_SOURCES, too).

In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the
#undef QT_NO_FOREACH to indicate that these actually test the macro.

Task-number: QTBUG-115839
Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-19 05:19:42 +00:00
Marc Mutz
1a3f573bd9 QHostInfo: remove usused -Result and -Runnable ctors
Clean up after all users are ported to the SlotObjUniquePtr overloads.

Pick-to: 6.6 6.5
Change-Id: I3e58249296ea9674c45fb412463ae3201518de72
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-18 21:02:51 +00:00
Ahmad Samir
5941f192ab tst_QtBench: fix leak
Instead make "benchmarks" a member variable and call qDeleteAll() on it
in cleanupTestCase(). This doesn't make much difference since the
allocated resources would be freed when the whole test is destroyed
anyway, but still.

Change-Id: Iba66d32697fd3f2283185ee65a0a514176b4b258
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 23:40:29 +03:00
Ahmad Samir
0b3390f33d examples/: fix compiler (GCC) warnings -Wsign-compare
Change-Id: Ie4965e3ce3113e9c7a5d5d5eba4cab143ef1c806
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 23:35:52 +03:00
Ahmad Samir
ad6fd04609 examples/: fix compiler warnings -Wdeprecated-enum-float-conversion
This is with GCC.

Change-Id: I52dcb6881f36c740129b699db7db9241a4e75da1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 23:35:52 +03:00
Ahmad Samir
339323b999 examples/: implicit capture of this via [=] is deprecated in C++20
Change-Id: I43b04517e9e3a30468c8ce702c9a49968c0ddc4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 23:35:52 +03:00
Ahmad Samir
07c34e4c79 QTimer: put #ifdef qdoc related-lines in one block
Slightly more readable.

Change-Id: Ib945319b4f7606a0796e8ac09f6659e63b7291df
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 19:56:30 +03:00
Edward Welbourne
15cfdab514 Give QLocale's name() and bcp47Name() separator parameters
Previously name() has always used underscore and bcp47Name() dash; let
the user chose which one best fits their needs.

[ChangeLog][QtCore][QLocale] QLocale's name() and bcp47Name() now let
the caller chose what separator to use between the tags making up the
name, where there is more than one.

Change-Id: Ia689e6a3fb581b42905e7fb1ae7a7b688244d267
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-18 18:39:14 +02:00
Edward Welbourne
820eff05f4 Use atan2() in Quaternion axis-and-angle
It's more numerically robust than acos() - we can't hit a range error
if we get strange rounding effects - and we've got the value of the
sin of the angle already (it's the length of the x, y, z part), so
might as well use it. As length is necessarily positive, atan2() will
give an upper-half-plane resolution, matching what acos() gave us.

This incidentally means that you no longer need to normalize() your
quaternion before you ask for axis and angle.

Task-number: QTBUG-114313
Change-Id: If3fa2b371c72991f1f8f151f78ef7f9180aa87cf
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-08-18 18:39:14 +02:00
Andreas Eliasson
132be307ff Doc: Delete links to removed examples
The examples have been removed as part of the examples revamp project.
This patch resolves a number of qdoc warnings.

Pick-to: 6.6 6.5
Change-Id: Ie3d2f5637136c631d7e9f7a8ffd93baea52f77d8
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-08-18 16:00:10 +00:00
Ivan Solovev
314d86335d Do not rely on transitive includes for QESDP
Explicitly include <QtCore/qshareddata.h> into the headers that use
QESDP.

This commit amends 6ff4c3d787.

Found during Qt 6.6 API review.

Pick-to: 6.6
Change-Id: Ia52d9e7551295f0c7380c7ed33b68f452cb689aa
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-08-18 16:00:10 +00:00
Ivan Solovev
470b2b8ad9 QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes
... and rename it to qbswap(), thus enabling the endian conversions
for Id128bytes via q{To,From}{Little,Big}Endian() functions.

Found during Qt 6.6 API Review.

Pick-to: 6.6
Change-Id: Ie320cee52ec2b9de0aaa112adec8febb7f5b68a2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-08-18 18:00:09 +02:00
Ivan Solovev
e6a36f21a3 QNativeIpcKey: improve operator==()
There is no need to check if lhs.d == rhs.d in the end of the function,
because we already have the same condition earlier.
If none of the previous conditions was true, we can just return false.

This commit amends 7a37083817.

Pick-to: 6.6
Change-Id: I06dca9b3dedf5895820685a6ded5363963e6fa3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-08-18 18:00:09 +02:00
Marc Mutz
14cf4f7584 QHostInfo: add -Result and -Runnable ctors taking SlotObjUniquePtr
... and use them around the code.

Avoids the impedance mismatch between users, which .release() their
SlotObjUniquePtr's into the ctors, and the ctor, which constructs its
member SlotObjUniquePtr from that.

The old constructors are left in on purpose and removed in a follow-up
commit to facilitate cherry-picking into branches that might have
additional callers.

Pick-to: 6.6 6.5
Change-Id: I6f8bce317d5116296973a3a2e3f97db1451f579d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-18 16:00:09 +00:00
Tor Arne Vestbø
17e7d98626 iOS: Add support for foreign windows
Task-number: QTBUG-116183
Pick-to: 6.6
Change-Id: Ia92ee2d15f2e91a326ad342237fb0a83305c019f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-08-18 17:01:28 +02:00
Ulf Hermann
199570e3b1 Doc: Fix introduction version of QT_DISCARD_FILE_CONTENTS
It didn't actually land in 6.5.

Amends commit 5a0dcda171.

Pick-to: 6.6
Change-Id: I8d63f0e5019c37dbbc02294515444dd8e901dd6f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-18 17:01:28 +02:00
Marc Mutz
5c96b2a864 QCryptographicHash: fix incorrect GCC check
It's Q_CC_GNU, not Q_CC_GCC.

Amends 0411d98192.

Pick-to: 6.6 6.5
Change-Id: I56c4393e5955ac1bbcc8a198b11487cff775b16d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-08-18 17:01:28 +02:00
Marc Mutz
a19585eee1 QPollingFileSystemWatcherEngine: change PollingInterval to chrono::seconds
More expressive and type-safe.

Move it to the .cpp file (the only user) and make it static to avoid
creating a non-namespaced symbol.

Pick-to: 6.6
Change-Id: Ib9b393e660e51c1791ed3a9a4a12e5c75736bf2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-18 15:01:28 +00:00
Marc Mutz
22858ffced QPollingFileSystemWatcherEngine: replace QTimer with QBasicTimer
We already have a QObject (*this), so we don't need another one in the
form of a QTimer; we can just let QTimerEvents be delivered to *this.

Changes surprisingly little code, because the code used start(int)
already.

Mark the timerEvent() final to avoid surprises from potential
further-derived classes.

Pick-to: 6.6
Change-Id: Ib4ee8f8f6b9995d67d964afb231e913a00a76af3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-18 15:01:28 +00:00