Commit Graph

69043 Commits (a3376af2c7f2f2dd2b980f73f1747bebf45964ff)

Author SHA1 Message Date
Assam Boudjelthia a3376af2c7 AndroidTestRunner: use proper file names for output files
On device, use proper file names the same as the one passed
to the test. Also, along the way, make sure to also pull the
output of the same format of the stdout result. Currently,
it's not the case, for example, if we pass `-o name.txt,txt -o -,txt`,
the name.txt is not being pulled from the device, and
with this patch it will be.

Change-Id: I5ecd22e6c37e5abfbe68b19ae102a852b01dd7e0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 61468b3411c6f88180a9b22535f420beada97495)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:47 +00:00
Assam Boudjelthia fb3ee1ac25 AndroidTestRunner: return -1 for testrunner error cases
And leave non-zero possitive exit codes to reflect the
number of test fails.

Change-Id: If2871be14cdf46812471c9d2f5409dd8f3ddd3d9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 29e2bada37bb5d1616d36fe9d4a6d6e05504bee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:47 +00:00
Assam Boudjelthia 8102f8f1bb AndroidTestRunner: print test results to stdout as they go
The testrunner was always printing the results only at the end of the
test run. If tests are long, it means waiting long to have any sort of
result. With this, the results are printed to stdout whenever they are
written by qtest on the device.

Fixes: QTBUG-129975
Change-Id: If4315eb74e73f6274a735e56be7e6989563bb514
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 7545e7c921f364cdb037f8e967f012351c2eb3ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:47 +00:00
Assam Boudjelthia 9f61acc7b2 AndroidTestRunner: get rid of the custom test result parsers
After being able to return the real return code for the test app,
we don't need to rely on custom parsers anymore, because qt tests
already return the number of failed tests in the return code.

This also, would allow using the -silent qtest option where it was
not possible before because the test fail/success was dependent on
getting full test results to stdout.

Change-Id: I75ecddd49235fcf25e1c0856b639228884a8cfba
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit aa4fa0159f1f5ebb290a5089ad37914b858cf5c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:47 +00:00
Assam Boudjelthia a3c462f87d AndroidTestRunner: get test exit code instead of parsing results
Write the exit code for qt tests at the end of the test run where
it would be available to androidtestrunner to find out the exact
number of failed tests, this would make the custom parses in the
androidtestrunner redandant.

Fixes: QTBUG-129976
Change-Id: I3c2ea9780505f1d4a2a46ae94534cd1e4f07334c
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 8d4022187b660de6c81c09ea7a4864048aa94978)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:47 +00:00
Assam Boudjelthia ce377c971f AndroidTestRunner: simplify user Id code
Move common args to function and add user Id to
info struct, also to be used more in upcoming patches.

Change-Id: I14fd07f7daa52ef0369df16aceca05f0fa96f473
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 0c6827702075284ae344fd66590225a1af70c5f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:46 +00:00
Marc Mutz b6c102b742 tst_QDebug: extend test with optionals of const or optional type
Amends b7657ddccb.

Change-Id: I420f11571629025a9d3b588d4ab124b34ee3811c
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit dd672edd15393378898b518091c3117a91c5bbfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:46 +00:00
Marc Mutz e5e560c7fd QDebug: simplify op<<(std::optional)
We don't need to enable nospace() if we stream but a single element
(nullopt). As a consequence, delay construction of the StateSaver
until we have determined that the optional is engaged.

Amends b7657ddccb.

Change-Id: Id974dff078cb989b92f84b63bf14956a2fba32b2
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 25931bf2181706e1cba416b0530f07959182f074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:46 +00:00
Mate Barany a1dd67ebfc Add type annotations to the Node class in ldml.py
Task-number: QTBUG-129566
Change-Id: I70a85654584cdd1117cd670337709620ad84e6d8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 60cb610a403d8d18d5b33288025bd409fb1c1b84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:46 +00:00
Timur Pocheptsov a48d7f0c73 Fix prior change: no need for check when OpenSSL is active backend
It's not using keychains and not triggering a blocking system dialog.

