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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
We link object files with the same names into the BundledLibjpeg
static archive.
This caused warnings when running dsymutil on shared libraries using
that archive:
skipping debug map object with duplicate name and timestamp
could not find object file symbol for symbol _jpeg_start_compress
Avoid that by creating copies of the source files with different
names, so that all object files are unique.
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-123324
Change-Id: I1d4ebdd111b4172cde793671fbe059957f102871
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b72158daf502e1f7f0d8c585df6923b4d958cb94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A qt installation might not contain the non-versioned the qtpaths.exe
installed, but keep the versioned qtpaths6.exe.
Try to use the versioned version before the non-versioned one.
If none exists, show a warning at deployment time.
Amends 571201603acc731330c9af42a3aca9cda41d38fd
Pick-to: 6.6 6.5
Fixes: QTBUG-122664
Task-number: QTBUG-119619
Change-Id: I23caf9ed3c7928fbab9657b0c0c64517dfc7d68e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bcdc9d7059b6ecd4e0bfb44cf5a42d87c49e3edc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change 997fd3b88ede8078af286da6ecc197e83a8cbb46 fixed integer overflows
with huge texts. This was done by using qsizetype for size calculations
instead of int. However, that change introduced a serious regression
due to an itermediate imultiplication result being "promoted" to unsigned,
and therefore a negative value being converted to a large positive.
The solution is to make sure all values in the expression are signed.
Fixes: QTBUG-123339
Task-number: QTBUG-119611
Change-Id: I3f9189f77b383c6103cf5b35981cdb607b065f6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 7a84c58f55ab56c5d77be80e43783d0b5302a749)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some outputs weren't guarded with the optVerboseLevel which caused them
to occur even with the --list option. Add a guard to prevent for that.
Fixes: QTBUG-122257
Pick-to: 6.6
Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ad2da2080c8b99665cd32237ab365fee5461cf66)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When connecting a QFutureWatcher to the QFuture it will connect to the
output interface, which will queue up events to notify about the current
state. This happens in the thread of the QFutureWatcher.
Since 07d6d31a4c0c17d8c897d783a9b0841df6834b02 unfortunately the sending
of those events was done outside the lock, meaning the worker-thread
could _also_ send events at the same time, leading to a race on which
events would be sent first.
To fix this we move the emission of the events back into the lock
and because it is now inside the lock again anyway, we will revert
back to posting the callout events immediately, so this patch also
partially reverts 07d6d31a4c0c17d8c897d783a9b0841df6834b02
Fixes: QTBUG-119169
Pick-to: 6.6
Change-Id: If29ab6712a82e7948c0ea4866340b6fac5aba5ef
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 63b2cf8a457f0eea861fa060c610a74b35450ba6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Creating a QString from a QDate/QTime works even when
QT_CONFIG(datestring) is not defined, so no need to ifdef it out.
Change-Id: Ib3594036f309393b612d3fbf21f51be9c36a9391
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f813b76fb2b4189fc18d0b5a75faf1eea2bb1de2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
File is is part of the internal test infrastructure.
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: Ia5bc4e0abeea210ee501596330b2b63216e9e9c7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 0886035bcdd7bb1c74d3119354d1311377ebc0dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
License is set to that of the other files in the directory
Task-number: QTBUG-121787
Change-Id: I9922feb2a520a549ab9cc1d82a85417202ad83c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit f9136fd0dbdbc4f5d61b50b7fcffece6faa2ac4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was the only place that called it. Makes the code slightly uglier,
but removes a function that returned a raw pointer. More importantly, it
gets the actual type from QVariant, without relying on it internally
converting from QDateTime to QDate and QTime, or failing to do so in
some cases. This is going to be needed for the next commit.
Pick-to: 6.6 6.5
Change-Id: I6818d78a57394e37857bfffd17bbcd3f5057eadc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b5d73636d27f1bba87980cf1bac6feb1ebd6360b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When declaring a constructor, you must use the injected name, not a
template.
qfutureinterface.h:472:37: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
Pick-to: 6.6
Change-Id: I6818d78a57394e37857bfffd17bbbf2313001cbf
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 111c08d0eaa134652f1f1e602ead1a539614258f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was not setting the value _back_ to 0 when the function ended
and this caused qtbug68821proxyError to fail fairly consistently
on Windows when it was running in the same run.
qtbug68821proxyError was always succeeding when ran by itself so
it was quite odd.
Change-Id: Ifa4982f1b10128674081136a30bdab4b0ce7004a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 5e102a792c4ee0db180defe480cb96c197871508)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That seems to be enough for me when trying to reverse-resolve host names
inside the corporate network.
Change-Id: I6818d78a57394e37857bfffd17bc6b0ebd39f51b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d18d8a7ad1f69b2e65de114d9a3edc23d56da30e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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)
Change-Id: I6818d78a57394e37857bfffd17bc66e241cab24d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 78cf5740a95d2dbf985cc137240a11f0c4ebfde0)
...and adjust it to its presence in the new QDeadlineTimer overload,
which sports nanoseconds granularity.
Change-Id: Ifa9658ca32c5dc4bef5cf36dec2e452174eebe1c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dd5925fedb19c8fdb2601ec9eab6fb916341ff47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>