Commit Graph

68711 Commits (e2880c7d92ecbb1dffd5470808bfed46e60baab3)

Author SHA1 Message Date
Marc Mutz e2880c7d92 qsavefile_p.h: fix missing qsavefile.h include
This causes

  qsavefile_p.h:28:22: error: unknown type name 'QSaveFile'
      Q_DECLARE_PUBLIC(QSaveFile)
                       ^

when qsavefile_p.h is included before qsavefile.h was.

Make the header self-sufficient by incuding the Public class' header,
too, as is customary.

Amends e993df8771.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I17eb2a357bf1ef7ef5b5e3a3e56c4a921ba30951
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ad6e4df580a2437cc69be416956f6128267ffbea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 12:04:48 +00:00
Marc Mutz adc73cf5b9 QPropertyBindingPrivate: prevent -Wshadow in qqmlpropertybinding_p.h
This is preparation of applying headercheck to private headers, too.

Changing the private data member name to m_error is the simpler change
here, since it touches a bounded amount of code vs. the alternative of
fixing an unbounded number of unknown users.

Amends 9f33ad904a.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ie0f6b5e711b35a12fadc9d8e642b885ce8b57315
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 9348212be3880ecd93111b7321043a53ab1df45a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 12:04:42 +00:00
Michael Weghorn 77b8cd0a45 a11y: Remember QTreeView's a11y child interfaces
In the same way that QAccessibleTable::child already
does, also make use of the childToId hash in
QAccessibleTree::child to remember and reuse previously
created child interfaces instead of creating new ones
for the same index every time the method gets called.

When items in the tree view change,
QTreeViewPrivate::updateAccessibility already sends a
QAccessibleTableModelChangeEvent event of type
QAccessibleTableModelChangeEvent::ModelReset,
which ensures that the then outdated cache is cleared
in the base class's QAccessibleTable::modelChange
method.

This addresses an old FIXME comment added in 2013
commit b2ec0da956 and
fixes the issue reported in QTBUG-128558.

Fixes: QTBUG-128558
Pick-to: 6.7
Change-Id: Ia2a518ac26f3c9b9ba8ab1870bb656c8e9014a77
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3cfabf92b09290f71b7fafa79723dc374b807206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 22:36:17 +00:00
Piotr Wierciński e9f1dd072d wasm: Fix integer overflow in FetchRequest
Remove code which is trying to unset flag that has never been set
before. Subtracting flag on unsigned int "attributes" can cause integer
overlow.

Fixes: QTBUG-128929
Pick-to: 6.7 6.5
Change-Id: I4128819f29a841b73b6a08aeba795dcae9dc2e51
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 21be40019f8adedf1e592b9b8ba0d965b857eef3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 21:20:53 +00:00
Rym Bouabid 57f2dff05c QIODevice: improve QIODevice::readLine() documentation
Pick-to: 6.7 6.5
Change-Id: I252c0faf982ff8328475243fdbc86cc4d1462498
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bbf980e43f16c99504d75998217b88855edd3365)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-16 20:58:39 +00:00
Christian Ehrlicher e99c2d9314 SQL/OCI: use OCIBindByPos2 instead OCIBindByPos
Use OCIBindByPos2 instead OCIBindByPos where it was not yet changed to
allow lengths > 2^31 (and avoid unneeded casts).

This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208.

Change-Id: I8b6efdfdb0fb349043e9c84ceba17e008882f584
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 911eac26d482b8d63419648d6f735c49e9e17c82)
2024-09-16 18:41:42 +00:00
Tatiana Borisova ca3fa76a4e QDialogs: prevent crash in static get*() functions when parent gets deleted
- As explained in
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
creating dialogs on the stack is a bad idea, if the
application or the dialog's parent window can be closed
by means other than user interaction (such as a timer or
an IPC call). Since we cannot know whether Qt is used to
build such an application, we must assume it is, create
the dialog on the heap, and monitor its lifetime with a
QPointer.

Long time ago instead of using manual resource management,
QAutoPointer was added to fix the crash problem for QInputDialog.