Change-Id: Id2a3b74ab3647890747fba9b8d261ab3e60fb3bc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 07a0e4496ddf15ef469c3b244270300b9c855d44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:46 +00:00
Marc Mutz 6555c62630 tst_QChar: add comprehensive conversion tests
As usual, when making a change, we find out that test coverage was
poor. Add such tests for QChar ctors.

Amends (should have been a prequel commit of)
9ef4c123c39c642357c9e8530d59f32f220a7824.

Conflict resolution for 6.8:
- adjusted static_asserts to old QChar ctor overload set

Pick-to: 6.5 6.2 5.15
Change-Id: Idcd9ab816ef815ce4a85dba1f7e37201b64c2203
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 69190a370d1e9f60c78f3096df62a61b6a5d1384)
2024-10-26 02:04:45 +02:00
Assam Boudjelthia 99448bb5f4 AndroidTestRunner: don't print warning if crash logcat is empty
If it's empty and the command didn't fail then there's no
crash so no need to print anything.

Change-Id: Id9045138a6535220abf819b8d334c629765a6547
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit a9db240111e454331770d3def95f60eec3c368be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:45 +00:00
Assam Boudjelthia 7738c2fade AndroidTestRunner: print colored and brief logcats
Use colors only for non-ci environment since color characters
just make the output noisy and they are not rendered correctly.

Change-Id: I14c5f9c215fbbe9a020011943455d2df615d9bee
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 5a07f6ca4e7f00fada0db7f21892500831d537bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:45 +00:00
Assam Boudjelthia e7b28a3899 AndroidTestRunner: try to pull results for few times
Try to pull result files for 3 times in case they fail,
just to ensure less flakiness.

Change-Id: Id052fe2359d190fe87e304bbd22fc2096d50cadb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 488f30e4a0a13a90f14883d1b511d3c21db8402e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:45 +00:00
Edward Welbourne 00f35aa0a3 Fix trivial typo in QDateTime::fromString() doc
Change-Id: If9011108af7ac0752057e2952e9d67a393792006
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9a0838d553e852130f12c03d1903d560ad8fa6b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:44 +00:00
Eirik Aavitsland 5de95d3aba Add autotest for QImageIO format handler plugins
To confirm the functionality of custom imageformats plugins in Qt
image reading, both for supporting new formats and for overriding Qt's
builtin formats.

Change-Id: I6abafdb47301ad1f35b19951e42b1f3b61fe6ec3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6eefe0ca59dc25f7953b93e8b80c62c78a6ccfde)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:44 +00:00
Assam Boudjelthia df743c2164 AndroidTestRunner: allow using adb's ANDROID_SERIAL env var
androidtestrunner should've used ANDROID_SERIAL adb env var, instead
of introuducing the new one ANDROID_DEVICE_SERIAL, but for now
support both.

Change-Id: Id0fc75fc64d7d3dd033c60e6ba9c6c3350ddd899
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 252550877dff358b02a5be773d32fe606bff51f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:44 +00:00
Assam Boudjelthia b71b416e54 AndroidTestRunner: fix --make help making it mandatory as it should be
This option is mandatory in code, but it's documented as optional.

Change-Id: I91a664b3dbfec45980f3bfb4313e13321610782b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 667588aa86913c7fe69103666046f01f764e5de5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:44 +00:00
Assam Boudjelthia 8a3753cda2 AndroidTestRunner: make adb logcat -b crash non blocking
We only need a snapshot of the crash logs, so pass -d to make the call
non-blocking, this means we we can check right away for start/finish
of that process. This would also, the error:

  Error: failed to run ndk-stack command.
  agent:2024/10/21 16:31:42 build.go:404: QProcess: Destroyed while
process ("/opt/android/sdk/platform-tools/adb") is still running.

