Commit Graph

75309 Commits

Author SHA1 Message Date
Marc Mutz a21cb0282a QSystemLocaleData: de-pessimize constructor on Unix
The old code simply called readEnvironment() from the
constructor. That function locks the QReadWriteMutex for writing, but
the constructor call is already protected against concurrent runs by
Q_GLOBAL_STATIC, so the constructor doesn't need protection.

There's even a slight chance for deadlocks because the critical
section calls qgetenv(), which itself is mutex-protected. So if we're
called from a qEnvironmentXx() function that already holds
environmentMutex... deadlock. This can still happen on LocaleChange,
but that is much rarer than application startup.

Fix by Extract Method on readEnvironment() to create a private method
that does not lock the mutex, and then have readEnvironment() and the
constructor call it.

All these qgetenv() calls hammer on the environmentMutex good, of
course, so at some point, we should either move this code into
qenviromnentvariables.cpp (like qTzSet()) or expose environmentMutex
so the code can lock it once, do all the non-q-getenv() calls and then
unlock it once at the end. Filed QTBUG-138582 to keep track of this
issue.

Amends 5b6741c39a.

Task-number: QTBUG-138582
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ibdd8cf4415d167aa8a88b71344e73871a0af9005
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-07-25 19:10:25 +02:00
Shawn Rutledge 4624709901 doc: Reword QGestureRecognizer docs slightly; fix a comment
"The application" was a bit vague: as a Qt user, I write an application;
but here, the QApplication object is what was apparently meant (although
by saying that, we omit the private detail that QApplicationPrivate has
a pointer to QGestureManager which actually takes ownership).
Investigation prompts changing the comment by the instance() method:
it's declared in QGestureManager, defined in qapplication.cpp.

Task-number: QTBUG-123585
Pick-to: 6.10 6.9 6.8
Change-Id: I50900697db8798c1ab4b9c5abaa9d2102a3cbcf4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-07-25 18:51:34 +02:00
Dheerendra Purohit 8e3221cb8a Fix memory leak in QGestureRecognizer::unregisterRecognizer()
Add immediate deletion for orphaned QGestureRecognizer instances.
Skipped deletion if recognizer is obsolete or already marked for
cleanup.

Pick-to: 6.10 6.9
Fixes: QTBUG-123585
Change-Id: Idc84f333ce247c5eb12850f672b63ae8347ed993
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2025-07-25 18:51:34 +02:00
Aurélien Brooke 0e51db1eb5 QRhiPassResourceTracker: store as a QFlapMap instead of QHash
QVarLengthFlatMap is more efficient in this hot path, since it does
not allocate and has contiguous memory.

Now that QRhiPassResourceTracker is a big struct, we use emplace_back()
instead of append(QRhiPassResourceTracker()) to avoid a copy when
creating a new tracker, and store the list as a QVector instead of QVLA.

As a drive-by, add a couple of Q_UNLIKELY to put the warning paths in
cold section.

Change-Id: Ib7df6d6ef618d138774d60a359a482cd9aeb34d9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2025-07-25 18:51:34 +02:00
Shawn Rutledge 684c02fbbe Add qt.qpa.input.mouse logging category to QLibInputPointer
Change-Id: I67f0a6a2c6481cc0e71c8afe50e4fb05912c34f9
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-07-25 18:51:34 +02:00
Marc Mutz 6f4d64b21e QLocale/ICU: don't take addresses of ICU functions
Taking addresses of library functions is usually not a good idea. The
C++ standard makes it UB for its own symbols, and while I didn't check
whether ICU explicitly allows it, the answer would probably be that
no-one ever thought about this...

Port from passing pointers to library functions to passing an enum
{Upper, Lower}.

As a drive-by, wrap most of the functions in a namespace
QtIcuPrivate. I did this initially to keep the enum name manageable,
but it looks kinda stupid to have just the enum in the namespace and
not the function taking it as an argument now.

Task-number: QTBUG-138583
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I31b21737468bf05f52f695279dd071117420736e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-25 14:12:44 +02:00
Joerg Bornemann 06120c0cf3 configure: Ignore (qt_cmdline|configure).cmake from skipped repos
In a top-level build, when Qt repos are skipped with the -skip argument,
we read qt_cmdline.cmake and configure.cmake.

