The test was reporting wrong app size values and then
expecting a wrong height after subtracting the system
bar heights. This was happening because an older API
was still being used, using newer APIs fixes that.
Fixes: QTBUG-131338
Pick-to: 6.5
Change-Id: I7306ce62d9c683f84069cc19086a6cd28abf5441
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 50603fddc535179ee02379a8807fe5cb104e0aae)
Pick-to: 6.5
Change-Id: Iea06638d1c8eebf36ae010dad23fbeab4b890597
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit ebdc01c1861667116aa09914b46df1ac8504baf9)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The RecursiveList structure was defined like this:
struct RecursiveList : public QList<RecursiveList> {};
However, this definition does not make any sense when it comes to the
relational operators. QList<T> needs to have operator<() defined for
the contained type T.
The current implementation of QTypeTraits::compare_lt_result_container
simply enables operator<() if Container is a base type of the contained
type. This unblocks the compilation of checks like
static_assert(QTypeTraits::has_operator_less_than_v<RecursiveList>);
However, this is useless in practice.
This commit updates the struct to have a meaningful definition of
operator<().
Amends 9f13842fe6.
Task-number: QTBUG-120305
Pick-to: 6.5
Change-Id: Iaee96385a33ff131bdceabe945265b3285a370c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 58c492a4dc9868faff7e9334758947cf0027eeac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There was a copy-paste error in NoCmpRecursiveList definition.
Amends 9f13842fe6.
Pick-to: 6.5
Change-Id: I1487710e51a8b92c53b79b747c324654d9b9f334
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 65fede8fae459da86784b0757ca6c3179a8fb883)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The AnyTerritory entries in the zoneDataTable are derived from
territory="ZZ" entries in the upstream CLDR data; the World ones from
territory="001". The latter give the default IANA ID for each MS ID,
the former give an (often legacy) IANA ID for the MS ID, that is not
based on geography. Some of these are being removed at CLDR v46.
The documentation said the ZZ entries have "no known territorial
association", hinting that there may be some (unknown) territorial
association; however, CLDR's inclusion of them is as entries with a
known non-territorial association, so revise the phrasing to reflect
this.
Also document that windowsIdToDefaultIanaId() returns empty when
there is no territory-specific value, and callers can use the
territory-neutral call to get a suitable value in that case. (They
may, however, wish to distinguish this case, to treat it differently,
so I decided not to just return that in place of empty in any case.)
The upstream CLDR tables do have entries for territory 001, so we
should report these if asked for World as territory. Amend the
available zone ID lookup and mapping from MS to IANA functions that
take a territory to duly handle World via the default-data that was
derived from 001 data in CLDR, instead of from the territory-varying
table, from which those were effectively filtered out when generating
the two tables. Update docs to mention this handling of World, for
contrast with that of AnyTerritory.
In the process remove a spurious split-on-space from the MS to default
IANA lookup, asserting there is no space (in a field now stored in the
table for single IANA ID entries, instead of the one for space-joined
lists of them in which it used to be stored, before I noticed it's
always only one ID). There is a matching assertion in the cldr.py code
that extracts the data. Added an assertion to this last, that each
default IANA ID given by CLDR's MS data does in fact also appear as
one of the IANA IDs for at least one territory (potentially ZZ), and
comment in C++ code on why this means we don't need to scan the
windowsDataTable in a few places, where it would just produce
duplicate entries.
On picking to 6.8, removed the timezone_locale addition, only relevant
on 6.9 and later.
[ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World
and clarified in docs how QLocale::AnyTerritory is handled when
QTimeZone selects zones by territory.
Task-number: QTBUG-130877
Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e23dc7c420297fb62db9834a17c59bbf5992dad7)
Reviewed-by: Mate Barany <mate.barany@qt.io>
Otherwise the test may hang forever waiting for the user to click a
button or just too long waiting for the core dumper.
Change-Id: Id570aab34608aed86b86fffd8d196c84296e0389
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 898abae6adf0ab9ff75752df456aaedef71ae096)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to avoid caling toMSecsSinceEpoch() since it's expensive for
LocalTime (which is presumed to be the common case). We can do so when
both sides have the same offset from UTC (and this can cheaply be
determined) but that's no help for two local times months apart, one
in DST the other not. However, in this case, the difference in millis
is big enough that no plausible difference in offset can overcome it,
so we can again avoid toMSecsSinceEpoch() and simply compare millis.
This should make some previously-expensive comparisons cheap.
Add test-cases to the QDateTime ordering test that verify this doesn't
lead to mis-comparison at the biggest offset-difference known.
Fixes: QTBUG-131491
Change-Id: I1afd5d058c8663c908f898d4c50d0837549b87db
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ef540d77751e24fe0b345694f43cdafca3434c68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add setWindowFlags(Qt::X11BypassWindowManagerHint) to bypass the
creation of the frame. We are checking the geometry of the widget
itself, not of his frame in this test.
Remove the comments preventing that it can be flaky when debugging.
Remove unnecessary QApplication::processEvents().
Remove several unnecessary qWait().
Change-Id: I4a4bcf5cb9522a9a504925c1ae31f0677deae3b1
Pick-to: 6.7 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cf45ae08bc90b5dbbd20a7e7842856805205bca4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Surprisingly, moc had no awareness of constexpr at all. This would still
mostly work, as we were just skipping it, except for the case where
constexpr appears as the last keyword – in which case we'd pick it up as
the type name.
Fix this by adding constexpr as a known token, and add it to the list of things we ignore in testForFunctionModifiers.
Pick-to: 6.5
Fixes: QTBUG-122609
Change-Id: I0ae0c0477e611ff83fbb841233035bea52216be2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 984ad9019a62a9a130647dbd765e38ee2e6250c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We had input handling enabled as a precondition for setting focus.
This is wrong, we need to have the focus for toggle buttons
and other non-input things as well.
(Also toggle buttons act on spacebar).
Also selects a new active window if the window
that is active (i.e a dialog) is deleted.
Also shift + tab did not always work, fixed
to emit Key_Backtab
Fixes: QTBUG-130371
Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ef8bf4c2cf3d86a869ff8a555d4e390168864144)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
87d8ee755b changed the logging behavior
on Android to use the category as tag. But it was missed that
`formatLogMessage` only fills the fields given in the messagePattern.
Our default messagePattern includes the category but on Android it
is never filled since this change.
So we change the default messagePattern on Android to omit the category
and only use the category as tag when the category is not given in the
messagePattern.
Pick-to: 6.5
Task-number: QTBUG-94708
Change-Id: I80f65d0f7f8c0ca9c2fff2dcd63d4599848b6e2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 709bc29a1d2abf40bf3f1c067fe3b96b6e0c09d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also adds a helper function QBaselineTest::finalizeAndDisconnect()
that calls the finalize command, prints the optional report URL
and disconnects to the server.
Change-Id: Iabdba77f9eebad3e3f3fa67ab8977d1e49c49fb4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 62b349c5cf157479041969dc41e98597912de8d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The tst_QFont::italicOblique() test is testing whether
a request for an "Oblique" font in the presence of an italic
one (or vice versa) may return the other as a second-best match.
However, it did not consider the fact that some fonts may not
be marked as italic even if the style name contains the word
"italic". One instance of this are variable fonts with oblique
instances. In this case we currently do not correctly recognize
the fonts as oblique.
But there is nothing preventing someone from creating a normal
font that has "italic" in the style name and not setting it as
italic in the OS/2 table (maybe the style name is "non-italic"),
so we can't really depend on this.
This makes the test a bit more robust by checking if the actual
font stored in the database is italic and verifying a match with
the requested oblique font. There are still cases that might
fail here, but we don't need to address those unless they
actually appear.
Pick-to: 6.5
Fixes: QTBUG-131108
Task-number: QTBUG-131262
Change-Id: I9ae0d37d378e8fec2be524db203dcea9a881f15a
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 957e2be00a5c45223a5ef842a5f9f2f7b7be882b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the line break algorithm, we try filling characters and
objects onto a text line until we see an overflow. We then
keep the state *before* the overflow as the current line and
move to the next.
However, for inline images we would store its height to the
current state before checking if it overflowed. So if the
inline image did cause an overflow it would be counted
towards the height of the preceding line in addition to the
line where it actually ended up.
[ChangeLog][Text] Fixed an issue which could cause the
height of a word-wrapped text line to grow if the immediate
line after it began with an inline image.
Pick-to: 6.5 5.15
Fixes: QTBUG-130980
Change-Id: I68494b49059e5e35349cbde77aefc64abeb69697
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 7b024cc1749494114fffc3c434b58846707a64af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A recent update [0] to the IANA timezone database has improved the
historical accuracy of transitions in Mexico. It turns out that the
transition at the start of 1970 was not a real event. The only actual
change then was that Mazatlan has followed the main Mexico zone rules
since then, having ignored some transitions of the main zone in
earlier decades.
[0] 812aff32b3
Picking to 6.8 got a trivially-resolved conflict due to dev having one
more BackendKludges flag to take into account. Removed 6.5 from the
destinations for picking because the removed test was added since
then.
Pick-to: 6.8.1
Fixes: QTQAINFRA-6757
Change-Id: I65d8ea1dfa76ce635bf11ffcc1ded8c9ceaf9fec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 8a27c310b1e4ebc74999e09551ca5eab4570a68e)
Commit 1ed0dd88a3 ("QThread/Unix: make
QThreadPrivate::finish() be called much later") introduced this problem.
Commit 4fabde349f16b59f37568da2a4c050c6dd53a34e split the thread
termination in two phases, but did not fix this.
This re-applies commit 950b35cf97 ("Clear
the current thread data for the main thread"), which was reverted in
commit 7dc622290b ("Make sure QThreadData
and QAdoptedThread object is destroyed at app exit"), both from Qt 5.1.
Between Qt 5.1 and 6.7, the responsibility of clearing the
QAdoptedThread for the main thread was split: it could occur either in
~QCoreApplicationData if exit() was called in that thread or in
~QThreadData() if it wasn't (e.g., when the Qt "main thread" is not
main()'s thread):
* frame #0: 0x0000000101db8a28 QtCore`QAdoptedThread::~QAdoptedThread(this=0x000060000176c070) at qthread.cpp:139:1
frame #1: 0x0000000101db81eb QtCore`QThreadData::~QThreadData(this=0x0000600002468000) at qthread.cpp:82:5
frame #2: 0x0000000101db8379 QtCore`QThreadData::~QThreadData(this=0x0000600002468000) at qthread.cpp:57:1
frame #3: 0x0000000101db841c QtCore`QThreadData::deref(this=0x0000600002468000) at qthread.cpp:108:9
frame #4: 0x0000000101f4ec79 QtCore`destroy_current_thread_data(p=0x0000600002468000) at qthread_unix.cpp:104:11
This commit centralizes and gives ~QThreadData() the exclusive
responsibility. That requires not resetting QThreadData::threadId so
~QThreadData can know it is theMainThread.
Fixes: QTBUG-130895
Task-number: QTBUG-129927
Task-number: QTBUG-129846
Task-number: QTBUG-130341
Task-number: QTBUG-117996
Change-Id: Ie3f3cbdc5523837b505cfffd95fba5e6498b5069
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 65093a84c2b94b1543fd4593bc45d491951d28d4)
X11 spawns painting threads and sends an expose event at the same time.
While the worker is still paining, QXcbScreen::topLevelAt() may not
find the window, even if it reports being exposed.
Wait until windows are exposed and painted.
Remove workaround to intercept warnings about undeliverable gestures.
Remove qWait() antipattern.
Fixes: QTBUG-130811
Fixes: QTBUG-84258
Fixes: QTBUG-69648
Fixes: QTBUG-67393
Fixes: QTBUG-67392
Fixes: QTBUG-67389
Fixes: QTBUG-68861
Fixes: QTBUG-70224
Fixes: QTBUG-70223
Fixes: QTBUG-67395
Fixes: QTBUG-70227
Fixes: QTBUG-70226
Fixes: QTBUG-70209
Fixes: QTBUG-70153
Pick-to: 6.5
Change-Id: Id126fe884ba360551425f3e2b29674f5b9419fff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 705bac063cc5ec535ff5467a208d5653555ae8f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the download fails. We need to provide both the encoded path,
and the name for the local file, as cmake doesn't provide an encoding
helper.
Change-Id: Id2d1c197f9ee1326ee229ebd32e5af156c970aed
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5ecbba1648676a9b2ca6a097c133ff5e9e0a4bd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we consolidated "all" test functions to use RUN_TEST_FUNC, the
cancel() test function was inexplicably overlooked.
This patch ports this last test function.
Amends 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b, whose commit message
contains rationale for this change, but not repeated here.
Pick-to: 6.5 6.2
Change-Id: I9461f8e816a25c731d6229df15ee88dcc8c4e165
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3e71f256d5813ef699a4030f718fee1d1e53bba1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a menu contains no or only invisible actions, then its sizeHint might
become invalid (depending on style), resulting in an invalid geometry.
In that case, return early from popup(). Otherwise we try to show popup
window with an invalid size, which results in unpredictable behavior,
depending on the windowing system.
To minimize possible fallout from this change, don't return early from
QWidget::show (or QWindow::setVisible), but fix this locally in QMenu.
The QMenuBar test used empty menus to confirm that hovering over other
menu bar entries would highlight the menu bar entry under the mojuse,
and close the currently open menu. This can be tested better and more
reliably with menus that are not empty, which is (probably) also going
to fix the test on wayland.
Fixes: QTBUG-129108
Change-Id: Icc52528e89baefea04b3b27e6f02674bf74162b2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 353ce5344fbde5a6cecbdd2c131e1cf0f4b7f383)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The rect of an empty widget (i.e. 0 width/height) will, after adjusting
by -1, be invalid as it will have a width/height of -1. In turn, calling
contains(p) on that rect can return true even though the rect is empty.
Fixes: QTBUG-131001
Pick-to: 6.8.1
Change-Id: I604f5942589f1c1079cae90bd0d3b104344d2c55
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 1731d8af741a0a6cc6cd293be4aef52103d0899b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test function assigns a hard coded rectangle to gestures and uses
the default size of a graphics view at the same time.
The leads to flakiness, where the gestures can't be delivered when their
size is out of bounds of the view's geometry.
Assign size size dynamically, according to the view's geometry.
Task-number: QTBUG-130811
Pick-to: 6.5
Change-Id: If75f59d15f84e610b4ec987daa2a06ce62539228
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6995709992344ac608f2b2a19b2c3883019bfaeb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWinRegistryKey::value<T> returns an optional<T> which can make code a
bit more readable than the std::pair<DWORD, bool> return value from
QWinRegistryKey::dwordValue.
This implements part of the "TODO: Remove once all usages are migrated
to new interface." comment in QWinRegistry class because it allows us to
remove the QWinRegistryKey::dwordValue function.
Change-Id: If568de4e31778e91ce7aadadb4aac90e41222826
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7a63a25ef71fbbe7b3eaa6ecb9a26c3e497e582a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
which happens when we build with SDK 14 (where there is not property
for importing PKCS12 in memory only) and then run on macOS 15
(where our trick with a temporary keychain is not working anymore).
Task-number: QTBUG-130500
Change-Id: I05845fa23dec70d48251f5e4d93084a574d67d92
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c9d1f18d0b88f3a4c60bf9a1342459fd67f42dbe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implementation checks the state and returns without storing the
exception when its canceled or finished.
Add tests for both situations.
Done-with: Ivan Solovev <ivan.solovev@qt.io> (analysis and phrasing)
Pick-to: 6.5 6.2
Fixes: QTBUG-128405
Change-Id: I4610a022ea12e1bc9ce24cb17b972b5b9e051f0a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6efec3850da188d3bba075185aa6e5c264c815eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of removing group separators after conversion, we can omit them
using QLocale. The decimal point and group separators can be the
same character, if the user configures the system locale accordingly.
Add a test that compares the text shown by the spinbox with what the
locale would do. Since the C locale sets the OmitGroupSeperator number
option by default, cover several cases to verify that we explicitly
set the correct number options based on the QDoubleSpinBox property,
and implement a customized system locale that returns the same
character for group separator and decimal point.
Fixes: QTBUG-77939
Change-Id: I257ea44ed988c70cb4fc0cfc81c3b366c0a431eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 34b5e43e6259c6362c642a244ceb26d482f35b82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't just silently succeed.
As a drive-by, keep the skipped code visible to the compiler.
QThread::create() is universally available since
4a5f3c8b93, so the skipped code ought to
compile.
Amends ac6a9f9bfa.
Change-Id: I193ecf802ffbfd103747aa34eb307fb1a814a94e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e1b20893aeeb9580bc6b52ac4baea297675bfee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 1ed0dd88a3 moved the finish()
functionality from immediately after run() returns to the time of
thread-local destruction, to make sure that user destructors didn't run
after our cleaning up. But as a side effect, it made other user code run
too late, after some thread-local statics had been destroyed.
This is a common practice, which causes the destructor for worker to run
too late:
worker->moveToThread(thread);
...
QObject::connect(thread, &QThread::finished, thread, &QObject::deleteLater);
QObject::connect(thread, &QThread::finished, worker, &QObject::deleteLater);
This commit splits the cleanup in two phases: QThreadPrivate::finish(),
which runs immediately after run() and will call back out to user code
(finished() signal and delivery of deleteLater()), and cleanup() that
cleans up the QThread{Private,Data} state and destroys the event
dispatcher. That destruction is the only call out to user code.
I've removed the complex mix of pre-C++11 pthread_setspecific() content
and C++11 thread_local variables in favor of using one or the other, not
both. We prefer the thread-local for future-proofing and simplicity, on
platforms where we can verify this C++11 feature works, and because it
allows us to clean up QThreadData and the event dispatcher as late as
possible. (There's some code that runs even later, such as pthread TLS
destructors, used by Glib's GMainLoop)
Unfortunately, we can't use it everywhere. The commit above had already
noticed QNX has a problem and recent bug reports have shown other
platforms (Solaris, MUSL libc) that, 13 years after the ratification of
the standard, still have broken support, so we use pthread for them and
we call cleanup() from within finish() (that is, no late cleaning-up,
retaining the status quo from Qt 4 and 5). See QTBUG-129846 for an
analysis.
Drive-by moving the resetting of thread priority to after finished() is
emitted.
[ChangeLog][QtCore][QThread] Restored the Qt 6.7 timing of when the
finished() signal is emitted relative to the destruction of thread_local
variables. Qt 6.8.0 contained a change that moved this signal to a later
time on most Unix systems, which has caused problems with the order in
which those variables were accessed. The destruction of the event
dispatcher is kept at this late stage, wherever possible.
Fixes: QTBUG-129927
Fixes: QTBUG-129846
Fixes: QTBUG-130341
Task-number: QTBUG-117996
Change-Id: Ie5e40dd18faa05d8f777fffdf7dc30fc4fe0c7e9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4fabde349f16b59f37568da2a4c050c6dd53a34e)
The commit 1f22fc995a introduced nested
functions without properly checking their return status with
QTest::currentTestFailed().
Later, commit 855c448469 used the same
pattern.
Fix all the affected tests by wrapping the function calls into the
pre-existing RUN_TEST_FUNC macro.
Both commits were picked to 6.5, so do the same with this patch.
Pick-to: 6.5
Change-Id: I3e11bf5724d9b89c75a4e5c73c96f9566c36b5cd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some reason, 4d6cf54664a98e01d4caab42431c62d6deb9f86e didn't treat
all lambdas, and no-one noticed.
This patch completes the task by transforming the remaining lambdas to
be non-move-only.
Amends 4d6cf54664a98e01d4caab42431c62d6deb9f86e, whose commit message
is pertinent to this patch, too, but not repeated here.
Pick-to: 6.5 6.2
Change-Id: I6dfe6eb438065e16fcb7ab1f2efcb64c0146bb6c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5c3dc2ecb97b69eb12e06c499ddb50666be60be6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Those files are read by reuse to complement or override the copyright
and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: I01023e862607777a5e710669ccd28bbf56091097
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4c83657448f66ac0ee46900aff2e5a230eda49b0)
There are more tests that create TLS server and can potentially
fail in case SecureTransport backend is in use.
Task-number: QTBUG-130500
Change-Id: Iaf2071c19f3cc0d3617bfc8c484b464c1a212d5a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 81e7d3f95a1646d91d126596d0d7d6acf106298a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So far, the entire tree view was filled with items, so we didn't see how
the empty area below the last item was rendered. Take a screen shot of
the tree after giving it twice the space it originally has to get some
empty area included as well, without breaking existing baseline images.
Task-number: QTBUG-123632
Change-Id: I50714c0b3b04f4b1844e52063d0c0c77ff2d7154
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 4be99b1900f3ba7414a9acbc4777a669fcbd8e3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After 3ca615d9735f7ddb8e2ae5c13e5effd419a56300, the style sheet style
will not draw rows unless the item has a border. Otherwise, it will
assume that the item drawing later on will fill the background anyway.
We also never painted the background for empty rows.
However, if the item's background is semi-transparent, then the row
needs to be drawn first, so that the correct background shows through.
And for empty rows, we need to draw just the background. This is
especially important for trees with alternate background colors.
Add baseline test case for this particular combination. This will result
in a minor change to the results of the existing
transparentBackgroundNoBorderForBranchIndicator test case, where now the
background is drawn behind the indicator area when the item's background
is semi-transparent. I don't think this is a bug though.
Fixes: QTBUG-123632
Change-Id: I2cd4efb748aaefc03a3b576458b750ee47479e97
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit b780eaf6a063a7efe03417cf6b7008a188e222a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
VxWorks, at least as used in the 6.8 CI, has a problem with move-only
lambdas passed to QThread::create(). This might have been the reason
for the resurrection of the cxx11_future feature in
408430a543ef605157963b1a894847c7ba9f9956.
This patch tries to work around the issue by not moving the promise
into the lambda capture, but caputuring it by reference, and then
moving it into a local stack variable. In all cases, the ThreadWrapper
is created after the promise, so, since the ThreadWrapper dtor join()s
(like jthread), the promise out-lives the thread, and the destruction
of the promise happens-after the join() with the thread. So, no data
races. Code mustn't touch the promise object from the main thread once
the ThreadWrapper has started, but that's the case already and the
test functions are small enough for any such future use to be obvious
in review.
Amends 385f0732d9 and
4e1b20893aeeb9580bc6b52ac4baea297675bfee.
It appears that dev no longer has the problem¹, but apply this to dev,
too, to maintain consistency with the test in last three LTS releases.
¹ 4e1b20893aeeb9580bc6b52ac4baea297675bfee passed, but its cherry-pick
to 6.8 did not
Pick-to: 6.5 6.2
Change-Id: If1feba9d3a7f8677789d45fa9f4990cf44145709
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4d6cf54664a98e01d4caab42431c62d6deb9f86e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They are an unnecessary hit on build time.
Rewrite the tests using the standard Qt conventions.
Change-Id: Iac47e62c58b1805c3b4a0ac4f4b3db206c66cc65
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6ddf74716d7b2fe0df5dd9c0172f9ecf936d5c5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the window that the sheet (as created for a modal dialog) lives in
has already been destroyed by the time the sheet is hidden, then we used
to trip an assertion. Instead, always use the sheetParent, which is
still alive.
Add a test case that asserts without the fix.
Fixes: QTBUG-128302
Change-Id: I4c399b73e2552bab79358c5505f403efa8e4f80b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 332f49f2d8c5675bab8bde6acfb377d567961d4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some of the new imageIO plugin tests recently added would fail in
static builds, since the search order is different then.
Fixes: QTBUG-130739
Change-Id: I074bb1bd314e8ff9a6ea90ba0cd27985aca5ad75
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 8f5ee7acbdf957ecb4568927df24bd5076da3262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When applying an "obliquen" transformation with Freetype, this
applies a 12 degree horizontal shear on the control points of the
glyph you have loaded.
However, any other transformation we set on the glyph will be
applied when loading it. So if you have e.g. a rotation on
the glyph as well, then this will be applied first and the
rotated glyph would be obliquened instead, now along the wrong
arbitrary axis in the rotated coordinate system.
To fix this, we detect the case where a transform is applied and
multiply in the obliquen in advance. It means we have to duplicate
some code from FT_GlyphSlot_Oblique() which might get out of
sync (if the slant angle changes in a newer version for instance).
We limit this to the cases that are currently broken so that we
avoid messing with any working use cases.
[ChangeLog][Text] Fixed an issue where artificially obliquened
text would look incorrect when other transformations were also
applied and the Freetype backend was in use.
Pick-to: 6.5
Fixes: QTBUG-97436
Change-Id: I61c5d007e9ea9be2beb283a8b8abbed7723bab38
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit db8230715aa115dc2da5177bb1824fb40c5f2569)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's nothing in our documentation saying this is permitted, but we
have specific code for it on Windows and it works on Unix because we
just wait on a QWaitCondition.
Change-Id: Id6331fa9aad473cb4f35fffdf8bb04d9a34cd108
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5b5297fe87859f59a7aaf5e86a8915c00714fefa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We already disallow them for classes; this was a mistake in not handling
the "struct" keyword. The C++ syntax is valid, but moc is unable to
parse two classes at the same time. Users can define the inner outside
of the body of the outer class and that works.
[ChangeLog][moc] Fixed a bug that caused moc to attempt to parse a
nested struct (not class) with meta keywords and this produced code that
wouldn't compile. Nested classes and structures are permitted, but must
be defined outside of the declaration of the outer class.
The fix for this revealed a bug in the presence of Q_DECLARE_FLAGS for
inner classes. This can be easily fixed by moving the token for
Q_DECLARE_FLAGS value outside of the [Q_META_TOKEN_BEGIN,
Q_META_TOKEN_END] range.
[ChangeLog][moc] Fixed a bug that caused moc to reject a class (not
struct) containing Q_DECLARE_FLAGS that was defined inside the body of
an outer class containing Q_OBJECT or Q_GADGET.
Fixes: QTBUG-130498
Pick-to: 6.5
Change-Id: I2a3f148f70280e87302afffd3e7617e5861bb338
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4e4eef175bc0d0e2a34875ae98f2ddf9eee73b35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Lambdas that only capture by reference never need to be mutable.
Drop the keyword (and the now-superfluous parentheses).
Amends 385f0732d9.
Pick-to: 6.5 6.2
Change-Id: Iaa6451c1c26f1aed198c447ee59198c4e0285b15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 37daf732d5089c58a6428124263243509d152987)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends ff9818135db28e287e7818defd9c1a9acdebacdc and follow-up changes,
which shouldn't have passed CI as they resulted in runtime warnings
until ca8ca216dbd5d374aa05d96db8052c2411baae7c.
Change-Id: Ib3688779d5bcba06ce992453e62fb841251f6a62
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3662be51935827e2fdb384bc407e055470e831c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changing the default section size requires that we inform the parent
view of the header about size changes, and that we update the header
so that we repaint with the new section sizes. This didn't happen.
The private setDefaultSectionSize implementation does all that. However,
QHeaderView only remembers if the default section size was explicitly
overridden; it doesn't care if individual sections were resized, and
overwrites explicitly resized sections. This breaks QTreeView, where
calls to setColumnWidth resizes individual sections, but a style change
(e.g. when setting a style sheet, which results in posted events) would
then overwrite all section sizes with a new default.
To fix that, only resize those sections to the new default that had the
old default before.
This still breaks tests that assume that changing the default section
size will affect sections that have been explicitly resized. To make
those tests pass, and to minimize behavior changes, also resize sections
to the new default section size if they don't have a valid size before,
and adjust the problematic test to resize all sections to 0.
[ChangeLog][QtWidgets][QHeaderView] Changing the defaultSectionSize no
longer affects sections that don't have the old default size.
Fixes: QTBUG-116013
Change-Id: I02fee3f7fda66f4d982bacea1b4a8b14c896bb65
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 32578a088db5769e919a4ec5ebf33346479e7a68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>