Change-Id: I2314d0b9567865934c2aa8f6d40ace2b4288ebb2
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 2d3334a87955cd54bb47b57a25af2ed0ce6f3a69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:43 +00:00
Assam Boudjelthia 80eba25971 AndroidTestRunner: check if any device is running at start
Check if any or specified device is running and fail with
appropriate message instead of attempting to run other adb
commands that might fail with other reasons that hide the
actual root cause.

Change-Id: I61078ca988f381e834b41140e36b0e4a5f77714f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit d5491ec2ab5630c95c25c0e4142ddf4af398f083)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:43 +00:00
Assam Boudjelthia 87abb9422a AndroidTestRunner: retry check for running device few times
Try to check if the device is running few times while waiting
for the app to finish, just in case the adb ps command fails
for some reason while the app is actually still running.

Also, use ps -p <pid> to directly return only pid and avoiding
to filter out all the other processes with grep. grep can be then
used to only filter out the test package name and leaving out the
ps header.

Fixes: QTBUG-127488
Change-Id: I85fe61106381fd1a7a26ef6347f8ab4a4a6678bb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 03006555ec872935d78fbb41f02c4cef3a5cab51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:43 +00:00
Oliver Wolff dcc4fde727 windeployqt: Fix typo in warning message
Fixes: QTBUG-130476
Change-Id: I8c5538d6ac58ce6dd72ea00921c1cf197dffd482
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 7ee06113cdded26f5c7937eae163ef0405b7f7d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:43 +00:00
Mate Barany 20ccdf05a7 Add some type annotations to main in qlocalexml2cpp.py
Task-number: QTBUG-128634
Change-Id: Iaf5a25da86dd330bdab893b34c7c1288e239a182
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit cd6491e9500dc6e0ebe6a39ea791e3c643223a62)
2024-10-25 23:00:36 +02:00
Mårten Nordheim 582eaaaa68 tst_bench_qobject: Fix stdAllocator case for Windows
The total stack space available is 1MB, but each pointer is 8 bytes.
So we have to limit the amount of pointers we allocate on the stack to
somewhere below 128K.

Pick-to: 6.7 6.5
Change-Id: I1d1262a4048cf4b3fed8df813decc3e142430a32
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit b2e0ff4bca5d81205c8425cdc528e5c2a2988172)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 20:52:12 +00:00
Eskil Abrahamsen Blomfeldt 8d83abfaf7 Replace "OpenType missing" warnings with qCInfo()
Back when this code was written, the font matching algorithm
would also match the script of the font, but for multi-font
engines, this no longer happens after this change:
  c003a18ee3.

Since that change, we will always prefer the requested font, even
if it does not claim to support the writing system in question.
The normal fallback mechanism in the platform plugin will be used
instead of having a secondary, cross-platform fallback mechanism
like before.

With this change, it is quite possible to get a main font engine
which does not support the given script, since this will
essentially always just be the font the user asked for. Therefore,
warning that it does not is really redundant and just adds noise
to the console output. This turns the warnings into qCInfo()
instead, so it is still possible to get the information if we
need to, but by default it will not be visible.

Pick-to: 6.5
Fixes: QTBUG-129092
Change-Id: I0584ce3d1e37790368cf616c99df077fc07b80a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cd6608e887066db2d9150bf6ea9111e8bd5b8fec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 19:08:37 +00:00
Wladimir Leuschner 9107817eac QWindows11Style: Calculate Spinbox size based on CommonStyle size
Use the calculation from Commonstyle and add the increased padding and
horizontally layouted buttons to the horizontal size hint.

Fixes: QTBUG-130288
Change-Id: I7932b782e7873a0178091a51379f17453eb585fd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 96d46cad43517adefa2eb7cb8819a0b2cc9241e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 13:19:29 +00:00
Wladimir Leuschner e00084e163 QWindows11Style: Adjust ArrowRect offset for RTL QComboBox
Adjust the arrow rect, so that the arrow is not outside of the combobox
frame in RTL mode.

