Commit Graph

69087 Commits (e28adc19ed51006344c26bb46b92fa966ad903ed)

Author SHA1 Message Date
Juha Vuolle e28adc19ed Decouple location and bluetooth permissions if API level >= 31
This is a manual cherry-pick from
bb8cf72233e05c88424d525ca578cbf21d66c938
With minor documentation modification (6.8.1 instead of 6.9)

Since Android-12 / API-level 31, the ACCESS_FINE_LOCATION is no longer
mandatory for Bluetooth usage. Removing it will avoid unnecessary
location permission query (user prompt).

There are less common use cases to derive the location too. In these
cases the user must override the BLUETOOTH_SCAN permission so that it
no longer asserts neverForLocation, and also request the
ACCESS_FINE_LOCATION permission separately (QLocationPermission).

This change relates to QtBluetooth change, which adds
android:usesPermissionFlags="neverForLocation" attribute to
BLUETOOTH_SCAN permission (in default-generated AndroidManifest.xml)

[ChangeLog][Important Behavior Changes][QBluetoothPermission]
ACCESS_FINE_LOCATION is no longer requested if API-level >= 31

Task-number: QTBUG-129944
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: I774d0aada4c08829860d252a616fd0c3992a853d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit bb8cf72233e05c88424d525ca578cbf21d66c938)
2024-10-31 08:31:12 +02:00
Juha Vuolle e6aa48dc2c Introduce qt_internal_add_android_permission CMake function
This is a manual cherry-pick from
5efbfcb032d801c7083d4a850d0279a075de7f1a

The function allows setting additional permission attributes like
minSdkVersion and maxSdkVersion. The function's implementation is such
that it should work alongside the older way of directly setting the
QT_ANDROID_PERMISSIONS target property.

Task-number: QTBUG-129944
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: I0f40692574848fccdf65f9baedd14351917ce4bf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5efbfcb032d801c7083d4a850d0279a075de7f1a)
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-10-31 08:31:08 +02:00
Edward Welbourne d4989135f9 Fix check for duplicated Windows time-zone IDs
A missing update of a "last" variable meant the loop inevitably did
nothing useful. Include type-annotation for last, while doing this.
Thankfully the check still doesn't find any duplications, now that
I've fixed it so that actually would, were any present.

Pick-to: 6.5
Change-Id: I672e6570359a3ff102a364d8af98c5c8c0bdc4d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 98db7a35d2ee56f5da11b4a8e745f2ee6a965077)
2024-10-30 16:09:52 +01:00
Edward Welbourne 38b8c15358 Cope with empty name for a time zone
QTimeZone::displayName() may return empty if it has no
suitably-localized name for the zone. So QCalendarBackend's
dateTimeToString() can't rely on its tzAbbr() returning a string that
starts with UTC (and it may now, with proper L10n, start with some
other prefix) or indeed has length >= 3 (so sliced(3) could crash).
Rework the handling of offset name (mainly for the pick back to 6.8,
as I'll be back to get rid of the kludging in 6.9) to at least not
crash on empty return. In the process, use decreasingly appropriate
forms as fallbacks if we don't get what we want.

Fixes: QTBUG-129696
Change-Id: Id4f42778ca9a4806ac5dba23ce7068261a90500b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9e749df879a5bc76fa416c96f73378d81608801f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 15:09:29 +00:00
Edward Welbourne 8196b4d380 Expand suppression of gcc's free-nonheap-object warning
Added a comment to the suppression, to make clear why it's justified.

Change-Id: Ibc8aea809a8e9467b3a194a142296ea6b79e1971
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b460d0bd809b10705d2658bfb62cb0d04835c015)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 15:09:24 +00:00
Edward Welbourne 87b6540a08 Rename example parameter to better reflect its role
The Q_GLOBAL_STATIC docs repeatedly used MyType as the name for an
illustrative type but staticType as the name for the variable of that
type. While this was surely meant to mean "static of MyType" it made
it sound like it was the name of a type. So rename it myGlobal.

