Some of the entries in QLocale's single_character_data[] table are
not, in fact, single characters; some RTL languages include
bidi-markers in some of the fields, some locales use some denotation
of "times ten to the power" as the exponent separator. There may be
further complications, but let's just get some tests in that verify we
are correctly serializing numbers in these locales. Include some
parsing tests to show that we are indeed failing them.
Task-number: QTBUG-107801
Change-Id: Iab9bfcea5fdcfcb991451920c9531e0e67d02913
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
%.f should be handled like %.0f. You probably don't want it for strings,
though.
Fixes: QTBUG-107991
Pick-to: 6.2 6.4
Change-Id: I07ec23f3cb174fb197c3fffd1721a941fbcf15e1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
I'm not entirely sure whether this is a toolchain bug or if this is
intended. This commit ODR-uses all the static inline variables in
QOperatingSystemVersion so they are added to the list of exported
symbols in QtCore.
On Windows:
$ objdump -p bin/Qt6Core.dll | grep Windows11E
[2534] _ZN23QOperatingSystemVersion9Windows11E
On Linux:
$ eu-readelf --dyn-syms lib/libQt6Core.so | grep Windows11E
1985: 0000000000575430 16 OBJECT GNU_UNIQUE PROTECTED 18 _ZN23QOperatingSystemVersion9Windows11E@@Qt_6
Pick-to: 6.4
Change-Id: Ia317fd249bcd80dbd02c198803a3a61178c0c219
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It seems the value name correction is not needed at all,
and we must not do such correction.
Amends commit 738e05a55a
Task-number: QTBUG-107794
Change-Id: I903a762aafab4b55275beb8438e6769285821567
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This amends 23780891a5 which moved the.txt
test to tets/auto/corelib/platform/android and kept the old location
mistakenly.
Pick-to: 6.4 6.2
Change-Id: If58422f9a94cfe4d6a941cc5453d8f0506057dcb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Removes a warning in the build.
Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17215c40b40333cb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The `rcc_PREFIX` will be set to `/` if it is not passed to the
function and it is not defined in `QT_RESOURCE_PREFIX`.
I also removed an unnecessary check of the `rcc_PREFIX`.
[ChangeLog][QtCore][CMake] The `PREFIX` parameter of the
`qt_add_resources` is now optional. If not passed, and
`QT_RESOURCE_PREFIX` is not defined, `/` will be used as the path
prefix.
Fixes: QTBUG-104938
Change-Id: I6524ab5dc54f035272e4c2e3154eb67591efb650
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This introduces a new helper function accessibleIdForAccessible
(inspired by Windows' automationIdForAccessible) to synthesize an id out
of the objectNames of the accessible parent chain. The id is then
exposed via the GetAccessibleId D-Bus function for consumption in a11y
tools.
Change-Id: If72b86c5864c43f4ca842aa11423dd8aea0dde4a
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
MySQL has a different default setting for case sensitive table names on
linux and windows which makes the test fail on linux but work on
windows when using the database with the default settings. Read out the
respecitive setting so the test will pass every time.
Change-Id: I8651858d47652022ddc4b6386a6153cf70c6fed6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QHoverEvent ctor takes two points: pos and globalPos; pos is then
passed as both the scene and global pos to the QSinglePointEvent ctor,
which calls QMutableEventPoint::setScenePosition() on the persistent
QEventPoint instance and then detaches befeore setting ephemeral state.
Therefore, we must construct QHoverEvent with scene position first, not
local position, so that the right value is persisted; it's better to set
local position after the detach(), whereas it's too late to fix the
persistent point then.
Pick-to: 6.4
Fixes: QTBUG-106918
Change-Id: I45726a9ec05bba2fe0cde6f5fb87c269105caca6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-1 is the default value for QSurfaceFormat::alphaBufferSize. Changing it
to 0 may result an unexpected pixel format change by ARB OpenGL
extension.
Pick-to: 6.4
Fixes: QTBUG-107629
Change-Id: Ia6a1b90fba6c43b6872b406f4fd946d937135cf8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
There is no reason to use different style of quotes when printing
messages.
Change-Id: I7d513ec04c803702974054569d28f26947942fbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Amends edd983071e.
Remove redundant calls to AAssetDir_getNextFileName() in
AndroidAbstractFileEngine::setFileName(). It's enough to check
if AAssetManager_open() returns null and AAssetManager_openDir() is
valid for the provided asset file name.
As part of this fix, add some unit tests to cover/ensure assets
listing/iterating works as expected.
Fixes: QTBUG-107627
Pick-to: 6.4 6.2 5.15
Change-Id: I37ae9cb64fbbc60699bb748895f77fd6a34fae1f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QWindow::requestActivate() is not supported.
This function crashed very often in ci/coin when system is busy.
Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I82523080db40bddce9c9dc000433117d8ef74847
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
QWindow::requestActivate() is not supported.
This function failed in test vm in coin manually very often.
Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: I013651b0e5e7618c29742effd85a091ca95a7414
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
To allow the user to customize the C++ code that QDoc sees, so as to be
able to work-around some limitations on QDoc itself, QDoc defines two
symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an
entire execution of QDoc.
At a certain point in time, QDoc allowed the user the choice between a
custom C++ parser and a Clang based one.
The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol
would be defined only when the Clang based parser was chosen.
In more recent times, QDoc always uses a Clang based parser, such that
both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent.
To avoid using different symbols, and the possible confusion and
fragmentation that derives from it, all usages of Q_CLANG_QDOC are now
replaced by the equivalent usages of Q_QDOC.
Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
I wrongly assumed we can't query a value with an empty name ""
during the previous refactor commit, however, in Windows registry,
an empty name for a value means the default value of a key, we can
read and write it through the "Default" name.
Remove the wrong assert to fix the crash when we are trying to query
a default value of a key.
Add a new test case to test this kind of scenarios.
Amends commit 40523b68c1
Fixes: QTBUG-107794
Change-Id: Idacbcb86df4435a8c1ca1c19121599390ae8f3d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The libraryMap only stored the file path, so we couldn't load two
versions of the same library as we'd find the other version already
loaded. Change the map to index by file name and version (using a NUL as
separator, since that can't appear in file names).
[ChangeLog][QtCore][QLibrary] Fixed a bug that caused QLibrary to be
unable to load two different versions of a library of a given name at the
same time. Note that this is often inadviseable and loading the second
library may cause a crash.
Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171ce3bb0590978d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
According to the grafana dashboard it has not failed in the
past week.
Reverts ad736e9150
Pick-to: 6.4 6.2
Change-Id: I3eac3c7fd667cfe2cf951b2808dddbfed8eae087
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Regression introduced by commit 8d4eb292b2
in 6.0, when QTaggedPointer was introduced. We set the tag even when the
loading failed and failed to reset it because d = {} retains the tag.
Pick-to: 6.2 6.4
Fixes: QTBUG-103387
Change-Id: Ie4bb662dcb274440ab8bfffd170a07aa9c9ecfca
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QLibrary intentionally does not unload on destruction, so failing tests
may leave libraries already loaded and cause further tests to fail
because of that. So add a cleanup() method to unload everything we may
have loaded.
Note that QLibrary::unload() sets its state to NotLoaded after one
successful call, so we must recreate the object in case it had been
load()ed multiple times.
Pick-to: 6.2 6.4
Change-Id: I12a088d1ae424825abd3fffd171d133c678f910a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The "qhash" test relied on the fact that those four elements would
produce a different order with a zero and a non-zero seed. But since
commit b057e32dc4 removed the setting of a
deterministic non-zero seed, this test had a 1 in 4! chance of failing.
Since 4! = 24, 128 retries should be more than enough to ensure we do
find at least hash seed that provokes a different order.
Fixes: QTBUG-107725
Change-Id: I3c79b7e08fa346988dfefffd171ee61b79ca5489
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
It makes it impossible to rerun it, bad for both CI and local test runs.
As a drive-by name the database file sqlite.db instead of foo.db
Pick-to: 6.2 6.4
Fixes: QTBUG-100245
Change-Id: I2e4ee01189ccbad2a6add5db7771d35fd7248da8
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Various places were knowingly provoking warnings without telling QTest
to check for and suppress those warnings. Some others did check for
this warning, so let's consistently suppress the noise.
Change-Id: I71b9829680c7a513f4d8fbb3c57442875a6c2dc4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
For some reason the QTest::ignoreMessage() was conditioned on the type
being tested being Array; however, the warning is in fact produced for
all types. So anticipate it for all and make the test log less noisy.
Change-Id: I78681624252ff8a71f080204f8b031609ddac468
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There were two copies of the 0x1D157 row and we can't remember why.
So change one of them to the Chakma digit 3 (a spiral) and annote all
three test-cses with what meaning Unicode assigns to them.
Change-Id: I95837588bd5944f7f2c39c8438d9076e844e4dd0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Two test-cases had the same name; distinguish them by the part of
their data in which they differ - one closes, the other doesn't.
Change-Id: I37051baf194bf8df742688739ad01e3335e64dc7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Two rows shared the same name. They claimed the value used was out of
range, but actually that was only true for one of them. The other was
in range, but the test reduced the number of digits allowed after the
decimal point, thereby making it invalid, so rename that one to
reflect this.
Change-Id: I0936ea25ec799c0069cd148b9f9bae5d35906093
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Include the spacings used, to avoid a naming collision.
Change-Id: Iaf78f7142f6780dcf4c7a0b973db9f625af06767
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Avoid duplication by distinguishing similar test-cases.
Change-Id: I1a100d6c9729f0ea356f177535d15c3d36e2da9e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The test used to trigger a lot of QWARN messages; these are clearly
intended, so tell QTest to expect them, so that we get an error here
if those warnings ever don't show up.
Incidentally tidy up a comment and convert a != verify to a
QCOMPARE_NE(), since it's now available to do that job.
Change-Id: I83e225c37abe8446dac06ebe4e75258cb87b71b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In the process, clean up the building of the data tags: use a
range-for loop, albeit we do need an index to show in tags; show it
and the angle in the tags using addRow()'s easier formatting. Change
the low angle tests to show the sign of the angle (which is how they
differ)rather than just labeling them 1 and 2.
Change-Id: Ib5aaa3e22d771c530c9343ba368b0fdfceb264ce
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The last three duplicated earlier ones; and their names didn't take
into account the circle that had been added to the path since those
tests. So revise their names to reflect that.
Change-Id: I32d74f21947b4ba0c04eee53daf8efde6b4a6409
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Two rows shared a data tag. Prefixed one of them with the color of the
half-transparent image it involves (the other's is fully transparent).
Change-Id: I1bd174008ed29bcf2f460e683fdf6d1f12ba19d0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The same data tags were used with two distinct filenames in their
data. Include the basename of each filename in the data tag, to avoid
duplication.
Change-Id: I216fecbd413fab409227ad6f93f8ac3fcc74b059
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The "a" and "A" rows appeared under Valid, then again under Only Keys.
The two copies were identical, in each case, so drop the latter.
Change-Id: Ib3d84710e772171bb4a5e0aefd20022810fb41cd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
tst_QDBusType::isValidFixedType_data() called addFixedTypes() and then
addBasicTypes(); but the latter calls addFixedTypes(), too; so those
rows got duplicated. Only add the fixed types once.
Change-Id: If0d6f44ec7defb12117dad251878850ca75beb48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The row 27 that was positioned before row 01, as if it were meant to
be numbered row 00, was identical to the row 27 that appeared after
row 26. Since row 26 was the other case dealing with the null
QRectF(), I kept the one after it instead of renumbering row 00 and
deleting row 27.
Change-Id: I3585839184233f1f1629280ac9e5b25110c155c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use key(i) rather than valueToKey(value) as the Sha3_* alias Kekkak_*
or RealSha3_*. This way, we still test all members of the enum,
without duplicating row keys (albeit the aliases duplicate values).
Change-Id: I6acba5ffdf5b68294031d609a76b37ca8fad9d94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both countBits() and datastream() had two copies of an all-zeros test
with 35 zeros. Removed the second, in each case.
Change-Id: I5dec4765236ae870c30828dae0f04b8902a100f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
/Zc:lambda seems buggy. Although in my experiments it works well
for 99% Qt repos, it seems some tests will trigger the bug and it
also blocks some new commits. So disable it for now, it's not stable
enough.
Now that this check is disabled, the workaround for tst_qstringapisymmetry
is also not needed anymore, so remove the workaround as well.
Partially reverts commit 8cb832090a
Change-Id: Icf0ecbbaa6262522470e5f5dea05705985ab18f1
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
setFocus() was called on a double spinbox without calling show()
first. That causes flakiness on XCB when checking focus afterwards.
The test can still fail, when focus is acquired by e.g. a system
popup.
This patch adds a show() call before setFocus() to stabilize normal
behavior. In case the double spin box is shown, but cannot acquire
focus, the test is skipped.
Fixes: QTBUG-70088
Change-Id: If02e88800a31b09a1da63dcc074eb8bb1b0df391
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The zlib convenience API we've been using so far has two problems:
- On Windows-64, where sizeof(long) == 4, the use of ulong for sizes
meant that we could not compress data compressable on other 64-bit
platforms (Unix). While zstream also uses ulong, being a stream API,
it allows feeding data in chunks. The total_in and total_out members
are only required for gzip compression and are otherwise just
informational. They're unsigned, so their overflow does not cause
UB. In summary, using zstream + deflate() allows us to compress more
than 4GiB of data even on Windows-64.
- On all platforms, we always allocated the output buffer in such a
way as to accommodate the pathological case of random, incompressible
data, so the output buffer was larger than the input. Using zstream
+ deflate(), we can start with a smaller buffer, then let zlib pick
up where it left off when it ran out of output buffer space, saving
memory in the common case that compression meaningfully reduces the
size. To avoid the first few rounds of reallocations, we continue to
use zlib's compressBound() for input less than 256KiB.
This completely fixes the compression side of QTBUG-106542 and
QTBUG-104972.
Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-104972
Fixes: QTBUG-106542
Change-Id: Ia7e6c38403906b35462480fd611b482f05a5c59c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add at least a few, so size() isn't completely untested.
Pick-to: 6.4 6.2 5.15
Change-Id: I500d28f7efb30ab578808d8fefb6ea57949edc2e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
A violation of coding style (requiring braces on multi-line bodies
of conditionals) was accompanied by a mis-indented else block.
Fix a long line while I'm about it.
Change-Id: Ibe9cf15eadbe9ef58138d7876e5e2c5a14a92fd4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Pull out the arbitrary factor of three as a named constant and
document its arbitrariness once.
Pull out the mask and bit used in each function's loop to the outer
layer of the loop, since they don't depend on the inner loop variable
(or the random value generated in that loop).
Use QTest::addRow() instead of constructing a string to pass to
newRow().
Change-Id: Ifacbcb390e00828fd47f51b0c73d0ad5f6bc8bdb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The tests for indexOf() and lastIndexOf() had duplicate data row tags,
due to only using the needle and haystack, although some tests
differed only in start position. Include start position where needed.
Change-Id: I197d415265ab1a805f2d36fb88aec92ea8646f7a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Enclosing one string in each substring of another does not need to
repeat the empty substring of the latter. Extracting the empty
substring from different positions doesn't get different results.
In the process, tidy up the code a bit.
Change-Id: Ic66febbdadeaac0c466f4f1174d831a991d31e20
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
There were two copies of the same line in mid_data(), leading to
duplicated data row tags.
Change-Id: Ia21e855ff781b13fe18c932cff48cb0aabd12750
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The zlib convenience API we've been using so far has two problems:
- On Windows-64, where sizeof(long) == 4, the use of ulong for sizes
meant that we could not uncompress data compressed on other 64-bit
platforms (Unix). While zstream also uses ulong, being a stream API,
it allows feeding data in chunks. The total_in and total_out members
are only required for gzip compression and are otherwise just
informational. They're unsigned, so their overflow does not cause
UB. In summary, using zstream + inflate() allows us to decompress
more than 4GiB of data even on Windows-64.
- On all platforms, if the size hint in the header was too short, we'd
double the output buffer size and try again, from scratch. Using
zstream + inflate(), we still need to reallocate, but we can then
let zlib pick up where it left off when it ran out of output buffer
space. In all but the most pathological cases, copying the
already-decoded data instead of re-decoding it again should be
faster, esp. if QArrayData uses realloc() instead of malloc() +
free() to grow the buffer.
We also now directly allocate at least as much output buffer as we
have input, to cut the first few rounds of reallocations when the
expectedSize was created, as qCompress still does, using modulo
arithmetic mod 4GiB instead of saturation arithmethic.
Factor the growing of the output buffer into a wrapper function,
flate(), which can be reused when porting qCompress().
This completely fixes the uncompression side of QTBUG-106542 and
QTBUG-104972.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Task-number: QTBUG-106542
Change-Id: I97f55ea322c24db1ac48b31c16855bc91708e7e2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The timestamp will no longer be incremented by 500ms after a mouse
release if the delay has been explicitly specified.
The default delay is 1 ms since f5010c49a3
but the running timestamp was unconditionally post-incremented by 500ms
after every mouse release, to prevent double-clicks, which were always
deemed as unintended (because we have a mouseDClick function for that).
Now, we do that 500ms increment only if the user has not provided a
delay value in the function argument at all. We have often found it
useful in our own tests to generate double-clicks "the hard way", by
sending indivdual events, so as to be able to check state in some target
object at each step, as shown in the new snippet.
[ChangeLog][QtTest] QTest::mouseRelease() and mouseClick() can now be
used to test double-clicks, by specifying a realistic timestamp delay.
Fixes: QTBUG-102441
Change-Id: I8e8d242061f79efb4c6e02638645e03661a9cd92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Fix two tests which got broken due to the latest changes without
notifying because those tests are not run automatically.
Change-Id: Ibe9d9601f0a2ad4ce8f06ca21e7503e77fa55781
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is a combination of Q_UNREACHABLE() with a return statement.
ATM, the return statement is unconditionally included. If we notice
that some compilers warn about return after __builtin_unreachable(),
then we can map Q_UNREACHABLE_RETURN(...) to Q_UNREACHABLE() without
having to touch all the code that uses explicit Q_UNREACHABLE() +
return.
The fact that Boost has BOOST_UNREACHABLE_RETURN() indicates that
there are compilers that complain about a lack of return after
Q_UNREACHABLE (we know that MSVC, ICC, and GHS are among them), as
well as compilers that complained about a return being present
(Coverity). Take this opportunity to properly adapt to Coverity, by
leaving out the return statement on this compiler.
Apply the macro around the code base, using a clang-tidy transformer
rule:
const std::string unr = "unr", val = "val", ret = "ret";
auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(",
ifBound(val, cat(node(val)), cat("")),
")");
auto ignoringSwitchCases = [](auto stmt) {
return anyOf(stmt, switchCase(subStmt(stmt)));
};
makeRule(
stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)),
nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))),
{changeTo(node(unr), cat(makeUnreachableReturn,
";")), // TODO: why is the ; lost w/o this?
changeTo(node(ret), cat(""))},
cat("use ", makeUnreachableReturn))
);
where nextStmt() is copied from some upstream clang-tidy check's
private implementation and subStmt() is a private matcher that gives
access to SwitchCase's SubStmt.
A.k.a. qt-use-unreachable-return.
There were some false positives, suppressed them with NOLINTNEXTLINE.
They're not really false positiives, it's just that Clang sees the
world in one way and if conditonal compilation (#if) differs for other
compilers, Clang doesn't know better. This is an artifact of matching
two consecutive statements.
I haven't figured out how to remove the empty line left by the
deletion of the return statement, if it, indeed, was on a separate
line, so post-processed the patch to remove all the lines matching
^\+ *$ from the diff:
git commit -am meep
git reset --hard HEAD^
git diff HEAD..HEAD@{1} | sed '/^\+ *$/d' | recountdiff - | patch -p1
[ChangeLog][QtCore][QtAssert] Added Q_UNREACHABLE_RETURN() macro.
Change-Id: I9782939f16091c964f25b7826e1c0dbd13a71305
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For the full list, please refer to [1].
Needed to change the qstringapisymmetry unit test:
In theory we don't need the array to be static and it did compile
without any problems so far, indeed. However, with this patch applied,
MSVC complains that the lambda function below can't access the array.
I don't understand why, because we use [&] in the lambda and it should
capture all the variables in theory, but in reality it failed to
capture this variable in the end. And making the variable static
solves this issue. Maybe it's a MSVC bug.
Already tested locally. Most Qt repos build without any issues,
only very few repos are not tested, as my local environment
can't build them.
[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-conformance?view=msvc-170
Change-Id: I658427aa171ee1ae26610d0c68640b2f50789f15
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
When deploying into some directory structure where CMAKE_INSTALL_LIBDIR
is different from Qt's lib dir, we need to set the RPATH of installed
plugins such that Qt libraries are found.
We do this using CMake's undocumented file(RPATH_SET) command and pray
that this command is safe to use across current and future CMake
versions. For CMake versions < 3.21, we use patchelf, which must be
installed on the host system.
The adjustment of rpaths can be turned on explicitly by setting
QT_DEPLOY_FORCE_ADJUST_RPATHS to ON.
The usage of patchelf can be forced by setting QT_DEPLOY_USE_PATCHELF to
ON regardless of the CMake version.
Change-Id: I62ced496b4c12bf6d46735d2af7ff35130148acb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise we don't properly test whether the deployed executable can run
without adjusting the environment.
We temporarily adjust the test_widgets_app_deployment test and set
CMAKE_INSTALL_LIBDIR to make the test pass. It would now fail on Linux
distros where CMAKE_INSTALL_LIBDIR defaults to "lib64" but Qt is built
with lib dir "lib". The next commit removes this hack.
Change-Id: I63c79ef1ee23ffaeed881337fde6e9d889ecc0fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Unix systems have got crash loggers in the past 15-20 years, notably
macOS and Linux (abrtd, systemd-coredumpd, etc.). By setting the core
dump limit to zero, those tools should be mostly inhibited from running
and thus not interfere with the parent process' timeouts. Even for
systems without core dump loggers, disabling the writing of a core dump
to the filesystem should also help.
Pick-to: 6.4
Change-Id: I12a088d1ae424825abd3fffd171d112d0671effe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QWindow::requestActivate() is not supported.
We have one tst_selftests binary, and will test it with both xcb and
wayland qpa plugin. A runtime check and skip will have different
restult files, which is not implemented in testlib yet.
Task-number: QTBUG-107578
Pick-to: 6.4 6.2
Change-Id: Idc8cb24c6f42a9f0f4dc9493e3fd1a5803ba7ce0
Reviewed-by: Liang Qi <liang.qi@qt.io>
Allocate the QSplitter on the stack so that it and its child widgets are
cleaned up when the test function finishes.
As a drive-by, replace QString usage with QByteArray to avoid unneeded
conversion from and to latin1, and modernize list construction and for loop.
Pick-to: 6.4 6.2
Change-Id: I2e29961edbab1ec88be356fca6bc100f08894e82
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In Qt 6, after changes such as 121fddcf5a,
we go through the QPA layer to close widget windows properly. Closing
and hiding of windows is now done in when we receive and handle the
window system's CloseEvent.
Such an event to a modally blocked window should be blocked, so that
users can't close a modally blocked window. However, if the event is the
result of a call to QWindow::close, then it should not be blocked.
Luckily, we know that the event is the result of such a call, so let
such events through. This restores compatibility with Qt 5, where it was
possible to first open a new dialog, and then close the previous dialog.
Add a test case.
Fixes: QTBUG-107188
Pick-to: 6.4 6.2
Change-Id: Id812c1fc36aa0e1a10dfb8d3a16a11d387289b05
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.
Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Just in case the same test is being run in parallel. We do that by
creating a listening TCP server in the test process. This test is
supposed to test the address reusability, so a clean close on a server
that never accepted a connection should not cause reusability issues.
Change-Id: I12a088d1ae424825abd3fffd171ccfb9fc5c09ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To try to figure out why QProcess::waitForReadyRead is returning false
so quickly. Though we know it's going to be "Address in use".
FAIL : tst_QTcpServer::addressReusable(WithoutProxy) 'process.waitForReadyRead(5000)' returned FALSE. (Failed to listen: The bound address is already in use
Netid State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
tcp LISTEN 0 50 127.0.0.1:49199 0.0.0.0:* users:(("crashingServer",pid=40529,fd=4))
)
Pick-to: 6.4 6.2
Change-Id: Ic43a460bfc7c7eb6379405b7a1a064e502b6fef3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This corresponds to Unicode version 15.0.0.
Added the following scripts:
* Kawi
* Nag Mundari
Full support of these scripts requires harfbuzz version 5.2.0,
this version adds support for Unicode 15.0:
https://github.com/harfbuzz/harfbuzz/releases/tag/5.2.0
Fixes: QTBUG-106810
Change-Id: Ib06c526e49b0f01ef9f21123bcf875c6b19f2601
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There were two data8 rows; and no data9, so that was easy to fix.
Change-Id: I8191de142e1a3be57bf1ad97e63d5780f2859fea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two test cases were called "base 2, negative"; one of them use -1 as
value, so s/negative/minus 1/ for it.
Change-Id: Ia5da3952d93976262cc8423d4e75ec19dab9a088
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Using simply the pattern didn't work so well when some patters are
used repeatedly, on different haystacks. So include the haystack
in the tag name. Remove one straight up duplicate row.
Change-Id: Ib46364581f23c493e83d75e6d04ab09e4329a3a5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
One "empty" test was base ten, the other left the code to work out the
base. Change the latter's name to reflect that difference.
Change-Id: I4918eb0d293420df315d86e532787950b8f05be8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The addCommonCborData() helper had two identical rows named simple255.
It only needs one.
Change-Id: Ie934c31f373069788c3ef774fde8956b54814e67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two of the uuidA test cases had an open-brace for the string and no
close; one of them ended with a space (which, apparently, is valid).
Since the data-tag was constructed by formatting the string in a
fixed-width field, padding with spaces, these two cases coincided.
Fortunately the only uuidB test-case had closing as well as opening
braces, so we can just switch the test for "trailing space is not an
error" to use it, instead.
Change-Id: I7068d40145c6b6b3b72777b029282850b1d1ea81
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mate Barany <mate.barany@qt.io>
The first "test1 text" test-case related to a file called test1.txt;
but the second related to a file called test2.txt; I suspect a
copy-and-paste with incomplete post-edit. In any case, change the
latter's data tag to reflect the difference.
Change-Id: I8354a3d1bd18715d6717dfd0962aa70faefbee90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test was using the same tags twice each, giving no clue to the
difference between the two test-cases for each.
Change-Id: I645b01c0c4008a766e505047cb05cc22640ee129
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
It's not clear why this test repeats each test-case five times, but
give the duplicates distinct names, at least.
Change-Id: I4a098d90c3fe6f61842745c1d5f62047fe13a9b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There were simply two copies of the same row-adding code.
Change-Id: I12240dedf2649c314ad32984f4de9d6b9bf280d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Two rows named "hex" were a collision we should avoid.
The two "showpos" rows could be better distinguished.
Change-Id: I43727041eb00e6883ce8b34b346de5e2a63f1a34
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Now I can read it and work out how to rename the duplicated data tag.
Change-Id: I78f2b3f38f955fa6e6a88cb87cfca6e4f755a177
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The test-case for 0.0001 with precision 0 has the same expected text
as that for 0.0 with the same precision; which lead to QBA's test of
it getting a duplicated data tag. Add an optTitle for the one that
isn't precise to deduplicate.
Change-Id: I03600e2af43f6d11b53e05e8027924c92ed4db89
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
It first added a column, then some rows, then called
prependExtended_data(), which expects to be called first in a data
function and starts by adding the same column. So put that first and
drop the duplicate addition of the column.
Change-Id: Ia5cf86f821608e78f0e4872db2b3167ef81cc59e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Having the same test tag for two rows of a data table makes the report
less useful. We also intend to forbid doing that.
Change-Id: I67ec32514b6550f4f97610a2140f1383d0d85b23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The typeSignature for a type T[] is always "[" + typeSignature<t>, so we
can just implicitly support arrays of any known type. To prevent support
for multi-dimensional arrays, make sure that the underlying type is not
also an array.
By adding a QJniTypes::isArrayType in addition (that is true for any
type with a signature starting with '['), methods like
QJniObject::callMethod could then return a special QJniArray type that
provides array-specific functionality.
As a drive-by, and since all lines need to be touched to add braces,
replace std::is_same<>::value with std::is_same_v.
Change-Id: Iccadf03cfceb8544381a8f635bb54baeddf46c99
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
For some reason it has become extremely flaky.
Blacklist to unblock most patches.
Pick-to: 6.4 6.2
Task-number: QTBUG-107500
Change-Id: I11c3ff5e018981be46c20282fa171bce687596b2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
So we can gather statistics on whether it is still failing
Pick-to: 6.4 6.2
Change-Id: I1f4080f4d96f31ce2b689cda175af3a35563e232
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
None of these users require C++20 constexpr or C++23 noexcept, the
only remaining difference between std::exchange and qExchange.
This leaves a single qExchange() user, in QScopedValueRollback, that
requires the constexpr version, only available from C++20, and thus
remains unported.
Task-number: QTBUG-99313
Change-Id: Iea46f6ed61d6bd8a5b2fd9d9ec4d70c980b443a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Skip tests that depend on programmatic window activation on platforms
where this is not supported, such as Wayland.
- Change tests that don't rely on the window being activated to use
qWaitForWindowExposed() instead.
Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Ieb4280343a725a2cbdc46a8ac5c657beeb2e7e57
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
These escapes were documented but not used until the version 15.0.0
of Unicode.
Task-number: QTBUG-106810
Change-Id: If48dcd80acf32989e3f47676ca3d41848a325c0e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
focusProxyAndInputMethods tests focus acquisition and inheritance with
a toplevel widget, acting as a focus proxy for a child.
X11 window managers are set to be bypassed, programmatic focus is set
with QApplicationPrivate::setActiveWindow().
The test is flaky on Linux/XCB, and therefore blacklisted on most
Linuxes.
This patch removes focusProxyAndInputMethods, considering that
- focus proxying is tested in tst_QWidget::focusProxy()
- window activation and focus inheritance are tested in
tst_QWindow::isActive()
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I510fd935399d9ad0b6cd76f1bd5db0811e0702f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When laying out a text and calculating maxWidth, we must _always_ take
into account the accumulated width of spaces (lbh.spaceData.textWidth)
regardless of wrapMode, other text content, spaces position, etc.
Fixes: QTBUG-106947
Change-Id: I2ac9af92ed7dd07c1e040bfcf83949a358d1c9c9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
After 1d961491d8, palettes are different
if they either have different brush data, or a different private. Two
privates can share data, but still must generate different cache keys.
The cacheKey has so far been composted of the serial number of the Data
struct, and a detach number that is incremented when we detach the
private.
This failed for two reasons:
- the implicit copy constructor of the Data class copied the serial
number, when it should have incremented it. Fix that by member-
initializing the serial number rather than doing it only in the default
constructor. The member initialization is also executed for the copy
constructor.
- the detach_no logic as it was implemented does not guarantee that two
copies of the same palette that share data, but have different resolve
masks (and thus different privates) have different detach_no values.
Use a static serial counter for that number as well.
Amend the test case to verfiy that cache keys, and the elements of the
cache keys, change when they are expected to.
Fixes: QTBUG-106984
Pick-to: 6.2 6.4
Change-Id: I84d7055ce8bfe0d42f1f8e9766f3f1ad610f4ec8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
In the presence of QT_CONFIG(opensslv30).
Fixes: QTBUG-107027
Change-Id: I481db3cdf3bbb1aa7127cc5498f0c0217df8c35b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This introduces a way to trace each entry in the glyph index
array to a specific index in the original text passed to
QTextLayout, as well as a convenience function to access
the original string from the QGlyphRun.
The index information is stored in the logClusters array internally
in Qt, but it contains the inverse information: For each
character in the output string, it contains an index into the
glyph array. In order to get the string indexes for each glyph,
which makes a lot more sense in the context of the QGlyphRun
API, we need to do a little search to construct the data.
To avoid adding unnecessary allocations, we make the new APIs
opt-in. If you do not specify anything, you will only get the
glyph indexes and glyph positions as before. However, you
can now specify exactly which parts of the layout to extract
using an optional flags parameter.
This also adds a manual test which can be very handy to
visualize QTextLayouts and how they are split into QGlyphRuns.
Fixes: QTBUG-103932
Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Given a QTaggedPointer, users may write
taggedPtr = {};
to mean "reset it". This is error-prone: due to overload resolution,
this actually ends up calling QTaggedPointer<T>::operator=(T *),
which changes the pointer but *not* the tag, and not the implicitly
declared QTaggedPointer<T>:operator=(const QTaggedPointer<T> &)
which would reset both pointer and tag.
Given the idiomatic usage of {} is indeed to perform a full reset (cf.
std::exchange(obj, {}), std::take, etc.), work around this by disabling
the operator= overload for pointers in case an initializer list is
passed. In other words, make `={}` fall back to the implicitly
declared overload.
Note, this breaks some usages, such as
taggedPtr = {rawPtr};
but at least we get a compile error for these, and they don't look
common at all.
[ChangeLog][QtCore][QTaggedPointer] The operator assignment
taking a raw pointer has been reimplemented in order to avoid
subtle issues when assigning `{}` to a QTaggedPointer. This will
cause code that assigns a braced-init-list to a QTaggedPointer object
to stop compiling (for instance, `tagPtr = {ptr}` is now ill-formed).
Change-Id: I5e572a9b0f119ddb2df17f1797934933dff2ba7b
Task-number: QTBUG-106070
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QDateTime] The 't' format character in a
toString() template can now be repeated to get alternatives to the
(unparseable) zone abbreviation. Thus 'tt' now gets the zone offset
without colon, [+-]hhmm; 'ttt' gets the same with colon, [+-]hh:mm,
and 'tttt' gets the zone name. Previously, each 't' was replaced by
another copy of the abbreviation.
Task-number: QTBUG-95966
Change-Id: Iccccd11f06fa732ed27c0e5d4e40a3d4b5f79f8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QDateTime] The 't' format used in fromString() can
now be repeated to restrict parsing to particular forms. Thus 'tt' now
matches the [+-]hhmm offset format (no colon), 'ttt' the [+-]hh:mm
offset format (with colon), and 'tttt' matches an actual zone
name. When used singly, 't' still matches anything the parser knows
how to interpret as a zone specifier.
[ChangeLog][QtCore][QLocale] The 't' format in toDateTime() now has
repeated forms, as for QDateTime::fromString().
Task-number: QTBUG-95966
Change-Id: I73753145cb66a56bc25a5c2dd5cb051ba982fa2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The placeholder text was given its own QPalette color role in Qt 5.12,
but there has been no way to specify it from a Qt style sheet.
Fixes: QTBUG-93009
Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It was our old, HP-UX machine on Itanium (ran on big-endian mode). We
don't support HP-UX any more; HP will still support the 11i v3 release
until 2025, but I doubt anyone wants to run any new software there. One
hopes that HP has long since fixed the issue, but I doubt it since the
last release is from 2007. Gravlaks probably ran HP-UX 11i v3.
There are a couple other left-overs of ".troll.no" in the repository,
the majority of which are URL manipulation in tst_qurl.cpp and in
tst_qnetworkcookie.cpp, then the certificates for fluke.troll.no (valid
until 2035) and aspiriniks.troll.no (expired in 2009, but we don't need
it for validity).
Change-Id: I810d70e579eb4e2c8e45fffd1719122747d7b85a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
To indicate success of a conversion, the public API has previously only
supported registering member functions of the form To (From::*)(bool *).
When adding custom converters for types that cannot be modified, this is
usually not a possibility.
As an alternative, this patch adds support for std::optional in the
UnaryFunction overload of QMetaType::registerConverter. If the returned
optional has no value, the conversion is considered failed.
Task-number: QTBUG-92902
Change-Id: Ibac52d2cb9b5a2457081b4bebb0def1f03e3c55d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Prior to 5.12, the placeholder text color was hardcoded to be the same
as the text color, but with an alpha of 128, i.e. semi-transparent. In
5.12, it instead got its own ColorRole in QPalette. So behavior
changed (In some cases in 5.12 and later, consistently from Qt 6):
placeholder texts no longer got a "light" (semi-transparent) version
of the css-styled color, but just the default gray/semi-transparent
black. That problem was reported as QTBUG-89815. However, the fix for
that bug did not apply the semi-transparency, but only used the same
color as the text. That caused a confusing visual expression, as
actual and placeholder text would look the same. This commit fixes
that.
The problem was made worse since there is no way to specify the
placeholder text color from css, i.e. to style it independently. A
follow up commit will aim to add that.
Fixes: QTBUG-92199
Task-number: QTBUG-93009
Pick-to: 6.4 6.2 5.15
Change-Id: I9e6698d34eba91cbf65c4da07aa5ac6d9f96a9ed
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
syncqt.pl adds an extra dependency on perl when building Qt. Modern C++
provides the convenient cross-platform way to access a filesystem and
to use regular expressions, so we may replace the perl script with C++
application. The syncqt executable is built at configure time and
installed as QtCore tool. It's running at configure time to deliver the
required header files for IDE to build a consistent code model and at
the build time to keep tracking changes in header files and generate
the missing aliases without reconfiguring. 'syncqt' only parses header
files from a CMake build tree, so the resulting Qt installation only
contains interfacing headers that belong to the platform that Qt is
built for. 'sync.profile' files are not used as the 'source of truth'
for sync qt procedure anymore, all the necessary information is taken
from either CMake files at configure time or from the module header
files while parsing them.
syncqt.pl is still in place since it's required as fallback solution
for a smooth transition to the new syncqt implementation for all qt
repositories.
This patchset only enables the C++ based syncqt for 'qtbase'
repository.
From the performance perspective C++ version works faster then perl
script, also the configure time is reduced significally on subsequent
reconfigurations - up x2 times faster when re-configuring repository,
but it also takes time to compile the tool itself the first time.
Numbers for qtbase:
syncqt.pl syncqt.cpp
initial: 0m16,035s 0m20,413s
reconfig: 0m6,819s 0m3,725s
The syncing procedure can be run separately for each module using
<ModuleName>_sync_headers targets. The 'sync_headers' target can be
used to sync all the modules at once.
Task-number: QTBUG-87480
Task-number: QTBUG-103196
Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since setScaledClipRect will actually render only the necessary parts,
there may be insignificant differences in rounding/anitaliasing
compared to rendering the whole image first and then clipping.
Hence this autotest case would always fail. But that would not happen
in CI, since it tests qtbase without the qtsvg module, and then the
SVG tests are skipped. (For some reason, one ran into this in wayland
testing and made an exception for that, but obviously this failure has
nothing to do with wayland).
Work around the issue by converting the rendered images to 4 bpc
format, so the differences in the least significant bits get truncated
away.
Fixes: QTBUG-100917
Task-number: QTBUG-81044
Pick-to: 6.4
Change-Id: I1c14e98af22d0ae22a751960b69e692c7a38399b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This improves moc's support for nested inline namespaces, so that code
containing them will not break compilation.
For simplicity, we allow nested inline namespaces even in C++17 mode
(the actual C++ compiler will reject the code anyway, and probably with
a better error message than moc could output).
moc still has no real awareness how inline namespaces work, but that is
a preexisting issue.
Pick-to: 6.4 6.2
Fixes: QTBUG-106920
Change-Id: I7b415a99133575f101bc81d01d4670a5f752917f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 013c346a8d. It was
determined to cause a regression in Qt Quick: QTBUG-106899.
In order to unblock integrations, we need to revert the change. It
can be re-committed later when the problem has been analyzed and
addressed.
Pick-to: 6.2 6.4
Fixes: QTBUG-106899
Task-number: QTBUG-89557
Task-number: QTBUG-104986
Change-Id: I04054587f68ab39fdb038b02fc69ebfa3dc7d197
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Before searching, foldCase the first up to 256 characters, and use this
buffer to compare against the haystack. If the needle is larger than the
buffer, compare the rest of the needle against the rest of the haystack
for every potential match. The buffer is placed on the stack and must be
refolded for each search, but this change does not break the API.
This is faster than the old implementation, except if the needle is long
and it is found near the beginning of the haystack, or if the needle is
long and it is not found in a short haystack where few comparisons are
done and hence few case foldings were needed in the old implementation.
Benchmarking using tst_bench_qstringtokenizer tokenize_qstring_qstring
shows an improvement for the the total testcase and usually for each
individual test.
Fixes: QTBUG-100239
Change-Id: Ie61342eb5c19f32de3c1ba0a51dbb0db503bdf3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Inserting the same key repeatedly with QMultiHash will not
test rehashing behavior because in Qt6 those entries all
end up in a linked list.
Pick-to: 6.4
Change-Id: I78c45eed0f35a13af6d6da75d7189a6933750f13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It seems all the others have had this treatment, but one got missed or
added while the others were being fixed.
Change-Id: If47e2c6bf939b7a55f2c38b029c1df3a901e8bfc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
And don't decompress the data
Pick-to: 6.4
Fixes: QTBUG-106689
Change-Id: I93a96be8178e24ff0b0bb8647276828161445cf5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The QTRY_* macros and QTestEventLoop exit early if the test has
resolved; however, in the cleanup phase of a test, even if the test
has failed, these loops should continue as normal.
[ChangeLog][QtTest] During the cleanup() phase of a test, the QTRY_*
macros and QTestEventLoop now ignore the test resolution, in contrast
to when they are used from the test itself, which (since 6.3.0) exits
the loops early if the test has failed.
Pick-to: 6.4 6.3
Fixes: QTBUG-104441
Change-Id: I2673161967cbbc57815155af698a9338ab98a686
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The regex used a greedy .+ to match an actual dot and a space,
preceding an open parenthesis, with the result that if the message
contained any parentheses that .+ swallowed everything up to the last
of them. Correct the regex so that recently-added tests' error
messages show up correctly.
Change-Id: I6e52c9b2a6e7959335fcddbb4266f65b589eba68
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The recently added test for QTestEventLoop produced a message which
the TAP test-logger mis-parses. Since that message shall soon go away
(when I fix the bug the new test exists to verify), modify one of
cmptest's QVERIFY2() messages to trip up the same bug, so we can spot
any regressions on this in future (after the imminent fix to this TAP
issue).
Change-Id: Ibbe9931c01c75df529c9571e2bbdbd34010dd9ec
Reviewed-by: Jason McDonald <macadder1@gmail.com>
QDockWidgetLayoutState::itemRect() has been used to calculate a dock
widget's size when unplugging from the main window. This method is meant
to calculate the size of the rubber band, showing the dock widget's
dock area.
The rubber band is by QDockAreaLayout::sep wider (top or bottom dock)
or higher (left or right dock) than the respective dock widget. This is
to make sure the rubber band is never fully covered by the dock widget.
By wrongly using itemRect() also for the dock widget's size after
unplugging, the dock widget grows in size each time it is unplugged.
This patch passes an invalid QRect to QDockWidgetPrivate::unplug(), in
order to prevent resizing.
tst_QDockWidget::unplugAndResize() is extended to check size
consistency after unplugging (corrected for frame margins).
Fixes: QTBUG-106531
Pick-to: 6.4 6.2
Change-Id: I1cf9f695691b0e165a5cb2881781602426e5d587
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Amends 2d0c31e7d9. We were using
MetaTypeDecay in qTryMetaTypeInterfaceForType; but that is not used by
moc when complete types are enforced. Change qt_metaTypeArray to also
use qTryMetaTypeInterfaceForType, so that the code path for "force
complete types"[0] and the normal one do not diverge.
[0] Most easily enabled by using one of the QML type registration
macros.
Fixes: QTBUG-106672
Pick-to: 6.4 6.4.0
Change-Id: I9bf14873d1d0c4127a676643f7e8eb77f6e42dc8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
To support cancellation of continuations attached via the parent future,
for each future returned by a continuation we store a pointer to its
parent (i.e. future the continuation is attached to). Later, before
executing a continuation, we go through chain of parents and check if
any of them is cancelled. However, if one of the parents is destroyed
while the chain is executing, the next continuations' parent pointers
will become invalid. So storing the parent pointers isn't safe.
This commit changes the logic of handling the cancelled continuation
chain in the following way:
- Instead of storing a parent pointer in the continuation future's data,
we do the opposite: we store a pointer to continuation's future in the
parent.
- When a future is cancelled, we mark all continuation futures in the
chain with a flag indicating that the chain is cancelled.
- To guarantee that the pointers to continuation future's data don't
become invalid, we clean the continuation (that stores a copy of its
future's data and keeps it alive) only when the associated promise
is destructed, instead of cleaning it after the continuation is run.
Fixes: QTBUG-105182
Fixes: QTBUG-106083
Pick-to: 6.2 6.3 6.4
Change-Id: I48afa98152672c0fc737112be4ca3b1b42f6ed30
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When laying out, we need to increase layout's maximum width _only_
if the previous line was not explicitly wrapped by a line or paragraph
separator, or if the current line's width is greater than the
previously accumulated layout's maximum width.
Fixes: QTBUG-89557
Fixes: QTBUG-104986
Pick-to: 6.2 6.4
Change-Id: Ib7cc4b9dda8f20166dcbd5cfd3b56424bb33d14a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
There are some issues when testing QGraphicsView on GNOME(xorg)
overlapping with the default top bar. This change only move
the view a bit.
Notes:
* There is no CentOS in CI any more.
* panelPropagation() and panelStacksBehindParent() failed in CI
and local vm on Ubuntu 20.04, but only in CI on Ubuntu 22.04.
For example, we can turn the top bar off:
In Extension Manager, install Just Perfection, and disable Panel
in Visibility in it, all tests will pass too.
Task-number: QTBUG-84258
Task-number: QTBUG-103054
Pick-to: 6.4 6.2
Change-Id: I05c262540c85af00182cd142760c4a29554b04c9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The composition implementation may act unexpectedly on Inf or NaN input
values. This change avoid those values, without changing the current
implementation.
Pick-to: 6.4
Fixes: QTBUG-101236
Change-Id: I8e4ee67f53093b7f81e014b28d8a028ba2ddcc47
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
On Unix, we have the fchmod(2) system call that changes the permissions
of an open file descriptor. This commit adds a test for that, by not
closing the QFile before setPermissions().
Pick-to: 6.4
Change-Id: If5d5ef6220874ae8858efffd171255b9f20ed501
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In theory, if we succeed, the permissions should be what we set, but
let's not make that assumption. And if we failed, it might be because
the file disappeared or something else, so re-stat()ing the file is a
good idea.
Pick-to: 6.4
Fixes: QTBUG-7211
Change-Id: If5d5ef6220874ae8858efffd171255506b7bbee0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
__has_include(<chrono>) is always true, because C++11 chrono include
is required since 6.0.
Pick-to: 6.4 6.3 6.2
Change-Id: I50cb92571bf4f1f86e2f3f2b5f486dd3c3f30f4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And remove the platform-specific code.
fenv is available since c++11.
Change-Id: Ia5540be93b54117d4b5e9c7579100039c151dcc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before this change, qt_deploy_runtime_dependencies supported Windows and
macOS only. We add a generic deployment method implemented in
cmake-language with file(GET_RUNTIME_DEPENDENCIES). This deployment
method is now enabled for shared builds on Linux.
The file(GRD) command requires that the EXECUTABLE argument points to
the executable in the build directory.
Only libraries in Qt's installation directory are considered for
deployment. This includes Qt's own libraries and also things like
libicu*.so we're shipping with the installer.
Unlike macdeployqt and windeployqt, the generic
qt_deploy_runtime_dependencies does not yet support deploying
translations. We will catch up on this in a later commit.
Change-Id: Iea23abcdba774d4c1885c8d2c243eb3e48fb7fae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
These tested results are all wrong and caused by internal overflows.
Note the behavior can not be fixed either as it involves moving an
already maximized QRect, which can not be done without overflow.
Change-Id: If35db68102889012c56eb149fe49bc48954d3422
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Some errors, such as 404, may still present useful data. As opposed to
errors such as 'RemoteDisconnected'. So, just keep the data around until
the reply is deleted.
Pick-to: 6.4
Fixes: QTBUG-106573
Change-Id: I6c86b5a55a45f837ea9b42559d88cd3e0ac2fa5c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Synthetic mouse events are not reliable, as the platform might restrict
synthetic mouse moves. In addition, the WM might automatically activate
the window when the other window is hidden, which makes the EXPECT_FAIL
flakey.
Since the test was not written to test window activation, let's just
explicitly activate the window.
Fixes: QTBUG-23699
Pick-to: 6.4
Change-Id: I0ac1d3bc0658dfbd600a1f5d960839860be6dd2c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Its debug member can be set where it's declared, making the
constructor redundant.
Change-Id: Ic1195108766a6a86c3392a5bcf7f197ea31e8068
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Refactor QWinRegistryKey to make it more modern and more
usable from outside.
Adjust the test for QWinRegistryKey to test the new functions,
merged with the original test.
Will port raw registry accessing code in QtBase to use this
class in follow-up commits. This change is the first step.
The long term goal is to port QSettings registry code to
this class instead of using raw Win32 APIs, however, there's
much more registry code in QSettings and migrate them to this
class needs a large refactor, so jsut leave it for now. Will
fix it in some future commit.
Change-Id: Iada2adb41b4d58e1b658ff6870a4b31ace479d43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
For some reason when running this test on macOS 13 in the CI the window
is activated, as on other platforms, but this is not reproducible
locally, so we can't just remove the QEXPECT_FAIL.
Task-number: QTBUG-104210
Task-number: QTBUG-23699
Change-Id: Ib1cacb36d90d2be357756c82af2427f2b3ab9999
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
For some reason it fails on Ubuntu 22.04, but it's anyway
not following the trend the rest of the file uses, so just
assume it's the code at fault and fix it.
Thanks to Liang Qi for debugging this!
Pick-to: 6.4
Fixes: QTBUG-106016
Change-Id: I9d0563a081827eaa037d61643f0ea46301e11493
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Expand a test to cover millsecond format variants more thoroughly,
including a test for the new usage of zz. This applies to parsing the
complement to commit 0a36a7c1db173089c25ea09029505a589a1c59e5's change
to serialization. Fixed minor glitch in the serialization's doc, too.
[ChangeLog][QtCore][QDateTime] When parsing a datetime, the 'zz'
format specifier is now equivalent to 'z', as for serialization.
Change-Id: I1c5700064738d9c92d5e8ce10bff8050131e190f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the standard mechanism instead of a hand-rolled way of identifying
function/data-tag combinations. Adds missing data relevant to
identifying test cases, some of which previously had apparently the
same name, with no hint at why the test-case was seemingly run
repeatedly.
Change-Id: I6225c6d1990069c94a1f1c8dbb179993b96076e7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This can be helpful when you calculate multiple hashes, store them in a
vector and you want to know which result belongs to which algorithm.
[ChangeLog][QtCore][QCryptographicHash] Added getter algorithm().
Change-Id: Ifcf78536f215619a6e2e3035a95598327d0ed733
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This adds a move constructor, a move assignment operator and a swap
function to QCryptographicHash. This can (to name one example) be useful
when you want to store multiple hashes in a vector.
[ChangeLog][QtCore][QCryptographicHash] Added move constructor, move
assignment operator and swap() function.
Change-Id: Id54594fa69104ec25ad78581f962a021e85531c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The method should by contract return nullptr when the stack is empty,
but it crashes in this case.
Also, unit-test the case.
Pick-to: 6.4
Change-Id: If64b71e761efd9a5cd5af407cd68cba7f8dbc8e2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If we receive compressed data we will decompress it as it comes in,
in some cases the final byte we receive doesn't actually contribute
to the final output. If this byte is handled by itself then, when
combined with QNetworkReply's signal compression, we ended up not
emitting the readyRead signal for any of the data we received while
compressing the signals.
So, instead of relying on checking difference in bytes downloaded
for each batch of data received we keep track of how much data
we had received the last time we emitted readyRead.
Pick-to: 6.3 6.4 6.4.0
Fixes: QTBUG-106354
Change-Id: I4777be29b46bf0de968667e9de9d975c735ac6e6
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Because it's convenient to have it build automatically.
Pick-to: 6.2 6.3 6.4
Change-Id: Iecd5bd1f9fe518f683b8ee9eb6529e48ce76fb33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Some tests in corelib/kernel need threading support, but they are not
guarded against compilation if Qt is built without threading.
Such tests have been disabled in this case.
Change-Id: I2f5dc9582f2a59b6af2a9e56638b045dca06193d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Test was not really good to start with - it was assuming the presence of
particular ciphersuites. Furthermore, it was ignoring the fact that
TLS 1.2 and TLS 1.3 set ciphersuites differently in OpenSSL.
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I6c8ba20154cdeb9275878462ab945729d6c82ecc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The collection of translations available to us need not have anything
to do with whether CLDR has matching data, so preserve the system UI
language list's entries as they are, rather than forcing them through
the QLocale constructor's exercise of likely sub-tag rules.
Instead, simply parse the given locale tags to QLocaleId instances and
use these in the likely-subtag processing to determine what other
entries to add to the list in addition to those supplied by the
operating system. Since going via QLocale did usually supply a
territory, that was included in the BCP 47 name, it's now possible for
the given entry to lack the language_territory name, so be sure to add
that if missing.
This incidentally reduces heap traffic and saves a fair deal of hidden
likely-subtag processing in calls to the constructor and bcp47Name().
Expand testing of QLocale::uiLanguages(), both plain and system. In
the process, cross-link the two closely-related tests, move a comment
on one's _data() to the other's, where it really belongs, and add
reporting of the actual lists on failure. Enable MySystemLocale to
remember the requested locale's ID, before likely sub-tag processing,
so that we can make query() report results for language, script and
territory as requested, to ensure the fake system locale really does
match what was requested. The new german-britain test failed without
it, because there is no de-GB locale in CLDR.
Task-number: QTBUG-99531
Change-Id: Ide041577772c442a4413e3b9a590e11140c48f49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Have QSystemLocale manage a stack, so that tests can install an
over-ride for the actual system-specific one reliably and restore the
system-specific one when finished. Leave the QSystemLocaleSingleton
out of the stack, all the same. In the process, mark the QDoc comments
for QSystemLocale all as \internal, since this is not public API.
Change-Id: I8faed49780215e42f32be10cf936c32bb46105bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When the system locale is en_DE, macOS seems to think we should use
en_GB as the right translation. While that probably is a sensible
choice in the absence of an en_DE translation, we should definitely
use the en_DE translation if available, especially if en_GB isn't
available (which lead to a fall-back to de_DE, given later entries in
macOS's list). So prepend the system locale's own pcp47Name() if it
(isn't the C locale and) is missing from what we would otherwise have
used for uiLanguages(), after likely sub-tag perturbations.
Add a test simulating (some approximation to) what macOS was doing
that would have caught this case; and add a scope-guard reporter to
the test to report what shows up when lists don't match.
Fixes: QTBUG-104930
Pick-to: 6.4 6.4.0 6.3 6.2 5.15
Change-Id: I116234708067e1717d9157aebc84da76e04a9f38
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Certain masks are not supported outside 32-bit x86, and will assert on
x64.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106000
Change-Id: Ic9f58e5a19c1db3309edeb5ec529e7a78c929665
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We only want to enable writing BOM if we have _not_ started
writing.
Fixes: QTBUG-106279
Pick-to: 6.2 6.3.2 6.4 6.4.0
Change-Id: Ibcbc101b931615fddb2507f01307bf9619772d7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace the deprecated operator*() calls with various
overloads of QMatrix4x4::map()
Add a separate test for deprecated API and guard it with
QT_DEPRECATED_SINCE checks.
Task-number: QTBUG-104858
Change-Id: Ief2e03198696382dc626f01b209614fe320e70b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
qdbusxml2cpp has a -m/--moc option. Change and modify the behavior
such that
-p foo -m includes moc_foo.cpp in the generated .cpp
-p :foo.cpp includes moc_foo.cpp in the generated .cpp
-p foo.h:foo.cpp includes moc_foo.cpp in the generated .cpp
Change the Qt6DbusMacros.cmake file accordingly.
[ChangeLog][qdbusxml2cpp] The -m/--moc option now generates
idiomatic moc file names (moc_base.cpp for headers, base.moc
for implementation files)(was: always base.moc). Build systems
using workarounds for the non-idiomatic naming of moc files
used by qdbusxml2cpp in the past can now drop these workarounds
for Qt versions >= 6.5.
Fixes: QTBUG-103313
Change-Id: I754b1b276f130cb8645166470e1b457a676590f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
OpenSSL 3 by default disables TLS < 1.2 in the conf files. We're not
going to work against that, so we bump the version of TLS used.
Keep the client-side TLS 1.0 Or Later just to keep testing that this
part works.
Task-number: QTBUG-95123
Task-number: QTBUG-106018
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ia6cb10495875de232d69a886832ae74c5f5ac15f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
When TopMargin is set in TextBlock and the mouse click position is
between Margin (the mouse is not on the textrect), the cursor will
usually jump to the end. So topMargin should be considered when
hitTest() calculates coordinates.
Fixes: QTBUG-91774
Pick-to: 6.4 6.3 6.2
Change-Id: I231377263855b9cd7152684203fc4ed2e9299bb9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tang Haixiang <tanghaixiang@uniontech.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
On Wayland there is a special case when decorations are enabled,
where we post an initial update request to ensure widgets are
redrawn after the buffer is recreated (see
af7b60ade5c4be81cbc58eb18307c017d5594071 in qtwayland). To
make sure the test behaves the same on Wayland as on other
platforms, we disable client-side decorations when running
these tests.
The flag is primarily required for the requestUpdate() test
at the moment, but it is only queried once per application
run, so it has to be set before any tests are run.
Pick-to: 6.4
Fixes: QTBUG-100889
Change-Id: Ica6d744083ecae4a3722b6d04b956e7615f0dfe5
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The initial problem was in server not starting encryption, because
its certificate was rejected by OpenSSL (v3) saying 'weak md'.
After the certificate was replaced, we got another problem - due
to the fixed TLS v.1 protocol for both client and server - handshake
is interrupted early with 'tls v1 alert' and error message
saying about not found signature algorithms. Don't fix the protocol
version, use proper QSsl::SecureProtocols (default).
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I0f22f5304f4405933ad511195bc61c640518e7d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The certificate was using SHA-1 for signing its certificate, which is
considered 'not good enough' by some TLS libraries.
Regenerate it with SHA-512 and a larger RSA key.
Also include the files needed to generate it.
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I535e047d540e663c8cec334695196044173949fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Batching the tests leads to one of the tests tst_qmetaobject and
tst_qmetaobject_compat not being registered in the batch. Attempts to
batch those together fail as batch test name is defined per-source,
which, in this rare case, is the same across the two targets.
Change-Id: I356931feabc004c39ba0b6863b5f64e06d739a58
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
OpenSSL v3 by default sets SECLEVEL = 2 unless overridden in conf files.
SECLEVEL >= 1 means TLS <= 1.1 is disabled. Remove cases that were
previously expected to work. Arguably, we should not test deprecated
protocols at all, but the cases expecting a failure still work
and logically correct.
Task-number: QTBUG-95123
Task-number: QTBUG-106018
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ifa59fa902b433338dbed7abf086cfdef9470384c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was an old test written in a very low-level way, which perhaps is ok
to be independent of testlib in a few tests; OTOH, it was blacklisted
on a couple of platforms. Perhaps doing touch events the standard way
could be more stable.
While we're at it:
- verify that the touch events are accepted, and thus verify the new
bool return value from commit()
- implement paintEvent() to help understand the layout, and touchpoint
locations
- remove repeated QCOMPARE lines
- skip the test if window positioning fails
- try to un-blacklist it, on the assumption that window positioning
failure was the reason
Task-number: QTBUG-87025
Task-number: QTBUG-104656
Pick-to: 6.4
Change-Id: Ie22eb24abf95cd849990a56212be87d06ce8e574
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
[ChangeLog][QtCore][Meta Object] QMetaMethod::invoke(),
QMetaObject::invokeMethod(), and QMetaObject::newInstance() are no
longer limited to 10 arguments.
[ChangeLog][QtCore][Meta Object] The use of the Q_ARG macro is no longer
necessary when using QMetaMethod::invoke(), QMetaObject::invokeMethod(),
and QMetaObject::newInstance(). Types may now be passed
directly. Similarly, Q_RETURN_ARG can be replaced by the free function
qReturnArg().
[ChangeLog][Potentially Source-Incompatible Changes]
QMetaMethod::invoke(), QMetaObject::invokeMethod(), and
QMetaObject::newInstance() no longer support passing forward-declared
types in the argument list (it was possible to pass them by
const-ref). From Qt 6.5 onwards, all types in the argument list must be
fully defined.
[ChangeLog][Potentially Source-Incompatible Changes] Attempting to use
the internal types QArgument, QReturnArgument, QGenericArgument, or
QGenericReturnArgument directly with QMetaMethod::invoke(),
QMetaObject::invokeMethod() or QMetaObject::newInstance() may fail to
compile. Those are internal types that were never meant to be used
directly and will be removed in Qt 7. If really necessary, ensure all
arguments passed to those functions are directly using those classes and
not mixed with Q_ARG and Q_RETURN_ARG. Implementations of bindings to
other languages should contact the Qt development mailing list to
discuss options.
Change-Id: I36b24183fbd041179f2ffffd1701e3e8e47e0fba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The doc of QMetaEnum::valueToKey() says to use ::valueToKeys() instead
for flag types.
Pick-to: 6.4
Change-Id: I48e5ba47324137f2ce2710f1d876e93e7c562e9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This includes QDBusReply, QProperty, and QStringBuilder expressions.
The new constructor subsumes the QStringBuilder case without requiring
jumping though hoops to delay the definition of the ctor the way we
had to for the explicit QStringBuilder constructor, so remove the
explicit QStringBuilder one again.
[ChangeLog][QtCore][QAnyStringView] Can now be constructed from
anything that implicitly converts to either QString or QByteArray.
Fixes: QTBUG-105389
Change-Id: I0e584dd3e20d591381609a3329ef47cec7356ecc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Since qVersion() might be called also from C code, disable the parts of
qlibraryinfo.h that are relevant only for C++ code if __cplusplus is not
defined.
[ChangeLog][Potentially Source-Incompatible Changes] qVersion() is
moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>'
needs to be added where it's used.
Task-number: QTBUG-99313
Change-Id: I3363ef3fa4073114e5151cb3a2a1e8282ad42a4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
And include qcore_mac_p.h where needed.
Task-number: QTBUG-99313
Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since we had code to default to zstd as the default algorithm instead of
"Best", we ended up not compressing anything.
[ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with
any compression algorithm if the --no-zstd option was present.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106012
Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
With OpenSSL 3.0.5 we see X509_print giving us the text representation
not matching any of previous ones - mostly a question of spaces
and formatting. Let's add a proper version to compare against and
remove useless 0.9.8, 1.0.0, 1.0.1, - we don't support them anymore
and thus QSslCertificate::toText() will never give a match.
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106017
Change-Id: Ida11321c23e74c7313acc682237ab78408cf2803
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
leaf.p12 is using RC2 for encryption and it's disabled by default
in openssl v3.
Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-106017
Change-Id: I4edd0d29506d1e50b2b618b6a00cceeb4b156204
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The test expects the helper libraries to contain the .dylib suffix
rather than .so.
Replace glob copying of the libraries (which depends on the underlying
shell) with manual copy calls.
This also ensures the libraries don't contain a _debug postfix in the
file name even in a debug build, which would break the tests.
Amends f8c1909320
Amends 1dff26dd95
Change-Id: I20361c33c4a1b9dd4b5273fcdb8cc79c9f266327
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Because this version does not seem to like MD5 which old cert was using.
Fixes: QTBUG-106019
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Id354d1e32acb0528685b2788ee9c7326c43397bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
[ChangeLog][QtCore][Meta Objects] The QMetaObject::invokeMethod() taking
a method name by string, QMetaObject::newInstance(), and
QMetaMethod::invoke() now support more than 10 arguments.
[ChangeLog][QtCore][Meta Objects] The use of the Q_ARG and Q_RETURN_ARG
macros is now optional with QMetaObject::invokeMethod(),
QMetaObject::newInstance(), and QMetaMethod::invoke(): the type name
will be obtained from the C++ type (the same as QMetaType). The function
qReturnArg() can be used in place of the Q_RETURN_ARG macro. The macros
are still useful in rare conditions where the type was typedef'ed from
its original name.
Change-Id: I36b24183fbd041179f2ffffd17022a2b48c7639b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For the case that a newly created and registered accessible
interface gets removed again from the cache before another one
gets registered, the next registered interface was
previously assigned the same "unique ID" again, which e.g. breaks
assistive technology when using caching
with AT-SPI, since that relies on the assumption
that the ID is actually unique for each object.
(But here, the new object was using the same object path
as the old one, so data from the old object would be
used for the new one.)
To prevent that from happening, increment the
counter for the next ID to try at the end of
QAccessibleCache::acquireId, so the next time
the method gets called, it doesn't try again
whether the same ID as used previously is
available again.
For consistency, also rename the variable used
for the counter from lastUsedId to nextId.
This also adds a corresponding test case.
Fixes: QTBUG-105962
Pick-to: 6.4
Change-Id: Iddf4f3b35c57895bcfbb623a5377edf8344ab6c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The paletteChanged() and fontChanged() signals were deprecated
in Qt 6.0, but the test was still using them unconditionally.
This patch guards the usage of the deprecated signals with
the usual QT_DEPRECATED_SINCE(6, 0) check, so that the test
can be built and run with QT_DISABLE_DEPRECATED_UP_TO >= 0x060000
This commit amends 68ea9c0227
Task-number: QTBUG-104858
Change-Id: Idb2da6d91afcdb664f325f23ec625947c9a7fac0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The patch includes the following replacements:
* QMetaType::type("name") -> QMetaType::fromType<Type>().id()
* QMetaProperty::type() -> QMetaProperty::typeId()
* QVariant::Type -> QMetaType::Type
* qRegisterMetaType<T>("name") -> qResigeterMetaType<T>()
* The static QMetaType::{load,save} methods are replaced with
non-static versions
* Replace QCOMPARE(property.type(), QVariant::UserType) with
QCOMPARE_GT(property.typeId(), QMetaType::User), because the
deprecated type() method was treating each custom type
(id >= QVariant::UserType) as QVariant::UserType, while the
typeId() method simply returns the actual id.
As a drive-by: remove unneeded QMetaType registration tests
as we have tst_QMetaType to check it.
Task-number: QTBUG-104858
Change-Id: Ia08e002efdf07ff83366a5193164dba96a956f9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The most common changes are:
* Replace QMetaType::type("name") with QMetaType::fromName("name").id()
or QMetaType::fromType<Type>().id()
* QMetaType::typeName(int) -> QMetaType(int).name()
* QMetaType::typeFlags(int) -> QMetaType(int).flags()
* QMetaType::metaObjectForType(int) -> QMetaType(int).metaObject()
* The static QMetaType::{load,save} methods are replaced with
non-static versions
* The static QMetaType::{create,destroy,construct, destruct} methods
are guarded by QT_DEPRECATED_SINCE calls. The tests are also
extended with non-static calls where they were missing. Fixed
potential memory-leaks in these tests.
Add separate unit-tests for deprecated APIs and guard them with
QT_DEPRECATED_SINCE
As a drive-by: use nullptr instead of 0 in some places
Task-number: QTBUG-104858
Change-Id: I4b0cdd29bc197c186b835002372240aae3098c33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use consistent defines across both tests in the directory
Change-Id: Idd84603135c8c164d09ae41d5faa7ca3a5fc7c3c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Since Qt 6.0, QMetaType stores the name obtained from the C++ compiler,
which means we know a type like Qt::Alignment by its proper, full name
of QFlags<Qt::AlignmentFlag>. However, the meta object records only the
bare name of the enumeration, not the full flags.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105932
Fixes: QTBUG-96185
Change-Id: Ic6547f8247454b47baa8fffd170eab977e306377
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Initially, stream receive window's size was quite significant.
At some point when dealing with a server that did not want
our windows' sizes and was closing the connection (they only
accept 64K) we reduced this size, which ended in a regression
with download speed significantly throttled. We return the old
values (or even more, presuming we have 10 multiplexed streams
and not 100). And also making QNAM consistent with its documentation
(it was not updated).
[ChangeLog][QtNetwork] Stream receive window that HTTP/2 protocol in QNAM is using
increased to 214748364 octets (from the previous 64K) not to throttle download
speed. Clients, working with servers, not accepting such parameters,
must set HTTP/2 configuration on their requests accordingly.
Fixes: QTBUG-105043
Pick-to: 6.4 6.3 6.2
Change-Id: I252b6b5eefe92a7304dad15c67928d5a57d9597f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Unifies our approach to calling CoInitializeEx and CoUninitialize,
removing a lot of boilerplate in the process, and also fixes a few
bugs where we would incorrectly balance our calls to CoInitializeEx
and CoUninitialize.
The optimistic approach of qfilesystemengine_win.cpp of calling
CoCreateInstance without initializing the COM library explicitly
has been removed, as calling CoInitializeEx should be a noop in
the situation where it's already been loaded.
Change-Id: I9e2ec101678c2ebb9946504b5e8034e58f1bb56a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
It does a check to ensure you aren't comparing outside the container.
Fixes: QTBUG-106001
Pick-to: 6.2 6.3 6.4
Change-Id: Ic6547f8247454b47baa8fffd170eef346b7f4f24
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
9a369a25dd added a
QAccessibleEvent ctor that takes a QAccessibleInterface*
instead of a QObject*.
Retrieving the QAccessibleInterface* later is done using the
interface's unique ID stored in the m_uniqueId member.
However, the fact that m_uniqueId is a member
of the union alongside with m_child means that setting
a child via QAccessibleEvent::setChild also overwrites
the stored unique ID, which breaks retrieving the accessible
interface later.
Fix this for the case where the QAccessibleInterface has
an associated QObject by assigning m_object in the ctor as well.
This means that a QAccessibleEvent created using either of the two
constructors (the one taking the QObject* and the one taking
the QAccessibleInterface* associated with the object) now behaves
the same.
Fixing the case where there is no associated QObject would require
further changes (e.g. adding a member for the QAccessibleInterface*
or making the m_uniqueId member a separate member instead of having
it in a union with m_child). However, I see no way to do so without
breaking the ABI, so that is left unchanged.
This also adds a corresponding test case.
Fixes: QTBUG-105988
Pick-to: 6.4
Change-Id: I71a548af0277a5034e9e207f066fa3e25c5393f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QScopedPointer::take() call in comparison() test was used to
avoid a double-deletion error, because the test is creating two
QScopedPointer instances referencing the same memory.
Avoid the take() call by providing a custom DummyDeleter and
managing the memory by the extarnal std::unique_ptr.
As the test now has no test-cases for QScopedPointer::take()
calls, create a new test for this deprecated API, and guard
it with QT_DEPRECATED_SINCE checks.
Task-number: QTBUG-104858
Change-Id: Iecc28d44d76c9ce5835e6b1a1df7db30e2a9ca25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The most common changes are:
* removing the explicit tests for deprecated APIs
* QMultiMap::insertMulti() -> QMultiMap::insert()
* QMultiMap::insert(QMultiMap) -> QMultiMap::unite(QMultiMap)
Add separate tests for the deprecated APIs, and guard them
with QT_DEPRECATED_SINCE() checks.
Task-number: QTBUG-104858
Change-Id: Ifb79212d07f20028d93d75f2b32ec3785cc93b22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant::Type -> QMetaType::Type.
* Guard the test for deprecated fromUtf16(const ushort *) overload with
QT_DEPRECATED_SINCE check.
* Use fromUtf16(const char16_t *) overload in other places.
As a drive-by: fix formatting in the affected lines.
Task-number: QTBUG-104858
Change-Id: I9fa3a935bca36e97f934f673e2fc07b451c72872
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Logging category lcQpaDockWidgets was used in both dock widget test
and implementation. This dual use caused static builds to fail.
This patch replaces lcQpaDockWidgets with a test specific logging
category in tst_QDockWidget.
Pick-to: 6.4 6.3 6.2
Change-Id: I02cdfdaee9c1c1840126d803139b3d271aeac236
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For those, moc does know their type ID, and yet they may be still
forward-declared in the C++ side, so the meta object may have recorded a
null pointer in the metatype array.
Fixes: QTBUG-105832
Change-Id: Ic6547f8247454b47baa8fffd170dae07c0813dc7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Implement auto test for (de)serialization of dock widget properties.
Test settings compatibility by importing a hard coded byte array.
Test serialization format and sequence by comparing expected and real
serialization output.
Test dock widget closing behavior (QTBUG-103474) to ensure that
no closing inconsistency is caused by serialization incompatibility.
Extensively document/comment the test to ensure failures can be easily
interpreted in the future.
Task-number: QTBUG-103474
Change-Id: I3c1589c2c291b2ed56334d09b85536d4c7388f92
Pick-to: 6.4 6.3 6.2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
These functions are marked as deprecated in future Qt releases.
Task-number: QTBUG-104858
Change-Id: I25d2932455d8c9e3e2d722b1c48fc2cfa2d1e679
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Guard the test that checks the deprecated protocol versions
Task-number: QTBUG-104858
Change-Id: I1b76e08d8fc985abf758bf86198fe3d33e5497d4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
An item delegate might override destroyEditor to merely reparent the
existing editor out of the item view for later reuse, rather than
actually destroying the editor.
As of d0dffdfc01, the code calling
closeEditor() - which calls destroyEditor - might explicitly set focus
back to the item view parent of the editor. This needs to handle that
the parent of the editor might no longer be valid after the closeEditor
call returns, and rather store the old parent widget explicitly.
Add a test case that segfaults with nullptr access without the fix.
Fixes: QTBUG-105231
Pick-to: 6.4 6.3 6.2
Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The client does not know its global window position on Wayland,
so testing for this will not work.
Pick-to: 6.4
Fixes: QTBUG-100888
Change-Id: Ibdfc84f1b33d25223dbd740603ce4783c21afc70
Reviewed-by: Inho Lee <inho.lee@qt.io>
The value will be propagated from Qt build.
Task-number: QTBUG-104858
Change-Id: Iae2c32c3037438f41b92f9ee28004f30eb4e3210
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Wrap some tests that specifically test deprecated APIs
into #ifdefery
* Refactor some tests to use available methods
Task-number: QTBUG-104858
Change-Id: I03e318004ce1c2718ee574bf11e00df9bc04bcaa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Moved the modal window resolution to
QWasmWindow::requestActivateWindow so that multiple async activation
events are not issued in unpredictable patterns.
- Request activation on added windows and on stack top in case of
window removal
Pick-to: 6.4
Change-Id: I6f02cf1b7e83abb7961caf311ffc83e91c8bf810
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If restoring a QHeaderView state from a data stream with version Qt_5_0,
check alignment and resize mode properites for out-of-bound values.
If out of bounds, try QDataStream version Qt_6_0, which is used by KDE
apps compiled with 5.15.2 or 6.2.3.
QFileDialog stores settings in the same settings file across different
Qt versions, using different QDataStream versions. That makes
QFileDialog vulnerable to the issue (QTBUG-104962). A respective auto
test is added with this patch.
Fixes: QTBUG-104962
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104425
Change-Id: I666207fca7ab837ad27a247e504a40757ee8afab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
CUPS has a feature called printer instances that allows saving
different sets of default options for a single print queue,
s. section "Creating Saved Options" at [1].
A printer instance can be set up using e.g.
lpoptions -p printer/instance -o name=value
The printer instance is then listed with the print
queue name and the instance name separated by a slash
in the 'lpstat -e' output.
Qt also supports CUPS printer instances and displays
them using the same as printer names.
However, tst_QPrinterInfo::getPrintersFromSystem was
previously truncating the printer name at the slash,
so the comparison of printer names on a system that
has CUPS printer instances set up would fail e.g. as follows:
********* Start testing of tst_QPrinterInfo *********
Config: Using QtTest library 6.5.0, Qt 6.5.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 12.1.0), debian unknown
PASS : tst_QPrinterInfo::initTestCase()
QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() Test believes Default Printer = "PDF"
QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() QPrinterInfo::defaultPrinter() believes Default Printer = "PDF"
QDEBUG : tst_QPrinterInfo::testForDefaultPrinter() QPrinterInfo::availablePrinters() believes Default Printer = "PDF"
PASS : tst_QPrinterInfo::testForDefaultPrinter()
QDEBUG : tst_QPrinterInfo::testForPrinters() Test believes Available Printers = QList("Canon_MX390_series", "PDF", "PDF", "PDF-5cm-margins", "dummy", "dummy-ricoh-c3000", "tofile-hp-officejet-8600", "tofile-ricoh-aficio", "tofile-ricoh-mufu", "tofile-samsung-m2875", "tofile-test-tdf106963", "tofile-xerox-phaser-6510")
QDEBUG : tst_QPrinterInfo::testForPrinters() QPrinterInfo::availablePrinters() believes Available Printers = QList("Canon_MX390_series", "PDF", "PDF-5cm-margins", "PDF/myinstance", "dummy", "dummy-ricoh-c3000", "tofile-hp-officejet-8600", "tofile-ricoh-aficio", "tofile-ricoh-mufu", "tofile-samsung-m2875", "tofile-test-tdf106963", "tofile-xerox-phaser-6510")
FAIL! : tst_QPrinterInfo::testForPrinters() Compared values are not the same
Actual (qtPrinters.at(i)) : "PDF-5cm-margins"
Expected (testPrinters.at(i)): "PDF"
Loc: [/home/michi/development/git/qt5/qtbase/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp(232)]
Fix this by adding the slash character to the regex.
[1] https://www.cups.org/doc/options.html
Change-Id: Id0dc27a8b4c592847ed364cebf277e988039cad4
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Q_DECLARE_EXPORTED_LOGGING_CATEGORY is available from 6.5 only, hence
cherrypicking this solution fails.
Change-Id: Ib3351a8846bb5cf6047cd2d13c9f7cd242df9c93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If an included header brings in MacTypes.h it will cause issues,
so rename the enum to be on the safe side.
Pick-to: 6.4 6.3 6.2
Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QObjectPrivate::declarativeData member is stored in a union with
currentChildBeingDeleted. The QObject destructor always sets the
currentChildBeingDeleted member of the union. It also sets the
isDeletingChildren bool, which is the only way to find out which union
member we can safely access.
While the QObject destructor is deleting children and isDeletingChildren
is set, we must not access the declarativeData member of the union.
Add a test case that initializes the function pointers for the
declarative handlers and constructs a situation where an object
emits a signal while it is destroying children.
Fixes: QTBUG-105286
Pick-to: 6.4 6.3 6.3.2 6.2 5.15
Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Otherwise new clients will not be handled when they try to connect
Amends 29a1fe72a0
Pick-to: 6.4
Change-Id: Ifff052d1bf27682df2782faa285a257c9b41d86f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The new name describes the behavior in a better way.
[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.
Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fails on Android 12 in CI.
Task-number: QTBUG-105739
Pick-to: 6.4 6.3 6.2
Change-Id: Ibf3deb6b84564f12b5172f2522875fe70f8ce87b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This fails on Android 12 in CI.
Task-number: QTBUG-105738
Pick-to: 6.4 6.3 6.2
Change-Id: I94fcefae3d88087cd96f4043b015f9469ed629a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Android kills this test case which tries to use too much memory,
or it times out.
Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: Ifce92533d50f4c463ee10fe80e7654ad16172a35
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The default camera to plane distance is 1024, when rotating a big image
along the x or y axis, some areas of the screen may move above the
camera, causing the rotation to fail. A new rotation interface has been
added to allow users to specify the distance from the camera to the
plane themselves when rotating the QImage. Also, this support has been
added to QMatrix4x4::projectedRotate.
[ChangeLog][QtGui][QTransform] Added overloads to rotate() and
rotateRadians() that allow specifying of the distance to the rotation
plane.
Fixes: QTBUG-105088
Change-Id: I81f629916ddd9b6ab84e0282191e4284a88a85f5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Windows VMs are provisioned with shared folders that are available as
\\${COMPUTERNAME}\testshare(writable)
so we don't need to access a remote SMB server over network anymore just
to test whether our string-parsing code handles UNC paths correctly.
Add a QTest::uncServerName() helper function to the shared filesystem.h
header and use that instead of QtNetworkSettings::winServerName. The
latter is now only used in tst_NetworkSelfTest::smbServer().
Pick-to: 6.4
Change-Id: Id0da66369ad0f4a980d612de2a31a391f1192253
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Not just the ones we added to the pending sockets list
Pick-to: 6.4
Change-Id: I0a0016fe39df7ca2fc3f0c4e4111195bc6d90198
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If a client doesn't send any data then we would leave the socket open
for as long as it needed, wasting resources. Add timeouts to limit the
amount of time this can happen for.
Since there is a limit on number of sockets that the server will have
queued, having idle sockets stick around forever is a vector for ddos.
Pick-to: 6.4
Change-Id: Ida6251c92c625eeadf2065861b840b14255654b8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
SecureTransport ignores any content that comes in until it is large
enough to be a handshake. So a plaintext client may be left hanging
while it is waiting for a response.
Pick-to: 6.4
Change-Id: I501ae61d89d516765c7ba5f0d916d9246fde5d4d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Build a simple widgets qmake project when targeting iOS in the CI.
This ensure we don't introduce basic regressions in the .pri / .prl
file generation.
Make sure to target the ios simulator, so we don't require any
code signing or provisioning profiles.
Pick-to: 6.4
Fixes: QTBUG-96058
Change-Id: I1a5564e838a5ce3cac89a37a5a4ddee74d3400f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
And use the new overloads in examples and tests.
[ChangeLog][QtXml][QDomDocument] Deprecated the old setContent()
overloads in favor of the new ones that take ParseOptions and
ParseError.
Task-number: QTBUG-104507
Change-Id: I61b37eba2fe3002c03bddc90f6877676d539f7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Couldn't reproduce flakiness on OpenSUSE KDE/X11 and can't see any
history of flakiness in the last 3 months in our testresults database.
Task-number: QTBUG-62967
Task-number: QTBUG-63262
Change-Id: Id50291798eda922283e04b45205ae9105e9fdab2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Window activation is not working reliably on X11 when combined with
X11BypassWindowManagerHint, see QXcbWindow::requestActivateWindow().
The test itself counts repaints, so qWaitForWindowExposed() shouldn't be
needed.
This way we don't need to QSKIP() the test if window activation fails.
Fixes: QTBUG-98921
Change-Id: I849b7261c757fb7cbcde73f11bbe1a74a862cb9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Removed entries that do not reproduce on OpenSUSE and that are no
longer flaky in our CI according to our testresults statistics database.
Adjusted entry for resizeAnchor testcase which has been seen flaky in
RHEL-8.4 and cursor2 which is very flaky on macOS.
Task-number: QTBUG-105249
Task-number: QTBUG-105247
Change-Id: I3e258f81d6bbf540a4b3dec763fdfd4bdc511847
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Can't reproduce in OpenSUSE, and no flakiness has been seen in the past
6 months in our testresults statistics database.
Task-number: QTBUG-63260
Change-Id: I465aa4b9f82726e9685f64b0dc235d3235c4bd9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Executing the tst_qgraphicsitem::sorting() testcase individually always
fails on my KDE/X11 desktop. The window never seems to have focus and
the call to qWaitForWindowActive() returns error after a few seconds.
It seems qApp->setActiveWindow(&view) never succeeds in giving focus to
the window containing the widget.
Fixes: QTBUG-105221
Task-number: QTBUG-74760
Change-Id: I148dab09d0fb592376b3902e4ed10799f9a52274
Done-with: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This led to an infinite recursion in case the annotation was completely
missing. Instead of trying to fix that, I'm simply implementing the
"### Qt6" request from c62f717226 .
[ChangeLog][qdbusxml2cpp] Removed the old compatibility code that
accepted "In" annotations for signal argument names, introduced in Qt
5.8.
Pick-to: 6.4
Fixes: QTBUG-104722
Change-Id: Ie4bb662dcb274440ab8bfffd1709bfc3daf0846d
Reviewed-by: David Faure <david.faure@kdab.com>
The old stack structure used to keep track of windows has been improved
to conform to the actual windowing assumptions: there shall be one root
window, which is always at the bottom. The first created window
immediately becomes the root window. Should the root window be removed,
all windows are non-root, i.e. any of them can become the top-level window
Fixes: QTBUG-105094
Pick-to: 6.4
Change-Id: Ic553244fa9f5bc3ee590b702935e66cfc62d5f8f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Running tst_qrhi -platform eglfs will pass on RPi4 / Mesa 22.
This does not test Vulkan of course since the platform plugin cannot
create a Vulkan instance.
Running tst_qrhi -platform vkkhrdisplay will enable Vulkan but will
still try OpenGL since the autotest does not query the platform
integration about OpenGL support. Make this nicer by skipping most of
the GL test if the platform integration we have cannot handle OpenGL
stuff anyway.
For some tests the data-driven approach has to be removed since doing
QFETCH without any rows will crash. These two OpenGL-specific tests
now check OpenGL support directly and QSKIP if needed.
While we are at it, fix up the Vulkan instance API version as well.
Pick-to: 6.4
Change-Id: I2891c04540bc2dfd0ccf475629bd23542bff15f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The _data function is useless without its test function (and it's not
used in other _data functions).
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I7aa6006ed1a9d89008577b750af4ea717dae237f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If a font family has several instances from different foundries,
we disambiguate this by adding the foundry name in brackets behind
the family. But QFontDatabase::hasFamily() would only check for
families().contains(familyName). So if the database contains e.g.
Foo [Bar] and Foo [Baz] then a check for hasFamily("Foo") would
fail.
So we need to actually check for the family name instead. In
doing this, we also skip the extra step of building the list
and then searching it, but just go directly to the source.
This removes the BLACKLISTing of Ubuntu and also introduces a
QSKIP on Unix-based platforms without fontconfig, since there
is no way to know which default fonts are acceptable on those
platforms.
Pick-to: 6.4
Fixes: QTBUG-86967
Change-Id: Id8ad80a1671daf1c14fbad8bb8f4c51ee1c59709
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As discovered in the expanded testing of QTRY_COMPARE() using the same
class, the timer needs a context object and a slot to call.
This amends commit 35ad157d88
Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I41fc23de84ce8c7d6608db0005276a2071974494
Reviewed-by: Jason McDonald <macadder1@gmail.com>
In the process, simplify the latter while adding some actual
time-variation for the QTRY_* loop to navigate round - based on the
extendedcompare test's ClassWithDeferredSetter. Testing remains
primitive, but is at least a bit more thorough.
Pick-to: 6.4
Change-Id: I40be8fb485f3f18f0a4f4bc62ad36cccac691979
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
These contain output only ever sent to stderr, which tst_selftests no
longer looks at; it merely verifies stderr is empty for all tests
except those expected to produce stderr output, and ignores the stderr
output for these last.
Change-Id: I50fee445d84c2d125e6db5303fc389e87746455e
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The way the Qt 6.0 QMetaTypeInterface was designed, using a static
inline variable in a template, would normally require the linker and
dynamic linker to merge all copies and choose a single copy as the
official one. But because of hidden visibility and of Windows DLLs,
QMetaType already copes with multiple copies NOT getting merged. So we
may as well ask the linkers not to bother and use simpler, local
relocations to find those symbols.
They are all supposed to still be equivalent and it's an ODR violation
if they're not.
The Apple ld64 linker complains if you use this type of global
relocation:
ld: warning: direct access in function
[...]
to global weak symbol
'QtPrivate::QMetaTypeInterfaceWrapper<int>::metaType'
Fixes: QTBUG-93471
Pick-to: 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f98a10aa719434
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Because of the template shenanigans. This is just to make sure.
Pick-to: 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f989e7d555894f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This fixes the flakiness seen in OpenSUSE KDE/X11 desktop.
Fixes: QTBUG-70590
Task-number: QTBUG-105177
Change-Id: I7c2431e58b2a60ea04e26d4e70c0f2867d544ff2
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Use activateWindow() that is documented as the right way to raise a window.
Task-number: COIN-892
Change-Id: Ic9aadee0d3a526fd8e46e5b1099b5b0861700207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
I can't reproduce the test failing after hundreds of iterations on
OpenSUSE, and the test hasn't flaked at all in our CI in the last 6
months according to our dashboards.
Fixes: QTBUG-70612
Change-Id: I2397f3db5caf97f674de7d75fd99bd14c14166a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
I can't reproduce the issue after hundreds of iterations on OpenSUSE,
and the test hasn't flaked at all in the last 3 months according to our
dashboards.
Task-number: QTBUG-66371
Change-Id: I9c4daf851e09fbcb47a6ab39418e7b213ccd9dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
ownMethodIndex works for all kind of methods, also for constructors.
Therefore, remove the assertion there (that checks for non constructors)
and add a test in qtbase so it does not happen again.
The test broken by the assertion is in qtdeclarative:
tst_QJSEngine::newQMetaObject().
Also rename QMetaMethodPrivate::ownConstructorIndex() to
ownConstructorMethodIndex() as the previous naming implied that
ownMethodIndex() could not be used for constructors.
amends b73ab954df
Task-number: QTBUG-105360
Change-Id: I0244993ed79bee055645b5443f5d02e1c089a6c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Those were workarounds to passing a comma to a macro, but there are ways
around it. The simplest is to just use variadic macros; another, which
has been applied to Q_DECLARE_METATYPE for a long time, is to define an
alias to the thing you're trying to use.
Change-Id: Ie4bb662dcb274440ab8bfffd17097fbf0c53eabc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
[ChangeLog][CMake] The target-based variant of qt6_add_resource gained
the option BIG_RESOURCES. This can be used instead of
qt6_add_big_resources, which is not target-based.
Fixes: QTBUG-100268
Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The intialSize bug has been fixed in Qt Wayland Client, and thus
this test will now start XPASSing.
Pick-to: 6.4
Task-number: QTBUG-66818
Change-Id: I4b9cb8bd9306a67f04295eb23f09574dad0e97f7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Fairly minimal for now, just enough to verify a bug and serve as the
sign of success when it's fixed. Tests fail in ways they shouldn't,
for now; see expected_eventloop.* for details, notably "Earlier test
failed to clean up" messages.
Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I59be4aa5f21fed23b19a0593a8c2f6c9956507df
Reviewed-by: Jason McDonald <macadder1@gmail.com>
We need to skip the exifReadComments test case if reading text from
image has been configured off, like in webOS's Yocto recipe for QtBase.
Fixes: QTBUG-105393
Pick-to: 6.4
Change-Id: If45872ca7ed26620fa38bc6b47132363d661acdc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Using convertDoubleTo() to get a whole number, from which to determine
the number of digits we're allowed before the fractional part, fails
if the double isn't a whole number, which lead to the skip being
checked. Use qFloor() of the double (as this should have as many
digits as the double had before its decimal point, which is what we
care about; qCeil() might round up to a power of ten).
This amends commit ff6d2cb0d5
Fixes: QTBUG-105341
Pick-to: 6.4 6.3 6.2
Change-Id: I4e0105d4602682c59e9830ec9a37556c96db884e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The vast majority of in-tree users pass simple and short C string
literals as the value. By porting to QByteArrayView, we document that
we'll accept non-NUL-terminated data, and do the NUL-termination
internally, using SSO'ed std::string, saving memory allocations in the
common case of short strings.
I didn't bother to check which direction std::string takes for
nullptrs these days (there was a change accepted in that area for
C++20 or 23), so play it safe and protect against them.
Follow-up to
Task-number: QTBUG-105302
Change-Id: I2369acc62f1d5cbc26135396cfe0602d8c75300c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The logging category lcQpaDockWidgets was explicitly declared in
tst_QDockWidget. That failed to complile on static builds.
This patch replaces the explicit declaration with
Q_DECLARE_EXPORTED_LOGGING_CATEGORY(lcQpaDockWidgets, Q_WIDGETS_EXPORT)
Pick-to: 6.4 6.3 6.2
Change-Id: I1cad0e672313be84297eeddf992f6cafe9a35977
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The old code assumed that a QByteArray's data() is always
NUL-terminated. Due to the conflation of owners and non-owners in
QByteArray (but also in case we ever get efficient substringing), this
is not always the case, e.g. QByteArray::fromRawData() does not ensure
NUL-termination.
From QString::utf16(), we learn that the condition to check for is
QArrayData::isMutable(). After working around the fact that
QByteArray::data_ptr() doesn't exist for const QBAs and that empty
QBAs always refer to QByteArray::empty_, which is !isMutable(), we can
detect this situation and re-allocate without introducing new API.
This is the fix for Qt ≤ 6.4. For Qt 6.5, we'll port the function to
QByteArrayView.
Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-105302
Change-Id: I3416535ab09d601e0e87b2767f2c024ba1217e64
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Explicitly running the install step would fail in a non-prefix build.
Do it conditionally on the no_prefix feature.
Pick-to: 6.4
Change-Id: I78cd63f51c499a0df451b08290c6dfc84e52666c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Says Clang 10:
tst_qfocusframe.cpp:73:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>());
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
tst_qfocusframe.cpp:73:28: note: place parentheses around the assignment to silence this warning
QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>());
^
(
tst_qfocusframe.cpp:73:28: note: use '==' to turn this assignment into an equality comparison
QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>());
^
==
Amends f1812aad89.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I3920ab0da725b76fb6c19bbc7cde7920f351af4a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>