The same fix now is being applied for the rest of QDialog classes:
QColorDialog, QFileDialog, QFontDialog.

Documentation warnings about deleting the parent are not actual anymore. Deleted.

Pick-to: 6.5
Task-number: QTBUG-54693
Change-Id: Ib7cc0575ea25f392a295538e21de9015dc49ebe4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 81d55f772892445686862e49d0a6092668f8c725)
2024-09-16 16:13:47 +00:00
Marc Mutz 9ce6596394 QtCore: fix private header compilation under QT_NO_KEYWORDS
This is in preparation of applying headercheck to private headers,
too.

Task-number: QTBUG-126219
Change-Id: Iff5fd8e848d67b7edd9541b0e78740bc4b4ff7c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 55b5e78ac31171be61ceeb932d494d5060d1fa02)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:34 +00:00
Marc Mutz 7953546072 QBindingObserverPtr: fix redundant ;
Found by applying headercheck to private headers, not just public
ones.

Amends f1b1773d0a.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: I3998cd5875f989152c6bd6b24b04e61627959cc2
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1d163e916c8da49f9f617ca1545b5f6ac9d6a0b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:31 +00:00
Marc Mutz 1fda161d69 QDuplicateTracker: fix redundant ;
Found by applying headercheck to private headers, not just public
ones.

Amends f21a6d409e.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I8be52a04ae9d9af2e68a72f1128bfbd09fd85e8e
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8bfd696297b35684ee1c80127d7b0ce09a374d85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:29 +00:00
Marc Mutz ef7f9ba1e9 qmimetype_p.h: remove incorrect QMimeBinaryProvider fwd declaration
It was outside the QT_NAMESPACE, declaring a class different from
QT_PREPEND_NAMESPACE(QMimeBinaryProvider) in -qt-namespace builds.

Amends 4e9944e6c8.

Pick-to: 6.7
Change-Id: I8dec4d676fd774462ad63418ee8d82d1b0e44d1d
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5820d54103d5c432ae8eaae180aefb1988f835ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:15:07 +00:00
Marc Mutz 5d6a204789 Fix -Wdouble-promotion in FP overload of convertDoubleTo()
Found by applying headercheck to private headers.

Says GCC:

  global/qnumeric_p.h: In instantiation of ‘[...]
  {anonymous}::convertDoubleTo(double, T*, bool) [with T = float;
  [...]]’:

  text/qlocale_p.h:312:51: required from here

  global/qnumeric_p.h:390:22: error: implicit conversion from ‘float’
  to ‘double’ to match other operand of binary expression
  [-Werror=double-promotion]

    390 |     if (std::fabs(v) > (std::numeric_limits<T>::max)()) {
        |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since we already checked that numeric_limits<T>::max_exponent <
numeric_limits<double>::max_exponent at this point (see constexpr-if
at the top of this function template), we can assume that the cast of
the RHS of the relational operator to double is safe. Use braced
initialization to statically assert that this is, indeed, the case.

Amends 1e43b64a7a and
a14bba6803.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: If2b53d9b8ea7ebfcecec603408681eeffb9aaff6
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c38e58dcb02cd2273ba3c03c65a6f67b37100777)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-15 12:14:54 +00:00
Eirik Aavitsland c36b24b087 Update bundled libpng to version 1.6.44
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.44

Pick-to: 6.8.0 6.7 6.7.3 6.5 6.2 5.15
Change-Id: Ib208635687645101cd2d7fb4e5bf069088c24f86
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 685a6c2e3d8e3b970640d7e31945272a6803ae61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 18:56:26 +00:00
Thiago Macieira 4f30a4426c QTypeRevision: fix support for 8-bit signed segments
The logic in the isValidSegment() function was failing for 8-bit signed
because for them Integer(SegmentUnknown) is -1, so
  (std::numeric_limits<Integer>::max)() < Integer(SegmentUnknown)
was always false (127 < -1) and the function would only return true on
the impossible condition of
  segment >= 0 && segment < -1