Pick-to: 6.5 6.2 5.15
Task-number: QTBUG-130613
Change-Id: Ia1bb1dbdb27e45ea84daad5bd5ec77313a53236f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 60962e7a9cd765ac114de3c2eeee4ca2a7a6d21a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 15:09:07 +00:00
Edward Welbourne b11f2ccc5b Correct QGlobalStatic<>::exists() documentation
The documentation claimed that exists() would return true even after
destruction. This was not true when this implementation of QGS was
introduced by commit f7eff72517. The
docs in commit c0860d26a1, however,
claimed it and no-one seems to have noticed the error until now.
Both commits first landed in Qt 5.1.

Pick-to: 6.5 6.2 5.15
Change-Id: Ic92c8ead25faed0125ff583cb76420a4154af9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e9226e6e44419affb13ebdd9c624ea8ef357dc2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 15:09:04 +00:00
Alexandru Croitor 3614892abe CMake: Improve the message for WASM thread support note wording
Seeing just "Enable thread support" sounds like an imperative, which
is strange to see because it is only shown if thread support was
explicitly enabled.

Reword it slightly.

Change-Id: I37596118dfc66204aa3ff81397caa818a5a91e66
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit 649caf962f6ff9edf9bd01f5f48c32f713ba773b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 10:57:18 +01:00
Alexandru Croitor b773eeee27 CMake: Warn that not all WASM tests might build without threads
Change-Id: I89971db45f30cebcfb122909ab2434a55b75e2a0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit d7ea0ea95f9e3663c856b3c7dd515447f4d65b91)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 10:57:16 +01:00
Alexandru Croitor 0bc3457257 CMake: Fix PUBLIC_LIBRARIES option is deprecated in tests warning
Rename it to just LIBRARIES, as PUBLIC_LIBRARIES is not meant to be
used in tests.

Change-Id: Idcf35e2834de44b2dd8d11cdef0205b11e89d377
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 492deefc17435bef03964382e0abadb16d86669c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-30 10:57:15 +01:00
Alexandru Croitor acd906061a CMake: Clean up _qt_internal_finalize_batch
The _qt_internal_finalize_batch function had a bunch of problems,
style-wise and function-wise:
- it called find_package(Qt6) in its body, which broke when
  configuring qtbase with in-tree tests

- it constantly rewrote the merged blacklist file on each
  reconfiguration

- it used file(WRITE) to concatenate content

- it was in the public API file

The changes are:
- Move the function to the internal test helpers file.

- Change it to use qt_configure_file instead of file(WRITE).

- Call it at the end of the qt_build_tests for a repo, or at the end
  of configuring a super build, instead of relying on a finalizer.

- Remove the find_package call. The reason this was added in the first
  place, was to populate the __qt_core_macros_module_base_dir variable
  so that qt_internal_add_resource configure_file call doesn't fail in
  standalone tests build.
  The variable was unset because the finalized function was called in
  the top level directory scope, whereas the very first find_package
  call was in the tests/ scope, meaning the variable was empty.
  This is still a problem in the top-level build where the tests scope
  and the top-level scope are different. Work around it by relying on
  a global property to reset the value if it's empty.

Amends 6a9e89121d

Change-Id: Id6fe41ee86d09b8118bea52cac8a59965d7ecb9e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c997e3bb8b4a35a729f1c207b01385d1323cad2b)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-10-30 10:57:14 +01:00
Thiago Macieira 53835c957b tst_selftests: disable Valgrind tests with AVX512/AVX10
Valgrind does not support those instructions yet so these tests always
fail. Skip them.

When it gets support for them, we can do a version check.

See https://bugs.kde.org/show_bug.cgi?id=383010

Change-Id: I954b2b6a9bbef1a31833fffd1cc4bc33dce353ed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 0b41b81b9febc8f0dafd0a6a8e6571333e5415d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 23:52:25 +00:00
Phil Thompson d61a15d043 Fix QFlag properties built by QMetaObjectBuilder
When Q_PROPERTY is used to define a property with type (for example)
Qt::Alignment the name of the type stored in the meta-object is
"Qt::Alignment".

When QMetaObjectBuilder.addProperty() is used it will instead use the
name of the meta-type (ie. "QFlags<Qt::AlignmentFlag>") which it has
obtained from QMetaType::fromName("Qt::Alignment").name().

In the QMetaProperty ctor it tries to resolve the QMetaEnum for the
property and uses the internal parse_scope() to extract the scope and
qualified key from the name. However it does not handle template names
and so fails with dynamically created properties.