Now we're ignoring such files in skipped repositories.

This isn't a big problem at the moment, but it's relevant for a
subsequent change that will generate a vcpkg manifest from these files.
We don't want to add dependencies of skipped Qt repositories to a vcpkg
manifest.

Change-Id: Ib0558d972b24133ad746b6c8d18a09e11c3faf83
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-25 10:04:32 +02:00
Marc Mutz 4806a5a857 tst_QLocale::toLowerUpper(): also test long Türkiye ı,İ sequences
... not just ASCII P.

Task-number: QTBUG-138583
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I44cc688a172b62dfb26ecce775f487f41d2c0368
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-24 22:02:12 +02:00
Matthias Rauter 70edabf98b Mark the remaining files in io as significant
QUIP: 23
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-135187
Change-Id: Ib526ec30cbcb64d311832c54135a2324af5275ad
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-07-24 22:02:12 +02:00
Alexandru Croitor add3cf9380 CMake: Don't publicly depend on CorePrivate in asset downloader
This unintentionally exposes the CorePrivate target in projects that
do find_package(Qt6Quick) due to the following dependency chain:

 Quick -> Qml -> QmlPlugins -> QmlAssetDownloader ->
 ExamplesAssetDownloaderPrivate -> CorePrivate

Amends cbb2493cf7

Pick-to: 6.10
Fixes: QTBUG-138603
Change-Id: Ie892e6b91a586a12eb8af25d24893a4b9ebd9ab1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-24 22:02:12 +02:00
Jacek Poplawski 91d75366d8 Relax timing check in tst_QMovie::multiFrameImage()
ICO images lack animation metadata, so QMoviePrivate::infoForFrame()
assigns a default nextFrameDelay of 1000 ms. QMoviePrivate::next()
scales this value according to playback speed (100 ms), and subtracts
the time spent processing the frame.

The test previously asserted that nextFrameDelay is exactly 100 ms,
which is only true if processing time is zero. On real hardware this
usually holds, but under QEMU (especially for VxWorks Intel), processing
may take 0–40 ms, reducing the effective delay and causing test
failures.

This commit relaxes the strict check, allowing a range of 50–100 ms to
accommodate minor variation in processing overhead.

Task-number: QTBUG-137564
Change-Id: I859612bd2c684df830c5ea8665be1a1763b4f2e0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2025-07-24 22:02:12 +02:00
Tim Blechmann 122c210089 wasmdeployqt: silence msvc warnings
* use size_t for qHash overload
* return false in copyPreloadQmlImports error path.

Amends b6cdc2a6ef

Change-Id: Ifd62e187c205b129423509fbd391d6ba659255cd
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2025-07-25 01:54:15 +08:00
Volker Hilsheimer 13cb9b8a59 QQueuedMetaCallEvent: move allocArgs() call into copyArgValues()
The two functions are always called together from the constructors,
first one and then the other. Calling copyArgValues() without calling
allocArgs() first makes no sense.

So move the allocArgs() call into copyArgValues(), and move the code
next to each other.

Amends f6211c079f.

Change-Id: Ib9c38509eb2c48dc314b95bd5300997a75f56198
Reviewed-by: Aurélien Brooke <aurelien@bahiasoft.fr>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-24 19:54:15 +02:00
Mårten Nordheim d98fd12ca8 QHttp2Stream: send RST_STREAM in most states when destroyed
Apart from Idle (not started) and Closed (nothing more will happen),
it is quite likely that we benefit from sending an RST_STREAM
if we are done with it in more states than just
Open (started, but no one has finished their part) or HalfClosedRemote
(the peer has finished their part).

Specifically HalfClosedLocal (we finished sending our stuff) makes a lot
of sense to send, seeing as it means we have likely sent our HEADERS
and are waiting for a response. Without marking the stream as locally
reset we would treat any incoming HEADERS as unexpected, and invalid,
closing the connection.