Fixes: QTBUG-128848
Pick-to: 6.7 6.5
Change-Id: I8d17b93afd6c2982a099fffdcaeccf126b7a9d02
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ddfcc0734875cdee2c169bf2ecb1546bddba6e98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:38:08 +00:00
Thiago Macieira 43003ccbce tst_QTypeRevision: rewrite using if constexpr and direct calls
This removes the specializations, which were hiding the fact that signed
8-bit integers produce assertion failures.

Pick-to: 6.7 6.5
Task-number: QTBUG-128848
Change-Id: Ibb4952b0eb50a8c51e05fffd9e88a137ca95bcd8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit a572b4b0780dcc5fcac55737fc4153fca93e6c62)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:38:07 +00:00
Thiago Macieira 23cf29ffdd QFileSystemEngine/Win: only .lnk files that exist can be symlinks
Fortunately, isDirPath() had an extra parameter to tell us whether the
path existed in the first place, making the fix very simple.

Pick-to: 6.7 6.5
Fixes: QTBUG-128800
Change-Id: I81482f87b594933158d0fffdbea0ea2a00494b6c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 329b05739d5d62f37464a5714ad87e7ca05693e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:37:55 +00:00
Thiago Macieira 16571ac456 QDir: change qt_{cleanPath,normalizePathSegments} to returning bool
Since qt_normalizePathSegments very often modifies the path, pass that
as pointer, and return a boolean with whether the path is attempting to
go up above the root.

Change-Id: I851fcb94db4606a6bd97fffd81910930dea8222a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 0314491abac092b20ebefc05e2e9f27fd038fc38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 16:37:12 +00:00
Thiago Macieira 2ce3153b83 QUrl::resolved: switch to using qt_normalizePathSegments
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote
mergePathSegments() but got one thing wrong: that ".." on a "//" should
only remove one slash, not all of them. That behavior was introduced by
commit eaf4438b35 to match what browsers
do.

QUrl will use the local file behavior if the URL scheme is "file",
unlike the browsers.

Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fd3cfde46e25
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e7bcf41c0b23d83cfb31f966454945c705589a99)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-09-14 09:37:12 -07:00
Thiago Macieira 7359d63209 Replace qt_normalizePathSegments algorithm with QUrl's removeDotsFromPath
Commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d rewrote the latter for
simplicity and performance, so copy it over with intent to merging the
two together. In this copy, however, we keep the behavior introduced by
commit eaf4438b35, which made the
normalization match the behavior found in browsers, but didn't apply to
QUrl::resolved (that's the next commit)

Task-number: QTBUG-120396
Pick-to: 6.8.0 6.7 6.5
Change-Id: I2670423f6c6a5339771ffffdf15ebad46fd25cb4
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 78e2d24752d8b6652aac89d1e79f245bc88281c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-14 09:37:11 -07:00
Thiago Macieira 5eafba18e0 QUrl::resolved: remove the lambda in removeDotsFromPath()
I had made this change but didn't push it. Amends commit
09055d7211b1f8ba9fdec141a1e919faee1c1676

Pick-to: 6.8.0 6.7 6.5
Change-Id: I8a96935cf6c742259c9dfffd17e8fc87d41dd891
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 01fbb883ad8832808110e74a0c4b2724f1e38d6c)
2024-09-14 09:37:10 -07:00
Thiago Macieira 7b45dc49bb QUrl::resolved: avoid detaching from paths that don't have dot segments
This can happen in any number of cases where neither the base URI nor
the relative one had a "." or ".." segment. In particular, we want to
avoid detaching in the case where the new path is the same as either of
the base or relative URI's, which can happen when the other was empty
(and mergePaths() didn't have to prepend a slash).

Pick-to: 6.8.0 6.7 6.5
Change-Id: Iac1ff680887641888e00fffd17e14f3927e828ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 09055d7211b1f8ba9fdec141a1e919faee1c1676)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-09-14 09:37:09 -07:00
Alexey Edelev 21eff6644d Fix the platform-detection condition in the PlatformGraphics module
We cannot use the fancy options in PlatformGraphics since user projects
lack of their evaluation in QtPlatformSupport.cmake. Use the explicit
CMAKE_SYSTEM_NAME-based conditions instead. Those should work if
respective CMAKE_SYSTEM_NAME is specified in the toolchain file.