This change to parse_scope() removes the "QFlags<>" so that the
template type can then be parsed.

Another solution would be for addProperty() to always use the type name
it was given rather than use QMetaType::fromName(). That has the
advantage that the layout of the dynamic meta-object would match that
generated by moc.

Change-Id: Iac9e2db2f134029709158b4e500286922396501d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5624060865e3ccd3c487f10355cb740b7322f93c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 20:51:12 +00:00
Thiago Macieira 778c70c84c QMetaMethodBuilder: limit the bits of attribute()/setAttribute()
Change-Id: I2d680563e65be28666f5fffd6aac927fd40c6b5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d0580a231c9b8e2a97fc0ea6a558b593dcb0c3d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 20:51:12 +00:00
Mårten Nordheim 19899d88eb Wrap QModelIndex in QSortFilterProxyModel for hash performance
The qHash implementation for QModelIndex is not very good resulting in
hundreds of collisions in the hash table. This means most lookups in the
table essentially becomes a linear search. This was 'generically' fixed
for Qt 7, but couldn't be fixed for 6 because of the qHash
implementation is inline and would result in different hash values for
the same QModelIndex in different translation units.

To work around this for this particular instance, we wrap the
QModelIndex in a struct that has the fixed qHash implementation.

Fixes: QTBUG-130309
Pick-to: 6.5
Change-Id: I586fb10cadf73900f3d644f421c37b381224a419
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1558811a8485f6dcc51a50a2bba0846091ca8bf6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 20:51:12 +00:00
Alexandru Croitor 1ca3e4d04f CMake: Fix deprecation level regex
It should allow a through f for hex digits as well.

Fixes: QTBUG-130119
Change-Id: I79a13d4e5dfee5c4c229eb64c26a5530928d0495
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ff5bc9266a39dc1d63ca02f592089bd4c2d9c4f6)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-10-29 19:08:23 +01:00
Volker Hilsheimer 351b5b3e94 QFileSystemModel on Windows: consistently trim spaces and dots
On Windows, file- and directory-names that end with a space (or a dot)
are invalid, even though it's possible to create them. Same for names
that start with a space (but starting with dots is ok). Even Explorer
chokes when trying to then delete or rename such a file or directory,
and often the only way out of the mess is to operate on the 8.3 path.

In Qt, we only sometimes fixed such paths by removing trailing spaces
and dots. This still made it possible to create a "bad " directory in a
non-native file dialog, which could then not be deleted. The node tree
even ended up with both "bad " and "bad", neither of which was handled
correctly.

Fix this by always chopping trailing space and dots when adding or
modifying a node, amending 3693d3d2a1e76f6e6d41db340505e00c6ddaeda1.

Fortunately, this can be reproduced with QFileSystemModel, so add a test
that exercises it in the same way as QFileDialog does, e.g. both by
creating the misnamed directory directly, and by renaming a directory to
an invalid name.

Given that this is very broken on Windows Explorer as well, don't
cherry-pick this back into branches under strict change management.

Fixes: QTBUG-129028
Change-Id: Iec1edf9fd2548dda4567134a9b5cf3e298589c19
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 53df22b42d73dbb48bc25ad05500993df56b928c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 17:42:12 +00:00
Simo Fält 20b9d76adf Default qtqa branch to dev if no matching branch found
This makes tqtc/ branches to use the public branches.

Amends 2a0e89981a52633c497f62bad0c7d26c466493cb