Change-Id: Ieddda7be4959a37a4c47ab9fe8e4d6bae4e91f04
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d5afa192a32ac7187621f37b5f8baaf2388730dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 13:19:06 +00:00
Wladimir Leuschner 197c3e61fe QWindows11Style: Reduce textedit padding and align combobox texts
Horizontal padding for textedit controls is reduced from 8px to 4px.
To align the QComboBox label with the list flyout, the combobox label
got additional 4px padding.

Fixes: QTBUG-130125
Change-Id: Ieb4a8c9dab7fbe594134261b738060acfe7fdcb5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c8fa7408a0c15054a6a50c28c0c21845134a4a13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 12:39:51 +00:00
Wladimir Leuschner fae0899efe QWindows11Style: Grey out disabled Widgets in light theme
Disabled widgets were drawn in the same colors as active widgets, making
them hard to distinguish.

Fixes: QTBUG-130123
Change-Id: I723a1d5d3a90d56cc3e82148939ae3eaacd01ed4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 9523b97eb9146e308b25ef19394c48ec636a73ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 12:39:44 +00:00
Wladimir Leuschner 0cb772c6c3 QWindows11Style: Add menu indicator to QPushButton
In case a menu was associated with a QPushButton, draw a triangle
indicator that shows, that a menu will open up.

Fixes: QTBUG-130122
Change-Id: I798499c1484ed66662fa3ce7f3d1aeccd3f40ad7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 1347ca99a30364ca9973448111a9bf40173fd81e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 12:39:38 +00:00
Ahmed El Khazari a8eaa0c5ac QLockFile: Use fcntl for file locking on Android
This commit updates the setNativeLocks function to use fcntl for file
locking on Android systems. Previously, the function attempted to use
flock, which would return false immediately upon failure in some cases.
By switching to fcntl, the function aims to provide more reliable lock
acquisition on Android.
This change is specific to Android systems and does not impact other
platforms where flock is used.

Fixes: QTBUG-116511
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ifb93cb6a8aec801539ba378c23d9b1ada3f069bb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 3b8e8bd081c3d58d9e0e7ef4129b4f27ea0e250f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-25 08:33:29 +00:00
Wladimir Leuschner 71cba1359e QWindows11Style: Add checkbox offset to ItemViewItemText
Add the width of a checkbox to the starting starting x position of the
ItemViewItemText in case the ItemViewItem has a checkbox.

Fixes: PYSIDE-2897
Fixes: PYSIDE-2906
Change-Id: I233e2bfd28836ae5578aadfe9332193848ac5a7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 877b29a78e38ff7c6af2d63d93e6a554544bf278)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-24 22:18:46 +00:00
Marc Mutz 5c4a0a5b26 tst_QDebug: add missing test for std::pair streaming
tst_QPair also doesn't have it.

Pick-to: 6.5 6.2
Change-Id: I7391203a9dcb2d937487ee2f3ba1b6ed21d700db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9b0970ad820c084b0fe73bcbbc72b44f04cae3dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-24 10:13:22 +00:00
Volker Hilsheimer 7c54868d8c Remove Motif style test handling from tst_QGraphicsView::scrollBarRanges
That style hasn't been in Qt for a few releases, no need for any special
treatment.

Change-Id: Ib0d4c7c10515b92267956748db11be00ce85d76f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2553d9709f305c55a133306e40c1930d46737026)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 23:01:00 +00:00
Christian Ehrlicher 1fac111731 SQLite: Update SQLite to v3.47.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.47.0

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I30bc19b7e82eb38cf56c4657c59dbb63dd3ddafb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f430db18c975944a735dc6b6cf01dfb852978e38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 23:00:56 +00:00
Volker Hilsheimer 7d53defbb3 Clean up tst_QGraphicsView::scrollBarRanges
Merge the two translation units into one, there's no reason for moving
the code populating the test data away from the test function code.
Remove some unnecessary QString<->QByteArray conversions in the test
data.