Amends 3322f585eb5ad11acc1f93ecaafb42e30e37b197

Change-Id: Ifb6ced360e8cade7315b2b238837578bfc9a1bc3
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 43cac6eaa90897e50daf6105b19528b82bf776aa)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-09-13 21:58:05 +02:00
Alexey Edelev 26d9fca58e Generalize PlatformGraphics
Add the unified PlatformGraphics module, which looks for either Integrity
or VxWorks platform graphics.

The PlatformGraphics module creates the interface
PlatformGraphics::PlatformGraphics target which links the respective
platform graphics target. It's expected that from the platform graphics
targets to deliver the consistent subset of definitions, libraries,
include directories, compiler and linker flags and also the special
<platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables.

The <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables are
consumed by the PlatformGraphics::PlatformGraphics and stored in the
respective _qt_internal_platform_graphics_required_<type> property, to
access the value without scope limitations. The property then is
checked by the EGL and GLESv2 modules(this can be done elsewhere too)
and is appended to the CMAKE_REQUIRED_<type> variable before running
the respective compiler checks.

Task-number: QTBUG-128455
Change-Id: Id1987c6294327509a14fbeeb7b8bf39aad6f486c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
(cherry picked from commit 3322f585eb5ad11acc1f93ecaafb42e30e37b197)
2024-09-13 21:58:04 +02:00
Alexandru Croitor 94187d9f79 CMake: Update default copyright for Qt SBOM packages
Task-number: QTBUG-122899
Change-Id: I087ff034023724e5bae736dbd8168198dc6bfce3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 3809ebcb1381b9aaeed55bca43b34f33bc2d9271)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:08 +00:00
David Faure c37256f6e4 QAbstractItemView: use QPMI in currentChanged in case of layoutChanged
If the model's setData() emits layoutChanged, it invalidates QModelIndexes
that this code is working with, so we have to use a persistent model
index for 'current' to protect against that. For 'previous', Volker
Hilsheimer had the idea of moving code around so we're done with it
before calling commitData().

Fixes: QTBUG-127852
Change-Id: Ieb6ebc9603e7a753d78aab11ce81ad87d71f5084
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit cbc5b4fbe12b6c4410bf482cd1caac933c8b63ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:07 +00:00
David Faure d53c3809de QConcatenateTablesProxyModel: react to row and column moves
Fixes: QTBUG-128742
Change-Id: I6282c3c9f27c435da5d511c61fbb051da127229c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b9ba28315d889d0b87ae048dffe33eac55efcda2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:05 +00:00
Michal Klocek 1ba89701fa Fix bogus QT_BEGIN_NAMESPACE for qandroidmodelindexproxy
This should be rather QT_END_NAMESPACE.
Fixes custom namespace build.

This amends 55fc15ce8272073b9b404762b83e3e7acee0111e.

Change-Id: I61d0ea24f8b0e3382fdfb4658b8a514dbaad8799
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e94fefecfc47a6715d90ef8975f65d5702cc2477)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-13 17:44:04 +00:00
Eskil Abrahamsen Blomfeldt 7e70f3293a Update to Harfbuzz 9.0.0
This includes a compilation fix for Integrity which is also
stored as a patch file under harfbuzz-ng/patches.

[ChangeLog][Third-Party Code] Updated Harfbuzz to 9.0.0.

Pick-to: 6.7 6.7.3 6.5 6.2 5.15
Fixes: QTBUG-128763
Change-Id: I84156d38cf131e78e4f0d0d1716aa4e79a8c3a45
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 0d83d8bbb15e3f481b1d8abed4cd29a08499c37f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 17:47:15 +00:00
Sven Brauch a0cf2c384d QShortcutMap: add missing const& to setShortcutEnabled
If there are a lot of shortcuts in the map, the old code
caused the QKeySequence to be copied, which caused notable
delays.

