Commit Graph

68691 Commits (7b45dc49bb77d2b9ffdf9a3ac420e59aa89550db)

Author SHA1 Message Date
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
Ahmad Samir 567eae56e7 docs: promote QBasicTimer usage by making it more visible
Deduplicate some API docs.

Mention that it's a RAII class, to make it more appealing to users.
Copied the "RAII" note and link from QSemaphoreReleaser's API docs.

Change-Id: I53ced6eb7c2ab55ffc04e70c250b5f5639406911
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e1fdfe9da8ccdeed9af602897232a513884b0515)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 19:25:26 +00:00
Marc Mutz 799f6bf43f Q(Multi)Hash: Fix underconstrained heterogenous operator[]
If the key doesn't exist yet in the map, we need to be able to create an
actual Key object. Consequently, we require that the type is actually
convertible.
This doesn't fix any broken code, but avoids compilation errors in QHash
internals bubbling up.
Note that the existence of a comomn_reference does not imply
convertibility (so the concept version wasn't strict enough either).

Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Change-Id: I4ed46f343817932063084642093cac193fd9554f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a338f67dceed61009375a4a90a7fe32a06b443a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 15:55:13 +00:00
Marc Mutz 3dc6b37bae QVersionNumber: make iterator comparison non-noexcept again
When these iterators were originally added¹, their relational
operators, following the Lakos Rule, were not marked as noexcept
because they have preconditions (lhs and rhs must come from the same
QVersionNumber object).

d292648d0bbac50388dae035dc34782accb3807f then added the noexcept,
disregarding the Lakos Rule. Until the ongoing discussion regarding
the Lakos Rule on the project mailing-list² is concluded, don't add
noexcept. We can always add it in later, but we can't remove it once
released.

Requires manually working around the missing
Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_NON_NOEXCEPT macro that we
don't want to add if there's no other user.

¹ 2188ca2c5d
² thread starting at
  https://lists.qt-project.org/pipermail/development/2024-August/045544.html

Change-Id: Ie88326519673166afe8cb44267c23944b27c68d2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a84b79df0fb8a92b17a39bbf706714e93de9d6fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 15:55:11 +00:00
Mate Barany 92d9a741c0 Use NSDMI for all the members of the QNtlmPhaseBlock classes
After the base and derived classes have been merged we can uniformize
the initialization as well.

Task-number: QTBUG-127539
Change-Id: I3828dc973fd7b3ccd06272e2e26eaae4edab8768
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c3093b3d8f27fa3df14e04245dea9ed1e781f61e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 15:55:09 +00:00
Fabian Kosmale 722c7edf03 QHash: Unconceptify heterogeneous search code
That allows the code to run in C++17 mode - at the expense of
significantly worse compile time error messages, potentially worse
compilation speed and harder to read code.

Adjust the test type to actually model
detail::is_equality_comparable_with (which requires all four
relational operators even in C++17).

As a drive-by, fix the return value of remove() from auto to bool.

Done-with: Marc Mutz <marc.mutz@qt.io>
Fixes: QTBUG-128470
Change-Id: I68df26db579c60812a18e09b76dd5712e73ccaa2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7fe3cee36352c74cbaaff52e863bd0da1170affa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 15:55:07 +00:00
Mårten Nordheim 16ed1fe089 tst_qnetworkreply: Speed up moreActivitySignals
Going from 40 seconds to 1.
The issue is that wait() doesn't care if there was
a signal emitted already, it will just wait 5 seconds for a new
one. But we don't care, we just want to know that there was 1.

Pick-to: 6.7 6.5
Change-Id: I96f1f00bc6171ccc6e5b2f033fa407de5cf0c0c3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 65494fbd3dff16d4476b5ac8c04df830d9fd61e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 14:38:30 +00:00
Tor Arne Vestbø 5ed9b165bd Restore support for iOS 16 for Qt 6.8
Our general strategy is to support the latest two iOS releases,
as most people upgrade their iOS devices quite aggressively.

But given that iOS 18 is not out yet, and that people still
spend some time upgrading once it's out, we don't want to be
in a situation where we effectively only support iOS 17.

Fixes: QTBUG-128678
Change-Id: I959794944807e5b6b5e56f22d3c57977bc4f2aee
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit e2c4a1669e5b6496d52e2f55a94bd7d4f4469b98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 14:38:26 +00:00
Tor Arne Vestbø f30fb442af macOS: Return invalid QColor if qt_mac_toQColor is called with a nil NSColor
Call sites of qt_mac_toQColor may not necessarily check the NSColor
for nil before passing it to qt_mac_toQColor, as seen for example
in the QCocoaColorPicker implementation.

Without an explicit nil check we ended up returning a valid QColor
with all color components set to 0.

Pick-to: 6.7
Change-Id: I0cc36049fca05a6b668c0c610bc40eedbc72df3a
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 271bfe4a5405309dc8d48807d6f28d174efb2cc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 14:38:25 +00:00
Mårten Nordheim 6e98673846 tst_qnetworkreply: localhost may resolve to ipv4 and 6
On some platforms, localhost resolves to both ipv4 and ipv6 addresses.
In that case we might get multiple emissions of the
socketStartedConnecting signal, for Happy Eyeballs.

Pick-to: 6.7 6.5
Change-Id: Ib39a167bdde2089106c89a3e297cbb0ad2f357d9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 13a0f294b5ef2ec8a2057d72365f989ddf6290de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 14:38:22 +00:00
Mårten Nordheim 7eea3acac9 Tests: suppress has_denorm deprecation
Deprecated in C++23:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2614r2.pdf

Pick-to: 6.7 6.5
Task-number: QTBUG-128584
Change-Id: I43fb045dfa78b1f0ba5bd52886ca1bf89869d91d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e54ee29862bd97749d547330a739416768088986)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 14:38:21 +00:00
Marc Mutz bd9e40b14c Fix compilation with QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST
You cannot direct-initialize a pointer variable with a comma
expression. Need to wrap it in an extra set of (). Instead of that,
wrap with {} on the outside, to make it look less like Lisp.