Fixes: QTBUG-138660
Task-number: QTBUG-138156
Pick-to: 6.10 6.9 6.8
Change-Id: I9ac6144ee85915f8f6a02e73909cdb01a73fe409
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-07-24 19:54:15 +02:00
Jani Korteniemi 5ef73686cf Re-land: Android: destroy the window surface only after exit transition
Splash screen (or blank launch screen) is shown when exiting the
Android application caused by hiding shown windows and destroying it's
surface before application exit. On application exit all windows are
first set to invisible then surfaces destroyed and finally removed from
layout. Also window opacity change can show underlying splash screen as
it is set as theme for the application.

When pressing Android device's back button application either should
hide current window or exit the application.
When exiting current window should be visible during application exit.

Add AtomicBoolean m_canBeDestroyed to QtWindow for blocking normal
surface removal.
Set false by default from QtActivityDelegate.addTopLevelWindow and
changed from QAndroidPlatformWindow::setVisible() dependent on if
there are more visible windows present. Destroy last window with
delay so it can be shown during app exit.

Set full screen flags for current window on pre Android 11 so
it's decor view can scale to full screen on multi-window mode view
is when updated.
In QtActivityDelegate.setUpSplashScreen() set layout to use android
device's DayNight theme colors to not show splash screen theme if
window opacity is changed.

Previous reverted change caused crashed tst_qmltc_examples test.
Previous SHA e40d9d4361

Fixes: QTBUG-127705
Task-number: QTBUG-124140
Pick-to: 6.8 6.9 6.10
Change-Id: Ifda904c08c3b4363005e953e5ba9ff15a46e5195
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-24 19:52:41 +03:00
Alexandru Croitor 26b349f569 CMake: Fix swapped SBOM Qt and Qt repo CPE functions
The function implementations were accidentally swapped, leading to
confusion and incorrect order of the CPEs.

The Qt generic CPE should be computed first, followed by the Qt
repository CPE.

That's because most vulnerability databases like the NVD use the qt
one.

Pick-to: 6.8 6.9 6.10
Change-Id: Ic67c00288318fdff3172b413eccfb413072480c8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-24 18:52:41 +02:00
Alexandru Croitor e23afb6066 CMake: Map paths of SBOM source files in the install prefix
When building in a non-prefix build, we put synced headers into the
qtbase build dir, aka the prefix dir. In that case these source files
are neither in the source dir nor in the build dir.

Map such paths with the /install_dir marker, to make the paths
reproducible, regardless of the build dir.

Also add a DEBUG message to more easily detect such cases in the
future if needed.

Fixes: QTBUG-136163
Pick-to: 6.8 6.9 6.10
Change-Id: Id0b515d50adc8e8da384fe481641f171517b9150
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-24 18:52:41 +02:00
Oleksii Zbykovskyi d9251a6436 Fix files under src_corelib_kernel prefix
Fixed each file and added to the build system. Also updated docs.

Task-number: QTBUG-137566
Change-Id: I8e75b9b089167c427bab236c4792fd1056432be9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-24 18:52:41 +02:00
Oleksii Zbykovskyi 70cc4a7dc1 Fix of files under src_corelib_io prefix
Made all snippets in these files compilable

Also fixed some documentation related to the snippets change.
Removed qdebug docs file since it was not used
anywhere except one file. Obviously, moved the text to that file.

Task-number: QTBUG-137566
Change-Id: I914afc96d58617a04d03d4f6e9545ec1aa2a8eb8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-24 18:52:41 +02:00
Oleksii Zbykovskyi 80b6155881 Add snippets to the build system and fix related issues
Created CMakeLists.txt file with all compilable snippets by now,
and added it to the build system.

Also fixed some previous files to make them build correctly.
And fixed some documentation related to the snippets change.

Task-number: QTBUG-137566
Change-Id: Ibf4321dd243bdf774c508bc1e43f9019a9074c30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-24 18:52:41 +02:00
Alexey Edelev e34914d5bf Add signing support for modern android bundles
Use gradle based signing mechanism for the modern Android bundles.
From the interface perspective signing remains unchanged:
QT_ANDROID_SIGN_<AAB|APK> flags control if the package should be
signed. The credentials are taken from the QT_ANDROID_KEYSTORE_*
environment variables.