Change-Id: Ia84e02f453301e046bd834b3d670a78c05c5db07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cc5a8689c162ee46a0d488d3d0cb40737905ff6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 17:47:10 +00:00
Inho Lee a338caec1b wasm: add input context composition WA for ibus
With IBUS, compositions are processed with "Dead" key.
It is supposed to be processed with input context,
so window's key event will be skipped.

Fixes: QTBUG-117096
Pick-to: 6.7
Change-Id: I179d32d656bd38990de4b656757957e26935376f
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit c494ed87382605bdafa23f15d79c2a44e75cf911)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 08:08:59 +00:00
Andreas Bacher b0d73b947f SQL/Firebird: Fix interpretation of time stamp with timezone
The firebird api expects the timestamp (ISC_TIMESTAMP_TZ) of a timestamp with time zone is provided in UTC.

Pick-to: 6.7
Task-number: QTBUG-128493
Change-Id: Iacc85ca1141407f5ab73fd0198c7b2db770bf589
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Johann Anhofer <johann.anhofer@meon-medical.com>
(cherry picked from commit 8d8805214df22bf8dccbb30c9ca4a9953f3a1068)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 07:59:22 +00:00
Toni Saario ae4a48decc Coin: Fix Windows aarch64 cross compile conditions
Match to Windows target OS and different target arch, which tells that
it is a cross-compilation.

Change-Id: Iba2d087cda501cd2622a1bd8a8732100b920956b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit b8521b89dfa36519afe8a7c8f02b982d760fc0f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 09:06:54 +00:00
Friedemann Kleint e63847cab5 QtCore/MSVC: Fix unity build error
Exclude qassert.cpp, fixing:
error C2375: 'qAbort': redefinition; different linkage

Amends 23877db5639deca70dc8cc1a7299b2cee629c7d8.
Introduced by 907e9a8b29.

Change-Id: I03d6d31eda138a411d1972f683f46c0437f8d839
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 673605110e3a33db9b58e0c514e9ec8e4da36d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 04:30:32 +00:00
Thiago Macieira b245808d97 QProcess/Unix: clean up QChildProcess before calling setErrorAndEmit()
QChildProcess' destructor may unwind the stack, due to the call to
pthread_setcancelstate(), which is why it's marked noexcept(false)
explicitly. To avoid a situation where it causes a stack unwinding while
a stack unwinding is already in progress, this commit makes QProcess
re-enable the thread cancellation state (which immediately processes a
pending cancellation) before calling anything else that may allocate
memory (thus throw). It also guards against calling
pthread_setcancelstate() twice.

The successful execution paths remain under disabled cancellation so C
library calls like close(), fcntl(), read(), and waitpid() will not
cause premature unwinding.

Change-Id: I009cf64012e167321aa6fffd609c603cf18b50e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 6763b9f7ec2a7f8dd0bfc011ccd102316bb95e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 03:20:02 +00:00
Thiago Macieira 87fbcf438c QProcess/Unix: open the working directory before changing the thread state
This operation can fail and, in handling the failure, we call functions
that may allocate memory and thus throw. If that happens, our destructor
won't be called, so this commit avoids leaving the thread in an
incorrect state by not changing it in the first place.

In case there was a failure but no exception happened (a much more
likely scenario), the destructor will be called by startProcess() or
startDetached(). Therefore, we need to ensure it won't cause problems.

Change-Id: I091193bb945a2637f463fffdd93694e555401452
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 34edfe134403e331f0fa4550a074507a393bdc52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 03:20:02 +00:00
Thiago Macieira fee6283b85 QUrl::toString: fix using of NormalizePathSegments and RemoveFilename
We were overwriting the normalization if RemoveFilename was used.

[ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::toString(),
QUrl::toEncoded() and QUrl::adjusted() to ignore
QUrl::NormalizePathSegments if QUrl::RemoveFilename was set.

Fixes: QTBUG-127711
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I8a96935cf6c742259c9dfffd17e8e1f7fec44cb6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c9ff625865c355fb57c824b13f3cb4b26e53fbe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 03:20:02 +00:00
Thiago Macieira 105c05dfb2 QProcess/Unix: restore the signal mask before re-enabling cancellations
That way we will restore the thread's signal mask even if a thread
cancellation is pending and thus forces an immediate stack unwind when
we re-enable them.

Change-Id: I36589f84c5f4d8929129fffdbb77b2020c6fa5a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7400db0f82632a4bc41c1e6fc628ae4d4c1b9385)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-11 03:20:02 +00:00
Tor Arne Vestbø 4e66be84be Android: Return QAndroidApplication instance via nativeInterface() getter
The QAndroidApplication native interface wrongly uses static methods
instead of virtual functions, which has lead to client call sites not
using the preferred QCoreApplication::nativeInterface() API to resolve
the interface, and a lack of an implementation in QCoreApplication
for the resolveInterface function.

We now implement resolveInterface for Android, so that the interface
can be resolved via QCoreApplication::nativeInterface(), even if the
interface itself (for now) is based on static methods.

Task-number: QTBUG-128796
Change-Id: Id4d8b9a6fcc7d0e2cc76de07dc0742dc5917f3ca
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 60f07671e1770c4f6fd71bbad7cf88ca35ab4de0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-10 18:45:04 +00:00
Michael Weghorn 8f5b06f977 a11y: Use desktop file name as app's accessible ID
As the QGuiApplication::desktopFileName doc [1] says:

> This is the file name, without the full path or the
> trailing ".desktop" extension of the desktop entry that
> represents this application according to the freedesktop
> desktop entry specification.

Since the desktop entry represents the application, also
use the desktop file name for the accessible ID of the
application object.

This e.g. makes Okular's application object report an
accessible ID of "org.kde.okular" instead of just "QApplication"
as the AT-SPI2 AccessibleId property on Linux.

[1] https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop

Change-Id: I554da7baaf817866db9044128f73a9ea634cddbf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 13b4075093866a497e620bdd388afaf8aa0bc962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-10 04:31:21 +00:00
Assam Boudjelthia 6a9ee6eb68 Android: bump AGP to 8.6.0 which supports Android 15
AGP 8.5.2 still throws a warning about not being tested
with Android 15 builds, now 8.6.0 is released and doesn't
have the warning.

Amends b5d8552f2baab56457d3f39f6b2915c72447b702.

Fixes: QTBUG-128648
Task-number: QTBUG-126061
Change-Id: I3d7a4c9c184e1a81f0ebb9431a6e3ca9706d19e9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 8436455e2740000a817e0b8154e13f47e6abb68c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-09 23:48:01 +00:00
Richard Moe Gustavsen 893dc6d772 Revert "QGuiApplication: don't send pointer events to windows other than the active popup"
This reverts commit 2e711e47e0fedd636af2116c56622cc7be958808.

After closer investigation, it turns out that menus in Quick before 6.8
does infact forward pointer events outside the popup to the item under
the mouse. Only if the popup is modal will this be blocked. So blocking
this from QGuiApplication will cause a difference between Popup.Item and
Popup.Window, and needs more investigation.

Change-Id: I7d21258cb8fafd7380786fed0d6370e0a9090188
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-09-09 14:10:57 +00:00
Tatiana Borisova 10680554db qtbase build should't fail with -DFEATURE_process=OFF option
- Added #if QT_CONFIG(process) to the qt code that uses a QProcess

Change-Id: I79b39392bd2f75384256e5564203a8c875169916
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f6dab97455f866243132ed38a070ebb3879a0c82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-09 07:45:17 +00:00
Christian Ehrlicher 2987e96a6c Examples/Sql/Masterdetail: Fix deleting rows
Completely deleting a row in a QSqlTableModel needs a call to select()
afterwards, otherwise a blank column will stay according the
documentation of QSqlTableModel::removeRows()
Also add albumdetails.xml to the resource file to make sure it's found
during runtime.

Task-number: QTBUG-128434
Change-Id: Ie5cc38edfa27984d186467e3372b05987f78d14c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a28fe86af30bd3293f49ad09ee9c044e06ccbe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-08 10:08:28 +00:00
Christian Ehrlicher 05c0ce01fb QSqlRelationalTableModel: properly clear relational dictionary
When the relationModel is updated (e.g. a new row is added or removed),
the internal relation cache needs a refresh to reflect those changes.