Amends 0ed039fd134fb8025236847295681f13f1775847. On dev, a follow-up
change has already removed the code in question, leaving only 6.8
affected.

Change-Id: I8d03093849d0bd7b868703218b48b5cb9d2a18f4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-09-06 13:05:16 +02:00
Soheil Armin c28225e469 Android: Add Void conversion support to QAndroidTypeConverter
Now the caller of toJavaObject() is be able to get
an object of Void type when the input parameter is QVariant<void*>.

Fixes: QTBUG-128586
Change-Id: I6eea670788461e4eb0d8f38a4a872c2c4759bdd8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit e02813eeb5e3f3475541b50ba8d21a7bc724e698)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-06 10:19:22 +00:00
Marc Mutz b972361ec4 QtPrivate: add "defined in" comment to findByteArray/lastIndexOf(~~~, char)
It's customary to add such a comment when an inline function is not
defined in the same header it is declared.

As a drive-by, remove the pure attribute from lastIndexOf().
Q_DECL_PURE/CONST_FUNCTIONS are only useful for out-of-line functions.
For inline functions, the compiler sees the body and can determine
that they're pure or const (in the __attribute__((const)) sense)
itself.

Found in API-review.

Change-Id: I27aa5cfaf21b1015a6c8b9e4773a1c2c5134a226
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3b812f0409c50c6a3fd1d66a9c18bc323e0a0ca3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 18:24:12 +00:00
Marc Mutz 1e86694501 QLatin1StringMatcher: use specialization instead of an is_same chain
Same result, but less templates to instantiate, so should be faster to
compile.

Found in API-review.