Task-number: QTBUG-124453
Task-number: QTBUG-125211
Task-number: QTBUG-125569
Task-number: QTQAINFRA-3935
Change-Id: I1098165c3122befabc503d38c46d476920d835a2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
(cherry picked from commit 701f688d9909c45f37d497746a6d6d893be4a5f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 17:10:48 +00:00
Eirik Aavitsland 93e8e2dc4b QGraphicsView: Fix clipping bug for rectangular custom items
If an item's shape() path described a rectangle not starting at the
top left corner, the code setting up clipping would correctly identify
and attempt to use it as a rectangle. However the conversion to a
QRectF would produce a non-normalized rectangle, which could lead to
unexpected clipping results. Fix by ensuring the rect is normalized.

Fixes: QTBUG-128488
Change-Id: Icbd17a95dde46a1969994f5eac021ac7b8ac5689
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 0cba6115605f586109a9b167a7d220670c5cda03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 16:42:59 +00:00
Mårten Nordheim 298ea22e98 Don't include qglobal when qnamespace is enough
Since all it needs is Qt::HANDLE qglobal.h is an overkill.

Task-number: QTBUG-106722
Change-Id: Ib000532bae3500a06c548b3c308e28bf0abf80d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dee05596d3ef95572e97a84191f9141e9231e75f)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-10-29 12:40:29 +02:00
Ivan Solovev 0174df3a4b Docs: Fix QScoped(Array)Pointer::swap() deprecation version
The code tells that it was deprecated since 6.2, but the docs were
incorreclty mentioning 6.1. Fix it.

Amends fe9d7bf759
and a2c8184b6b.

Pick-to: 6.5 6.2
Change-Id: Icff14ccc5d581d27d721241e8d594ac9fad8e7a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65e9c215ff25f7b97520a2b502548c5f5af0e589)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:31 +00:00
Marc Mutz 6535b6d5f3 QList: fix std::to_address(QList::iterator) on older compilers
Need to enable element_type unconditionally, to direct the default
std::pointer_traits::to_address to fall back to operator->().

[ChangeLog][QtCore][QList] Fixed std::to_address() on QList::iterator
on older compilers.

Fixes: QTBUG-130643
Change-Id: I521f327933c51ca87c511a7741b2dce65094032b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit b8c879f273533d87f52dbc8e9d2f9b3b3566cd60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:27 +00:00
Marc Mutz 21c839636c tst_QList: compile in both strict and normal iterator modes
If a class has an opt-in, the test should test both.

Pick-to: 6.5 6.2
Change-Id: I3b200a2f8e96c62b0c38ae735cb9f7e6786375b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c198a67bfb3fea21ec06f72ea08107c4da6e88f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:26 +00:00
Wladimir Leuschner d3f26e2bbd QWindows11Style: Reduce menubar height in QTabWidget
Due to increased menubar height, an attached menubar to QTabWidgets was
shown as >> indicator. This patch reduces the size of the menubar, in
case it is attached to a QTabWidget.

Fixes: QTBUG-130399
Change-Id: I0e71156cacd6acc51ede353b3b4ddf09d9c0260f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 9a06060e9ba0711ed458c19c274b7903f3d89d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:26 +00:00
Alexandru Croitor 1791b5461d CMake: Remove the CMAKE_CXX_COMPILER path from the SBOM
It causes the SBOM to be non-reproducible, as the path is different on
each machine.
Embedding just the compiler id and version should be sufficient.

Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: Iad66ac3f90c4969d27307c77bef46d2eba15c175
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d7fb9bfb800a3bae41a5f6a73c598f859848b98c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:26 +00:00
Alexandru Croitor 0eff69e5eb CMake: Improve handling of file paths embedded into SBOM
Filter out source files that are not actually sources, like pkg config
files and json.gen files.

To make the output more reproducible, replace the absolute source and
build directories with relative paths prepended with a marker like
/src_dir/ and /build_dir/.

Apply this to source file paths and to qt attribution json file paths.

Genex wrapped sources still need to be handled, but that will come in
a later change.

Amends 37a5e001277db9e1392a242171ab2b88cb6c3049

Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: Ic38cd9df827c1da770c1f337bc4725748bed5560
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 6e7f871edfd35174b40c7eb7386282bfe019f276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-29 01:10:26 +00:00
Ivan Solovev 301e2d2929 Docs: Specify deprecation version for QLibraryInfo::LibraryLocation
The typedef was deprecated in 6.0, but the docs were missing this info.

Amends 557623cc4f.

Pick-to: 6.5 6.2
Change-Id: I634d946e54302c9ca06c1a91c5b63c3fc6a07aa3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b85d704c4bf762a9a5965661835d711f1d00435d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 20:57:09 +00:00
Assam Boudjelthia f7aadf60de Android: make QtActivityDelegate practically NonNull
To avoid any potential null access on the delegate from various
paths like onResume(), onPause(), etc. where the delegate or some
of its member or delegates might also be null, make it final and
assign it a default instance in the Activity constructor.