Signing is done in separate CMake script to avoid storing passwords
inside build scripts. Scripts reads passwords from the environment
when the respective signing rule is running.

Change-Id: Id1097b2b6d011a63c58e5a441c5360a1a5d97e8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-24 17:33:35 +02:00
Alexey Edelev b8f6af3b43 Forward Android specific flags to CMake tests
Forward the values of QT_USE_ANDROID_MODERN_BUNDLE and
QT_USE_TARGET_ANDROID_BUILD_DIR to Android CMake tests.

Drive-by make the keytool command error more verbose.

Change-Id: I8313d04ed89f545548a29463f39b5aa755f015e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-24 17:33:35 +02:00
Alexey Edelev 06b5d2e7ab Check android bundles in test_android_signing
Extend the 'test_android_signing' test so it now supports checking both
AAB and APK outputs.

Change-Id: Ia0dfd09a240691f65c78658a572527cd4ab94119
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-24 17:33:34 +02:00
Alexey Edelev e302c79c6e Use _qt_internal_android_get_gradle_property for ROOT_PROJECT_NAME
_qt_internal_android_get_gradle_property makes the same generator
expression as the one created manually for the ROOT_PROJECT_NAME
substitution. Generalize this.

Change-Id: I4c17d5fa2ac75b057b0ed98dc1a92142cb1ea20e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-24 17:33:34 +02:00
Alexey Edelev b5c28166a8 Add explicit error if Android package name is missing
androidtestrunner expects that Android package name is stored as an
attribute in the AndroidManifest. The value is required to run android
application and grant the required permissions, so it makes sense to
add the early exit and provide the clear error message if the package
name is missing.

Change-Id: Icfeb80f79c4540dd4829add0c1b61e2d61fcec8e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-24 17:33:34 +02:00
Alexey Edelev d38b71e257 Unify AndroidManifest processing in androidtestrunner
Optimisation bit, read and process AndroidManifest only once.

Change-Id: Iaf66c748d98e67c9eebfabdf7357aa480929b8de
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-24 17:33:34 +02:00
Alexey Edelev 477dcae2d8 Remove -g flag from apk installation command
Grant permission precisely using 'adb shell pm grant' command. This
also unifies the permission granting for aab and apk packages.

Change-Id: Iff5e45703830afed7c6fd98c940cb63626fe66f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-24 17:33:34 +02:00
Jarek Kobus 10036a5d60 QVariant docs: Remove redundant is
Pick-to: 6.10 6.9 6.8
Change-Id: Ib176b743810422b99b78d53e59f3277c44698e16
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2025-07-24 10:28:51 +02:00
Thiago Macieira 0794a8a0a2 QLocale/Unix: put QSystemLocaleData in an unnamed namespace
It's only in the .cpp.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ia6425134773dac442932fffd51a43a1fe637b715
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-07-24 06:06:58 +00:00
Thiago Macieira eaef0e4671 QLocale/Unix: remove unnecessary #endif/#ifdef
It's the same thing. Amends a0c4a71226
("Inital port of QSystemLocale on BlackBerry 10") from Qt 5.2 which
removed a bunch of older QNX classes.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Idd39bc44956bd82356b6fffdf63dbdc775bb7fa3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-07-24 06:06:58 +00:00
Volker Hilsheimer b2602c221f QRangeModel: a change of role names is a reset
For Qt Quick item views, changing role names is the same as a full
reset of the model data, invalidating all delegates and persistent
indexes.

Pick-to: 6.10
Change-Id: I04f07ed0e02f7a9e843d647f75b4d84a60c495c2
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-24 05:34:08 +02:00
Eirik Aavitsland fc5c2272d4 Fix cache usage after sharing change
The semikludgy trick of accessing a copy's d pointer is no longer
needed, and actually fails to utilize caching when it is enabled (seen
in qpainterpath benchmark test). Simplify by only taking a copy when
the cache is anyway not enabled.

Pick-to: 6.10
Change-Id: I713c2d37609a8d6129c1b12100d881fee59e1100
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-24 03:54:15 +02:00
Marc Mutz 7a301b9dd0 QLocale/ICU: add a missing std::move()
We can move the result object into *out, so do that.