Change-Id: I43ebb94c73c6b4462441a7ae85a67909f6894ba3
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 13d2d55957c52c4f2270248be57dc18bea507236)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 18:24:05 +00:00
Ahmad Samir e960afffc9 QDirListing: flesh out API docs
- Let qdoc generate docs for const_iterator/sentinel
- Document pre- and post-increment operators
- Document const_iterators typedefs
- DRY API docs

Change-Id: Ia559541118586ca0314cd5f618acda3f7c820659
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 68a06e99a8577d08e8b885f0b417b1c9f90a7459)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 18:24:03 +00:00
Richard Moe Gustavsen f0c6354a38 QGuiApplication: don't send pointer events to windows other than the active popup
If a popup is visible, we're not supposed to send pointer events
to other windows than the popup. It doesn't matter if the popup
doesn't want it. But currently we end up doing so anyway, which
mean that we would trigger items elsewhere in the UI.

This patch will instead make sure that always return from
processMouseEvent() after sending, or forwarding, it to the
active popup.

Note: some styles in Controls (e.g macOS) has a menu window that
is actually substantially bigger than what it appears like on
screen (to make room for a drop-shadow). This means that a mouse
press can happen outside the visual borders of the menu, but still
inside the popup window that contains it. And this is also a
reason why some bugs related to forwarding of mouse events only
surfaced on some platforms (Ubuntu), but not on others (macOS).

E.g for a Menu in a MenuBar, the menu window on macOS would actually
be placed on top of the MenuBar and block pointer events from reaching
it (because of the menu shadow). While on Ubuntu, since the menu has no
shadow, the press would instead trigger the MenuItem in the MenuBar.
But by never forwarding pointer events to windows other than the
active popup, such differences will never happen.

Note: we should actually forward pointer events to the window under
the mouse if QPlatformIntegration::ReplayMousePressOutsidePopup is
set (and WA_NoMouseReplay is not set). But this API is currently not
reimplemented after QGuiApplication was refactored to support popup
windows also in Qt Quick. And ReplayMousePressOutsidePopup seems to
be false on all platforms other than Windows.

Change-Id: I55692cf2cae4c8f9e46976b105660bca96bd65e6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit fc9af570507bf067a182ab3f1c2f51a29f59e38c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 18:24:02 +00:00
Ahmad Samir 28161ab42e QTimer: QChronoTimer isn't necessarily going to supersede QTimer
... since no consensus has been reached about what to do in Qt7 (whether
to fold QChronoTimer back into QTimer or let QTimer be as-is to not
break any existing code and use QChronoTimer in new code).

Task-number: QTBUG-128426
Change-Id: I7d09b803b4f0df3ea7f48a5d900d0ae4be721d7b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 87030778969165a285af2d919d6d7293e8078b6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 18:24:02 +00:00
Marc Mutz c92b1f294e QLocale: mark equals() noexcept
It effectively was, relational operators should be, and
comparesEqual(), which calls equals(), actually already was marked as
noexcept, so also mark the out-of-line function.

Found in API review.

Change-Id: I3fce2277f328284e098afeee40c319a7ba85fefe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit e358f3158cc2d5c248b5626f15e556414fc0cd6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 15:50:25 +00:00
Mate Barany 3758321282 Merge the block and blockbase classes in qauthenticator.cpp
The inheritance is probably unnecessary.

As a drive-by, initialize all the members to silence the original
Axivion warning.

Task-number: QTBUG-127539
Change-Id: Iba9d8f2cba246616dbb6e8e9b7b21e8589af84d9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit de3dd3878c2305be81d539e768788e2713c81423)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 15:28:34 +00:00
Mårten Nordheim 91730ecf3b Containers: correct documentation for QMulti(Map|Hash)
They're no longer just convenience subclasses.

Pick-to: 6.7 6.5
Change-Id: I80b52eeac4a68f6b546b635c792a17e975d3d7e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1666ce930b980ec73f01b038eb8d1a2a7b180ea4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 15:28:32 +00:00