This applies the same way for QtDisplayManager and QtInputDelegate,
which are final and assigned an instance at the QtActivityDelegate
constructor.

This means also, that each of those delegates or classes should
ensure any of objects used under them are safely called or not
in null cases.

This should help us reduce the amount of potential
NullPointerExceptions.

Fixes: QTBUG-129704
Change-Id: I36861c95d3b389fd88822aac0ae3616ccb3e304d
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 64f152d52a8720de71c7440ca2979345b919c58c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Marc Mutz 7338e481a9 QMessageAuthenticationCode: remove unused qvarlengtharray.h include
Amends 1fb0dca140, which removed the
last QVLA use from the TU.

Pick-to: 6.5
Change-Id: Ia1848c1e4bb1336706aadb72b864d788aed8f2fe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2c7910cada7668ab55ad0edac82cf9c215ff4adb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Marc Mutz bf8bdf4564 Move QSmallByteArray out of qcryptographichash.cpp
Its definition triggers QTCREATORBUG-28838, which has been marked as
Won't-Do.

By moving the class into its own header file, we limit the fallout of
said bug, which otherwise makes working in qcryptographichash.cpp a
nightmare with QtCreator.

Task-number: QTCREATORBUG-28838
Pick-to: 6.5
Change-Id: I12b8069ab77bfaee33b5df1b09757d617b142a44
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d36835f0e3cb58a9858dc6cc13fbdec9ded7c227)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Marc Mutz c851050fae QSmallByteArray: add missing Windows min/max macro protection
This is in preparation of moving the type into its own header file.

Amends 29050fa65b.

Task-number: QTCREATORBUG-28838
Pick-to: 6.5
Change-Id: I9dd35c1adc9b1ea32d8616ace89975c07a380ae4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4a1e0ddeae566ab730c1505bb654471509ba0cfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Assam Boudjelthia 7decb3af6a AndroidTestRunner: don't use verbose for some adb commands
Those two commands don't need to print info that is not necessarily
needed.

Change-Id: I0a76c08848786ee9a9aa9e3cb876c66a79acaa3a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 31dfb55bdda9fd248dcb3f956e18454e9fbebfa6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Assam Boudjelthia e0df563495 AndroidTestRunner: simplify crash logcat dump
Avoid using two processes where one is the input of the other and
having to do any dance to safely terminate each one in case the
other fails.

Do the following instead:
* Get the crash logs output first, if it's not possible return.
* Get the abi for ndk-stack command, if getting the value from
  the device fails, we still get it from the build dir if the
  emulator doesn't repond for some reason.
* Fall host architecture if failed to get ABI
* Call ndk-stack with the already obtainted logs
* Override the output only if ndk-stack gives back some output
* Print the output