Coverity also found this.

Coverity-Id: 424945
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I4fbc3a827d104a495df71cace4ddd7a51c853bbe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-23 21:08:08 +02:00
Marc Mutz ab2b6d3711 tst_QLocale: check invalid language codes with valid prefixes
Those should be rejected, but the one with an embedded NUL is not.

Task-number: QTBUG-138562
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I6a0103307fb868afba997334a37b31b637cd7473
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-23 21:07:57 +02:00
Marc Mutz 06c4db3a08 tst_QHashFunctions: check qHash(QMap) isn't ambiguous
It isn't.

Task-number: QTBUG-126659
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I4262a5d6c6575d3673d11f0c7de2e16bb10348b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-23 19:07:41 +00:00
Marc Mutz c22c344f2f QTemporaryFile: add renameOverwrite()
... as public API for QTemporaryFileEngine::renameOverwrite().

This operation (to atomically rename a temp file to the final file) is
a building block in various safe I/O patterns and QTemporaryFile
should therefore have public API for it, not just a private one.

Adding similar functionality to QFile is orthogonal to this change, and
a lot more elaborate, since its rename() already overwrites, always,
even if non-atomic.

QTemporaryFile, OTOH, already guarantees atomicity. But its rename()
never overwrites (except when it does (QTBUG-132646)). So it's the
natural place to add this functionality, and helps write platform-
independent code in the face of QTBUG-132646.

[ChangeLog][QtCore][QTemporaryFile] Added renameOverwrite().

Fixes: QTBUG-132617
Fixes: QTBUG-132646
Task-number: QTBUG-132646
Task-number: QTBUG-2082
Change-Id: I405f554335005ec8c6f1762385a19ed3fac51217
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-23 21:07:20 +02:00
Alexandru Croitor 0d2775af92 CMake: Teach RunCMake tests to respect QT_CMAKE_SKIP_BUILD_TESTS
See bc5b7e218f for original logic.

We create a wrapper cmake file that checks the skip logic and
includes the original RunCMakeTest.cmake if the logic allows it.

We pass the wrapper script to add_RunCMake_test via an outer-scope
variable.

Pick-to: 6.8 6.9 6.10
Change-Id: Ia85e8d5d6e23250f8138156fe8ec070485f390f7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-23 19:25:21 +02:00
Morteza Jamshidi 2c6167942a CMake: Add optional propagation argument to qt_add_win_app_sdk
This propagation is used for including header files and linking to
the Windows App SDK library.

Pick-to: 6.10
Task-number: QTBUG-124800
Change-Id: Ib5132de3bd673a57f55dda92381315070b6ecb99
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-23 19:25:21 +02:00
Marc Mutz d022503606 QMovie: port to two-stage Private construction
... ie. init().

This helps share common code between the different constructors in
order to change the way the timer is allocated in a follow-up patch.

Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-131448
Change-Id: Ie31ccdcab77ac615872836ea743d3c184a59a16a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-23 16:24:04 +00:00
Marc Mutz 161129474d QMovie: replace manual memory management with unique_ptr
QMovie owns the QImageReader, so hold it in a unique_ptr instead of a
raw one.

Be extra careful and, at least for the cherry-picks, don't change the
point of deletion of the object.

Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-131448
Change-Id: Ib2811d78e824055f30b71b36be16d9e5d0bffc72
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-23 16:24:04 +00:00
Frédéric Lefebvre d90dfe0560 Fix flaky tst_QWidget::synthMouseDoubleClick on Opensuse
tst_QWidget::synthMouseDoubleClick is flaky on Opensuse. The touchEvent
is not received when the test fails. The window's
position/framePosition taken is the un-updated one as it is offset
by the frame height.

Verify that the window's position/framePosition have been updated
before sending the touchEvent.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I32ccea55131d32f21288cfa64dbabf43deb8a8d3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-07-23 15:36:09 +00:00
Kai Köhne 98ff325a75 Doc: Fix links to deprecated QSV::mid()
mid() got deprecated already in Qt 6.0 . Use sliced() instead.