Task-number: QTBUG-114987
Change-Id: I20dc858c6dab683e19e35e5be4ecd4ff6d283164
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ce0a92549e7a4164d60f3b7c723b9f0a8cf28f55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 23:00:54 +00:00
Mate Barany 17fb626443 Add type annotations to three classes in qlocalexm2cpp.py
Add type annotations to CalendarDataWriter, TestLocaleWriter and
LocaleHeaderWriter.

Task-number: QTBUG-128634
Change-Id: I2c9168fda9cb79cbef3e7ef32ec67270ce168a1b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit a9a5f86a8becb12b9a33fbd92d1bb1c6c5421f45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 15:56:48 +00:00
Mate Barany 315f79f887 Add type annotations to LocaleDataWriter
Task-number: QTBUG-128634
Change-Id: I63e4db06d92e7c2457a802f93372545f9ae749f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 001f8b3fc991b685b2a08b572af8be0a6eee60ea)
2024-10-23 15:56:42 +00:00
Mate Barany 52909797ac Add type hints to LocaleSourceEditor and TimeZoneDataWriter
Task-number: QTBUG-128634
Change-Id: I5dabb5e721b610bc9edb01b86aa173d03c36a48a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit dd698dcb4d14ec59fdd60416018b15e43438ecfe)
2024-10-23 15:56:27 +00:00
Mate Barany 0d06c01611 Add type annotations to ByteArrayData, StringDataToken and StringData
Add some type hints to unicode2hex as well, it is used by
ByteArrayData.

Task-number: QTBUG-128634
Change-Id: I86b7ce8567483bf8a4d4db78c9585652526cb90d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit c1ffb6e7515621a953b5ebf19c384b27df785d73)
2024-10-23 15:56:22 +00:00
Giuseppe D'Angelo 41eccd318a Enforce the availability of std::byte
MS-STL has an opt-out that makes std::byte unavailable.
This causes build errors in our headers in case client code opts out,
so detect this case and provide a clean(er) error message.

Change-Id: Iec0790f4c33eb876a98e2e34afbc9889f42333b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5a3859e0a455d82aea9e7c09b87f0dec91dec4e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 05:39:23 +00:00
Ahmad Samir 25b754dbf1 QStringView: de-duplicate some API docs
Change-Id: I736874037780147c2ec0d657689fa4f3066ebe7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0130ba3cbd43f532726e4db39daf3f64295c861e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 05:39:23 +00:00
Christian Ehrlicher df1118b4e0 SQL/PostgreSQL: fix comment for formatting QDateTime
The comment to convert a QDateTime to a PostgreSQL compatible string was
outdated. Adjust it to the current state and make clear that the
PostgreSQL documentation is unclear here.

Task-number: QTBUG-129983
Change-Id: I46e45082f2154881ab34278c5e9887cb2274dd64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit d6a7e51fa36c51a39c609ff0b2cd8bc10bd01e86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 05:39:23 +00:00
Timur Pocheptsov 97d342f0c4 Add network-helpers.h file, similar to the shared network-settings.h
This is to place some special functionality we need on particular
platforms, like peculiar case of TLS working in a special way on
macOS. We previously updated our ST backend to use new properties
when importing a key, but it's possible to run a test on macOS 15 that
was build with older SDK which would still hit the old case with
keychain access dialog.

Change-Id: I3c893d6a3ec199be59104921db7a56b87c62a825
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 02e89640536b59ba299a819d96e97f83e156685f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-23 02:49:55 +00:00
Edward Welbourne 4408d077ac Address problems with date-time parsing near bounds
Document the limited range of datetimes that can be parsed from
strings and the (awkward) consequence of the range bounds being
specified in local time.