This would avoid errors/warnings like this:

 QProcess: Destroyed while process ("/opt/android/sdk/platform-tools/
adb") is still running.
 QProcess: Destroyed while process ("/opt/android/android-ndk-r26b/ndk-
stack") is still running.
 QProcess: Destroyed while process ("/opt/android/sdk/platform-tools/
adb") is still running.

Change-Id: I2f508998c0376d901947b169632b22a1bbba74b9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit e70dae69a544c7061ef03885b1defc3989552268)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 17:48:45 +00:00
Assam Boudjelthia 7bbe59b541 Android: remove duplicate declaration for m_contextMenuVisible
It's also declared in QtActivityDelegateBase.

Change-Id: I5e526300f17ec5c808e99eee902c465906334713
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 2b2776c3b8c2de8bdaa32645c71fc371585a4a04)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 14:30:11 +00:00
Alexandru Croitor 07ba8781f7 CMake: Increase static library link multiplicity for VxWorks to 3
It appears that the VxWorks linker behaves similarly to GNU ld, where
the order of link libraries on the command line matters.

Our plugin linking system is not ideal (due cycles like Gui -> plugin
-> Gui, or Qml -> qml plugin -> Qml), and can change the order of
the linked libraries on the command line.

Due to that, some of the qtdeclarative tests fail to link with
undefined symbols in Qml.

Apply the same workaround we did for Linux, which is to increase the
LINK_INTERFACE_MULTIPLICITY of Qt modules to 3, effectively ensuring
that each qt module static library appears at least 3 times on the
link line, given the linker more chances to find relevant symbols.

Amends 58a7e4f0bc

More in detail reasoning explained in commit message of
69b27e09f55e63a713ca8b14f162d4f449c8dfff in qtquick3d

Fixes: QTBUG-129113
Task-number: QTBUG-83498
Change-Id: I7ac5665d4dd2865584ba1c96d51fd311ef224d10
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8c49dc9bfc388f7a850d33201f0165949481a18f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 14:30:11 +00:00
Assam Boudjelthia ed793b94db Android: fix QtEmbeddedDelegate.removeView() call on an int id
The m_views hash holds Views and not int ids.

Change-Id: I680da55f6a38940368b4c15fbd0537263bd604ae
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 7260214fcd656a525300d74f238c49e0a17134b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-28 14:30:11 +00:00
Marc Mutz e46ba4d413 tst_QChar: run it also under QT_RESTRICTED_CAST_FROM_ASCII
Like QString, QChar also changes API when said macro is defined.

So, like tst_QString from 8420d3e0b2
onwards, also compile tst_QChar under it, separately.

Pick-to: 6.5
Change-Id: I81d25d5bfae78b1a11d47e49aa618d079c4b09b7
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 167b04aac89488a5f2005bd1f4dfde354f43c6a6)
2024-10-28 16:30:11 +02:00
Marc Mutz b441f9e5bb tst_QDebug: extend test with pair<references>
The current std::pair streaming code supports this (and why shouldn't
it?), so make sure follow-up refactorings won't change that.

Amends 9b0970ad820c084b0fe73bcbbc72b44f04cae3dd.

Conflict resolution for 6.8:
- adjusted expected output to old-style (COMMMA w/o SP) pair
  formatting

Pick-to: 6.5 6.2
Change-Id: I9fb5fc07169d3fbd4699911853f25ef2ab559027
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 5e49278ab168dbd31cefcdbdb930abac90d11621)
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-10-28 14:30:11 +00:00
Mate Barany 35a0bfd1e3 Add type annotations to LocaleScanner
Task-number: QTBUG-129566
Change-Id: I768fda6b5202ebabc8283ecedead9157653862be
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit b9e4f53b7e46636e886e41dde5693420dbfd81dc)
2024-10-28 10:02:22 +00:00
Lorn Potter b56e959d60 wasm: fix wasm sockets when data buffer is less than 3696
The socket message comes in too early so add an additional
postEvent when registering the socket notifier.

Fixes: QTBUG-125874
Change-Id: Ie951b7a1b858d12927478e071157780ac4fc320b
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9b01f1bdb7e4107de3f898446fa087efa81e029e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:49 +00:00
Mårten Nordheim 1619b7232e Http2: Adjust send window also on inactive streams
Fixes an issue where a stream isn't active _yet_, but will be.
So it also needs to know about the adjusted window size.

Change-Id: I752760e4c99bac36580b3b8d0ed510baf2905529
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 2201b54ee3bd43280f3cd4a1754ba06bc86382ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:48 +00:00
Mate Barany 18d790810e Remove unused parameters, variables from cldr.py and ldml.py
Found these while adding type annotations.

Task-number: QTBUG-129566
Change-Id: I51c8e5676f958094946c0e6f396b98c083fd9de0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit ba9d6b261b04119b15d27f3f57dcfe0aadad5012)
2024-10-26 00:04:48 +00:00
Mate Barany b560a2c996 Add type annotations to XmlScanner and Supplement in ldml.py
Task-number: QTBUG-129566
Change-Id: I0300e97222c9d4b3e521a147e58c948c0015ad59
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2b167291befb21b3ecdc3d9b1123890f1a3178fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:48 +00:00
Dheerendra Purohit f03d386039 Add parameter for function call in QIdentityProxyModel
This change ensures that the correct model index is passed to the sourceModel()->data() function when retrieving the DateRole value.

Pick-to: 6.5
Fixes: QTBUG-70792
Change-Id: I66c9f2404533625f05dd51db2d9263287db6ee91
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit f0d6bfb2426392060575dc61bfa698df7964bf5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-26 00:04:48 +00:00
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