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>
With -no-feature-sql, CMake would error out because the target Qt6::Sql
didn't exist. Fix this by checking if the target exists.
Task-number: QTBUG-102480
Pick-to: 6.2 6.3 6.4
Change-Id: I411631acfd336ea699833954f86711067d160c04
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Interesting on its own just because it exercises stencil testing,
unlike any of the other existing manual tests.
In addition it serves as a base example for how outlines could be
done, it is one possible approach at least. (render with stencil
write, then render again slightly scaled up with a solid color with
testing against the stencil buffer content)
Change-Id: I0c845a9004136f229cab037f6f0aab2f772bdd76
Reviewed-by: Christian Strømme <christian.stromme@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>
We currently don't have any machinery for qmake or CMake to map
translations declared via TRANSLATIONS += or qt_add_translations
to the Info.plist CFBundleLocalizations key.
This results in macOS and iOS falling back to the development region,
CFBundleDevelopmentRegion, as the only supported localization of the
app, which is in most cases set to 'en'.
Unfortunately this doesn't work well with the behavior of iOS 11+
and macOS 10.13+ where the OS will set the locale of the app to
the best match between the app's supported localizations and the
user's preferred language.
https://developer.apple.com/library/archive/qa/qa1828/
Since we only support a single localization, the development region,
the locale always ends up as 'en_<REGION>', which after QTBUG-104930
is also reflected in the QLocale's uiLanguages(), resulting in the
QTranslator machinery always picking English translation for the app.
As long as we don't explicitly declare CFBundleLocalizations we need
to opt out of the system's behavior of finding the best match between
the app's declared localizations and the user's preferences, which we
can do via the CFBundleAllowMixedLocalizations key.
Fixes: QTBUG-63324
Pick-to: 6.4
Change-Id: If7586d342148cbbb1d2a152cef039aad4448b13c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QTreeView draws the different sub-rects of an item's background over
multiple calls to drawPrimitive(PE_PanelItemViewRow). The item row is
not separately stylable, but the item might have a styled background
property. To get a consistent background, we must use the item's
background rule when filling the item's row background.
To fix that, delegate the filling of the branch background to
drawPrimitive(PE_PanelItemViewRow), and implement PE_PanelItemViewRow
handling to render the rule for the ViewItem pseudo element if there is
a background rule defined for it.
Add a baseline test stylesheet for this scenario. Note that the selection
in an item view is better styled via the selection-background-color
qss property.
Task-number: QTBUG-73251
Task-number: QTBUG-106227
Pick-to: 6.4 6.2
Change-Id: I5d0c170f78009fe5015dd749975e6df27485b3b8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The fix for QTBUG-73251 in f4976f86cd
resulted in QTBUG-106227. Add baseline test coverage for the respective
configuration to make sure we don't regress.
Refactor mapping of index to configuration to make accessing of subitems
more robust.
Task-number: QTBUG-73251
Pick-to: 6.4 6.2
Change-Id: I530ecd67fa5663f219884f641bc5e25c7ac5fe73
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
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>
After f4976f86cd, alternate rows are no
longer painted all the way, as the code is never called for styles that
don't include the tree item decoration in the selection, such as the
Windows styles.
Add a baseline test to record the appearance of such trees.
Task-number: QTBUG-106227
Pick-to: 6.4 6.2
Change-Id: If21076393fdf65205cab91299f8e557dbe9c4ea9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
We have NTDDI_WIN10_NI (0x0A00000C) in the Win11 SDK (10.0.22621)
so bump the value in Qt (currently 0x0A00000B) to it.
And when searching for _WIN32_WINNT/WINVER/NTDDI_VERSION throughout
the whole qtbase codebase, I found some duplicated code, mostly
leftovers from the legacy time. Replace them with our own windows
header can achieve the same effect: we have defined all the necessary
macros to unblock the latest features. And place the header at the
top most place to include the macros as early as possible.
Change-Id: I37d9ac40ca9748208c7b2e89f374eda362dbefd6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This is consistent with what $(DEVELOPMENT_LANGUAGE) reports, as well as
the Apple Locales Programming Guide which states that "Locale names such
as “English”, “French”, and “Japanese” are deprecated in OS X and are
supported solely for backward compatibility."
Pick-to: 6.4
Change-Id: I99779d678ef9d4ea90249572f2f977e9b4df6c62
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@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>
The workaround stopped working because JSEvents is now not a global
object. Update the workaround by exporting the JSEvents object from
emscripten runtime and replacing the function that removes the
event handlers to a dummy function that does nothing temporarily, only
to revert it when the context is destroyed.
Fixes: QTBUG-107197
Pick-to: 6.4
Change-Id: Icceae884c85e04fdafcca6cf3c563094d3f6f0dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
Pre-requisite for a fix for qHash. The Qt50String inherits from QString
and becomes ambiguous once it no longer goes through a catch-all
template function because qHash(QString, size_t) has a better match for
the second argument.
Pick-to: 6.2 6.4
Change-Id: I23c7afb1b3aa167d40dc4838e82b7763de015f6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
The new function has an advantage of not requring EM_JS.
Change-Id: Ib9ad0e6b59cfe2e6864697a14b5cfdb39f62af2d
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
This provides an easy way to test window modality using a ready
available test.
Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>