Add tests for UTC hitting those bounds and QEXPECT_FAIL() the ones
that (as the new docs say they may) fail. Technically the fact that
the UTC:min one *doesn't* fail is evidence of a bug in the existing
date-time parser. Its replacement should support unbounded parsing.

Pick to 6.8 required removing a QEXPECT_FAIL() specific (on MS) to the
std::chrono::tzdb backend, which isn't present before 6.9.

Fixes: QTBUG-129287
Task-number: QTBUG-77948
Pick-to: 6.5
Change-Id: Ic90558f1a06a62f7d0a947e37802370d1ab4e373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3e25203d4d5ba428309e972367dbdf99c4e70327)
2024-10-22 18:53:18 +02:00
Tor Arne Vestbø 037e14dd07 macOS: Add support for context menu keyboard hotkey
macOS 15 introduced the ability to trigger context menus via a keyboard
hotkey (Ctrl+Return by default). We now catch this hotkey, propagate it
as a normal key event first (in case the application wants to handle it
by itself), and trigger a QContextMenuEvent if the system determines that
the action should result in a context menu.

[ChangeLog][macOS] The context menu keyboard hotkey available on macOS
15 is now propagated as a QContextMenuEvent if the corresponding
QKeyEvent is not accepted.

Task-number: QTBUG-67331
Change-Id: I3a64a9a18d2caf767fc32637d314a06465aae88f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e7c8c2ccc859f8083fb3bf442647b0a315cf1b60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-22 16:24:30 +00:00
Volker Hilsheimer 2997feb230 QImage: fix documentation of toCGImage
Remove the \brief section, which qdoc doesn't support for functions.
Explicitly use \fn to link the documentation, as qdoc doesn't always see
the declaration.

This makes the function not only public, but also documented API,
similar to QImage::toHBITMAP and toHICON. In practice, this is what
was intended, so fixing this in stable branches as well.

Pick-to: 6.5
Change-Id: Id825e494d13f10064742318d2b3bbd8f8f7a1435
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 26375032c92b8729ca5625c225e99a696d7b6b9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-22 16:24:30 +00:00
Marc Mutz 0f23f9c136 qendian_p.h: fix -Wunused-const-variable
Mark QSpecialIntegerBitfieldZero as inline to avoid the warning.

Amends 38002df206, but not picking to
5.15, because inline variables are a C++17 feature.

Pick-to: 6.5 6.2
Change-Id: Ib10821f575e1c00061bb02592e4ac5462284d515
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit beda65ba9f4252b83aeeb3099465de7cce005fe2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-22 13:15:24 +00:00
Alexandru Croitor c596492348 CMake: Switch message type of the architecture extraction project
It should be STATUS instead of NOTICE, otherwise in a non-developer
build where the default logging is quiet (log-level == NOTICE), the
output might confuse builders that those flags are used for the build
of Qt, rather than the architecture extraction project.

Fixes: QTBUG-130294
Change-Id: If2ee50b47d46b00dc55c5423700749ab142bbf7c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 674475887c6e4aeb82000e64657a69366cc9c7a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-22 13:15:24 +00:00
Thiago Macieira 76da2f74d4 QUuid: restore sorting order of Qt < 6.8
This brings back and adapted version of the sorting code that was
removed by commit 15f753ca5a60b5273d243f528978e25c28a9b56d. The issue,
as shown in the test, is that we store data1, data2, and data3 as
native-endian integers, so the bitcasts in the new code cause them to
become mangled in little-endian platforms.

Since this is a weird behavior and we'll be changing the sorting order
in Qt 7 anyway, I've left a warning for us to think about it at the
time.

[ChangeLog][QtCore][QUuid] Fixed a regression that caused QUuid sorting
order to change for some UUIDs, compared to Qt 6.7 and earlier versions.

Fixes: QTBUG-130155
Change-Id: I5eeb7b36bfc5ed7218e1fffd6a773c582ad0f6f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 222891d0b6b84bbf995bd75420bdfb55292c0901)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-22 13:15:24 +00:00