This also fixes warnings like

     qt5/qtbase/src/corelib/text/qstringview.cpp:730: (qdoc) warning: Can't link to 'mid()'
     qt5/qtbase/src/corelib/text/qstringview.cpp:705: (qdoc) warning: Can't link to 'mid()'
     qt5/qtbase/src/corelib/text/qstringview.cpp:718: (qdoc) warning: Can't link to 'mid()'

Pick-to: 6.5 6.8 6.9 6.10
Change-Id: I5fced4082195aacc2c3e54ab6ca4419e7aeec180
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-07-23 15:31:34 +02:00
Kai Köhne af14783f89 Doc: Update list of image formats in QPixmap
Update the list based on  QImageReader::supportedImageFormats(),
QImageWriter::supportedImageFormats() output, and sort alphabetically.

Also mention that further formats are supported if Qt Image Formats
module is available.

Pick-to: 6.10 6.9
Change-Id: I52635bcf6c98533252f051a72800af1488f6e0c5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2025-07-23 15:31:34 +02:00
Méven Car 54132e5318 src/gui: bump dependency version of xkbcommon
From 0.5.0 (October 2014) to 0.9.0 (Octobre 2019, used in RedHat 8).

[ChangeLog] xkbcommon minimal required version now is 0.9.0.

Change-Id: I9e2afc745c33e67f995da6913f1ed9486a496f5c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-07-23 07:19:40 +00:00
Marc Mutz bd045eea21 QAnyStringView: separate version from feature (new macro)
Add a macro, QT_ANYSTRINGVIEW_TAG_IN_LOWER_BITS, to explain what the
QT_VERSION check is all about, and for possible reuse elsewhere.

Since it's properly namespaced, don't undef it again at the end of the
header. While I don't plan to use it outside this header, I do note that
several inline implementations exist in various other headers, so it
would probably be surprising if the define was invisible outside this
header.

Amends 8be744df8a.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I73599b84740f63e17ac58c58c661fb35e6d72435
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-22 21:06:55 +00:00
Marc Mutz 5a253dff5e QLocale: fix a comment about AlphaCode
Since 3dcd6b7ec9, the class can only
store up to three (alphabetical) characters, not four arbitrary
ones.

Fix the comment that still claimed four.

Pick-to: 6.10 6.9 6.8
Change-Id: Ibcef6fa5ddb78a347f6df1e9ea1eea5a93a02b0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-22 22:47:39 +02:00
Alex Bu 22c93d2875 tst_qxmlstream: Fix return type error
Add Q_UNREACHABLE_RETURN macro to fix return type compile error.

Fixes: QTBUG-138585
Pick-to: 6.9 6.10
Change-Id: I7dd1199781529c9957b37ab0ee8fc9dda8c12799
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-07-22 22:39:08 +03:00
Dominik Holland d007d15a41 RHI: Don't crash when no graphics pipeline is set
Pick-to: 6.8 6.9 6.10
Change-Id: I63bd458a2ddb89cb6c443c0cb519925d9e046984
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2025-07-22 21:39:08 +02:00
Alexandru Croitor da9ff5d559 CMake: Extract the propagation of the Qt6_DIR of RunCMake tests
Instead of passing the Qt6_DIR variable to the RunCMake tests one by
one, we can now pass them in the wrapper qt_internal_add_RunCMake_test
function.

Pick-to: 6.8 6.9 6.10
Change-Id: I5f48e185a28a866763152e2ffeb7b8663aec7772
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-22 21:39:08 +02:00
Cristian Le ed667629a7 CMake: Add a small wrapper for RunCMake functions
This allows us to decouple some of the Qt specific setup from the
upstream files, reducing the maintenance burden when updating
the upstream CMake files.

Repos that haven't been ported to the new
qt_internal_add_RunCMake_test and include(QtRunCMake) will continue
to work using the old QtRunCMakeTestHelpers and RunCMake files.

Pick-to: 6.8 6.9 6.10
Change-Id: I4c3cfb7179b8cb34e5e55b380fd27733c582d0dd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-22 21:39:08 +02:00