Fixes: QTBUG-128434
Change-Id: Ie388c01d545564ad7b1424d70267166ac1e4bfd6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 48753a03de7c9c394fbf4cf69e2c2f3d1048c85f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-08 10:08:26 +00:00
Johannes Grunenberg 2f4680d143 Disable q(u)int128 for Clang with MSVC's STL
Clang supports q(u)int128, however, MSVC's STL doesn't have support for
it in <type_traits> and <limits>. MSVC's STL is used by Clangd on
Windows.

Fixes: QTBUG-128675
Change-Id: Ic0be6b9d2659477829c7b369385ef885dee8d355
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1f9a660eb2d5c6e3cb9c80dc292f3ec355296515)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-08 10:08:25 +00:00
Thiago Macieira 81e6ede3a8 Don't mark Q{Explicitly.}SharedDataPointer as Qt_6_PRIVATE_API
The QT_DECLARE_Q{,E}SDP_SPECIALIZATION_DTOR_WITH_EXPORT macros make the
destrcutor of the particular instantiations be out-of-line and exported
from the library in question. In many cases, the class name that is
being instantiated can found in a _p.h and this causes syncqt to mark
any use of this class as private API, including this constructor that is
meant to be used from inline (user) code.

This patch marks all such instantiations to be "public" API. That will
include some uses that shouldn't be so marked, but this is easier than
having to do it piecemeal.

The ELF version was changed for thsee Symbols changed in QtGui (for example):
 QExplicitlySharedDataPointer<QPlatformPixmap>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QColorSpacePrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QPageRangesPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QColorTransformPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QPdfOutputIntentPrivate>::~QExplicitlySharedDataPointer()@@Qt_6
 QExplicitlySharedDataPointer<QEventPointPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QPageRangesPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QColorTransformPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QPenPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QFontVariableAxisPrivate>::~QExplicitlySharedDataPointer()@@Qt_6
 QExplicitlySharedDataPointer<QPlatformPixmap>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QColorSpacePrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QEventPointPrivate>::~QExplicitlySharedDataPointer()
 QExplicitlySharedDataPointer<QPenPrivate>::~QExplicitlySharedDataPointer()

Task-number: QTBUG-128656
Task-number: QTBUG-117514
Change-Id: I1f25f1e61bb98159f9d3fffd63acbe04098cfef6
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 33707235841981133edfdfcd88cc6e234aa4fc45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-08 10:08:23 +00:00
Allan Sandfeld Jensen 998bffecc2 Fix warning/crash for MSVC ARM64 mode
Initialize the variables outside the loop to avoid repeating it on every
iteration.

Fixes: QTBUG-128667
Change-Id: I8e2ed0e40bdc4d687060df72f1d45e940e56df98
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 0819f128c5206d5712acce2e86e9eb5d9ba13182)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-08 10:08:22 +00:00
Morten Sørvig 10397e5351 macOS: send DPR change on BackingPropertiesChange
AppKit sends the viewDidChangeBackingProperties message
to the view when the backing store scale changes.
Propagate to QtGui via handleWindowDevicePixelRatioChanged.

Pick-to: 6.7 6.6
Fixes: QTBUG-118794
Change-Id: Ia675e84f74dd3c64d6466adc753accbbb650325b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97c12e3f2dc1e2114aeb8abaff4d551b112887ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-07 13:48:31 +00:00
Jarek Kobus 5fa620173e AssetDownloader: Sync TaskTree sources
Change-Id: Ib3727dbca7b27e796b6fab084cbaaa9890b78118
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit f4db5ce8a8e6994b4dce407977f4e936dcd7f48e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-07 13:47:55 +00:00
Mårten Nordheim d62a2decaf Network: includemocs
IIRC they were Q_GADGET'ed

Change-Id: Ia80e506587fb583591ea4b89e648cb9cdfd98dfa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1b592e18b2f3f20d6941fe1a761d680f3dbdb61a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 19:25:28 +00:00