Commit Graph

71663 Commits

Author SHA1 Message Date
Konsta Alajärvi fd15b2178a Unblacklist tst_qrhi renderToTextureSampleWithSeparateTextureAndSampler
Unblacklist test function by skipping it with Android with Vulkan.

Fixes: QTQAINFRA-6335
Pick-to: 6.8
Change-Id: I2ee093542f09f68044baa044b697a09af066fcd8
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Lauri Pohjanheimo <lauri.pohjanheimo@qt.io>
(cherry picked from commit 83a4128ecb)
2025-02-19 10:35:44 +00:00
Axel Spoerl 4c1aef25ce Correct childNumber() reference in editable tree model example
childNumber() has been renamed to row() in the code, but not in
the documentation.
Correct it.

Pick-to: 6.8 6.5
Change-Id: Ibe6f1f27c0dd1982ff663dc680738babf2db87d7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit d0cb3c0acd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:21 +00:00
Topi Reinio d83f820ab4 Doc: Ignore 'Unknown base <type> for QML type' warnings for now
These warnings are false positives when testing in the CI
when a documentation module containing the  base type is meant
to be loaded as a dependency; In the CI, the .index files for
doc dependencies are not available so we see this warning.

Ignore these warnings for now in the global documentation config.

Pick-to: 6.8
Change-Id: Ic1711bf7389e9f9d4a04e3b72b2c9f8b25539357
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 3336422289)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Alexey Edelev 09e4baf5eb Ensure <target>_copy_apk_dependencies is called for QtC build
QtC doesn't use the make_[apk|aab|aar] targets, it runs the deployment
manually. The top-level android build target for QtC is the
<target>_prepare_apk_dir target. Make it depending on
<target>_copy_apk_dependencies target, to ensure that all abi-specific
artifacts are copied before running the deployment procedure, from
either QtC or command line.

Amends 44149f9d8b

Fixes: QTBUG-133810
Fixes: QTBUG-131862
Pick-to: 6.8
Change-Id: I4f3630798658a793b0c96a99fc4644ec1dd0504b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7a6b3e1a9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Alexey Edelev af7ca1d159 Mention QT_ANDROID_MULTI_ABI_FORWARD_VARS in QT_ANDROID_BUILD_ALL_ABIS docs
Help users to navigate in docs.

Pick-to: 6.8 6.5
Task-number: QTBUG-107893
Change-Id: I95774e03ba4027dad82ba652b3f119f19b9d6760
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 4d6a2850ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Thiago Macieira 56993ad559 QThreadStorage: don't print the destruction ordering warning on app exit
This warning here was very confusing (so I'm also updating the language
to be clearer what it means). It is here to advise users of
QThreadStorage that they may have destroyed the object before all
threads using the object have finished. That means there will be memory
leaks, hence the user should fix the issue.

But the one time we don't care (too much) about memory leaks is when the
application is about to exit -- all memory is being released back to the
OS anyway. This may happen because of Static De-Initialization Order
Fiasco: the Q_GLOBAL_STATIC or equivalents holding QThreadStorage were
destroyed before the QThreadData for the exit()ing thread did. That
problem became more prevalent after the series of changes ending in
commit 2f69a05bd0, because that made the
QThreadData clean up happen very late in the execution.

Unfortunately, there's no way for us to know when we're being called
during application exit, so this is the next best thing:
QCoreApplication::instance() does not exist. We're using a private
function in QCoreApplication because in Qt 6.x, QCoreApplication::self
is not atomic and reading it would be a data race.

The QThread::currentThread() call was superfluous, because it was always
true. It was a relic from Qt 3, from before we had QAdoptedThread.

Pick-to: 6.8
Fixes: QTBUG-133500
Change-Id: I48d84d76f2b72483ed92fffdd54c6ad17e3d67d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fd857d400a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Thomas Moerschell 69f78f3cbe QScroller: Remove workaround for timer start
The CI is flakey, likely due to missing timer events. Instead of
skipping the first event, start the timer only when the new state has
been set.

Task-number: QTBUG-30133
Pick-to: 6.8
Change-Id: Ia58e4b091d8791d1b77642ded67312bc3927d0b7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c093b57c86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Ulf Hermann 5dddcc3cdc Doc: Clarify need to qt_add_standard_project_setup early
Pick-to: 6.8
Fixes: QTBUG-115050
Change-Id: If8b3aabd0072bfb2bef6dea106af06524f144990
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 8f5c6434e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:20 +00:00
Alexandru Croitor 057ef3e1d3 CMake: Add project supplier to generated source SBOM
Make sure to specify the creator organization when calling reuse to
generate the source SBOM.

This replaces
  'Creator: Organization: Anonymous'
with
  'Creator: Organization: TheQtCompany (https://qt.io)'

Pick-to: 6.8
Fixes: QTBUG-133796
Change-Id: I3532d9f35ca3eacd9c20bee7db88f35c76db9672
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 52a64aca20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:19 +00:00
Michael Cho 224fc1daaa CMake: Add support for pkg-config files on macOS
This enables generation of pkg-config files that work with Qt's
libdir-installed macOS frameworks. QtFinishPkgConfigFile.cmake
wasn't modified as POSTFIX has no impact on framework name.

Change-Id: I2da8f43608e778aa286ad625b70c5be20b447193
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 7a31e402f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:19 +00:00
David Boddie 3009ca730d doc: Fix a couple of typos that cause broken links
Pick-to: 6.8
Change-Id: I7f9aafa12d98475fc28230fcb25ba6a4570889aa
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 3c4ec4de14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 22:58:19 +00:00
Eskil Abrahamsen Blomfeldt 80b39d24ec Treat variation selectors as ignorable chars
The variation selectors only make sense in the context of the
previous glyph and should never be shaped by themselves, therefore
we should not pick a different font engine for these even if
the cmap does not support it. They are sometimes needed to
properly resolve the emojis, but the OpenType rules in the font
may not be written with them in mind.

If the cmap lookup fails for these, then Harfbuzz will map them
to a zero-width space, thus ignoring them when resolving the
OpenType rules.

We treat these the same as other control characters and just
ignore them when doing font merging.

Note: This was handled through an ad hoc mechanism prior to
the introduction of the emoji segmenter in 6.9.When the emoji
segmenter is disabled, we still use this mechanism, which
depends on us not ignoring the character in that case.

Fixes: QTBUG-133480
Change-Id: I8fa4e8d5e1aabad0946b8fd3fff044e2b2af5d0e
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit cf674f3845)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 13:53:31 +00:00
Lucie Gérard 770f9e5897 Correct doc/images licensing
Pick-to: 6.8
Change-Id: I202366f8294920fa4ac15f95a4352d5c56c1a6cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e5fab54e54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 13:12:18 +00:00
Matthias Rauter b05f06d5b9 Silence warning in tst_qwidget.cpp
Amends: 1a0f056f31

Pick-to: 6.8
Change-Id: Ib67016bbb7d5abe48224d23d49e36e2e01e416fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2c15086b7e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 13:12:18 +00:00
Giuseppe D'Angelo 7b0e3fb969 qcompare_impl.h: include what you use
Both enable_if and is_null_pointer belong to type_traits, include it.

Amends 631a0cc45c.

Pick-to: 6.8
Fixes: QTBUG-133808
Change-Id: I9626ba80b2d9799d1bfed8ca9c9090691b8d8715
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 72cde6f7dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 13:12:17 +00:00
Marc Mutz a5bafadf8e QByteArray: optimize replace(char, char)
Write every byte only once.

Amends 83c2c50554 (as well as the start
of the public history).

Pick-to: 6.8
Task-number: QTBUG-106185
Change-Id: I883b2f00c754806882131a09dc3cbc5613420151
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2753924fcb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 10:15:24 +00:00
Christian Ehrlicher 0d36941a78 Windows11Style: don't modify palette for buttons in polish()
There is no need to screw up the palette of buttons in polish() - the
colors are not honored at all.

Pick-to: 6.8
Task-number: QTBUG-132433
Change-Id: I4df1f046690d1aa9b07fc538441d6ea50d0216ce
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 6a46395614)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 05:15:13 +00:00
Thiago Macieira 6ad615cd12 GUI: no need to unregister input device if list is destroyed
Fixes: QTBUG-133776
Pick-to: 6.8
Change-Id: If4a148e3ebf753ccd661a5ed1b321dbd7751576e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 1040728e39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-18 02:03:24 +00:00
Frédéric Lefebvre e20364d6c9 Harden tst_QWindow::framePositioningStableAfterDestroy()
StablePosition was in some cases recording a wrong position, as it was
taking the framePosition and considering it to be the widget's
position. That erroneous position was then used to place the window,
resulting in a correct position but a wrong framePosition.

Wait and check for the window.geometry() and the
window.frameGeometry() to be different. If not the frame
has not been updated, or there is no frame when there
should be one. The test will most likely fail because
of this.

Fix flakiness on Opensuse 15

Pick-to: 6.8 6.5
Change-Id: I8e05ee7769de4efc2ac55ec7afbe366f76e325db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 21ef8bed6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 17:20:25 +00:00
Cristian Le d61c784273 Use `_qt_internal_set_source_file_generated`
Migrate implementations that set `GENERATED` source property

Task-number: QTBUG-125077
Change-Id: Ia77ecf8422bf3983f7746c26e5a9994d1f6415f2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6865c21e41)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:54 +00:00
Shawn Rutledge 78dd1c5cd0 doc: Add QTextDocument::MarkdownFeature docs
Detailed docs were omitted before (and QTextMarkdownImporter::Feature is
not public) because
- "GitHub dialect" is a moving target (although we may have supported
  all known features when it was introduced). We should reserve the
  right to add to the feature set accordingly: so the numeric flags
  can be expected to change.
- the writer mostly ignores the feature flags and writes back to
  GitHub dialect; only the front matter can be omitted that way
- recognizing non-URL links seems fuzzy; md4c does it, so we allow that
  feature, but if it goes wrong it would be an md4c bug
- hex flags look strange: in fact they come from
  https://github.com/mity/md4c/blob/master/src/md4c.h#L306
  If we assume that they might change, it would be better not to
  document the numeric values in detail. But so far, md4c has never
  removed any, only added a few (and we don't yet support all the
  new ones).

Change-Id: I6552da1226bf7ad6242432c1d5d3df9ec8f61d6f
Reviewed-by: David Boddie <david.boddie@qt.io>
Reviewed-by: Tommi M. Tauriainen <tommi.m.tauriainen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 280025fc7e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:54 +00:00
Cristian Le 3ad691586e Add `_qt_internal_set_source_file_generated` function
Create a function `_qt_internal_set_source_file_generated` that sets the
source file property `GENERATED` along with Qt relevant properties:
- `SKIP_LINTING` if CMake>=3.27 and `QT_FEATURE_lint_generated_code`

Task-number: QTBUG-125077
Change-Id: I0ef5f7901f502366aaf2d020554c72e4845101b6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f654519c7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Alexandru Croitor f32dbf337d CMake: Add internal API to check if json SBOM generation deps are met
Will be used by WebEngine configure checks to check if the
dependencies are met and show an according error message if not.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I56d46fe5cf12051903d1aec893336be5ae8983a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 414b73075c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Alexandru Croitor 25840bcc32 CMake: Make sure to look up deps when converting json to tag SPDX doc
When converting a json SPDX document to a tag/value SPDX document, we
need to make sure that the python dependencies are looked up.
After they are looked up, either error out or silently return
depending on whether the operation is required or not.

By default when _qt_internal_sbom_generate_tag_value_spdx_document is
called it is required to succeed and thus requires the python
dependencies to be present. A caller can opt out using the OPTIONAL
argument.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Iccb68f900f4892a816360843dd87f9e469104bf7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8b6b17ae87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Alexandru Croitor 4ae0667e2b CMake: Improve error reporting about missing SBOM dependencies
Improve wording when python or some dependency is missing, deduplicate
the strings and make sure to mention what is actually missing.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I26af38f0330a5462c6001cae03c46284e742fbda
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ad82afb054)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Alexandru Croitor 71130a16f8 CMake: Work around upstream AUTOGEN issue with discarded dependencies
Upstream CMake has a nasty bug where AUTOGEN dependencies are
discarded if a library is added as a dependency more than once (or
rather the number of times it is added is not equal to the number of
configured build configs).

This can result in racy build failures, where a <module>_autogen
target is supposed to depend on some <other_module>_sync_headers
target, but doesn't, and thus moc generates empty metatypes files
because it can't find a synced header.

To avoid the AUTOGEN dependencies from being discarded, manually
add all dependencies passed to qt_internal_extend_target to the
AUTOGEN_TARGET_DEPENDS property.

The issue is fixed in CMake 4.0, so the workaround is gated on the
cmake version used. Add a flag called
QT_NO_AUTOGEN_DISCARDED_DEPENDENCIES_WORKAROUND to disable the
workaround, in case the fix gets reverted upstream.

Pick-to: 6.8 6.5
Fixes: QTBUG-133725
Change-Id: I857d7e774fc9f9f5203a58311daea5e7177e0d67
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit fcb2058631)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Alexandru Croitor ac0e10db65 CMake: Always save SBOM python interpreter path
To ensure that when we find the interpreter, but not some python
dependency, we actually show the error about the dependency.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Ib4f42e04f071f800d0f5bbe3700a1208e1017a19
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 46ee11a426)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Giuseppe D'Angelo 0730c7ea55 Update PCRE2 to 10.45
New upstream version.

Importing note: 10.45 is missing a licence file for the sljit
dependency. This is tracked upstream at

https://github.com/PCRE2Project/pcre2/issues/686

so it may get fixed in 10.46 (in which case the import script /
qt_attribution.json may need to be amended).

[ChangeLog][Third-Party Code] PCRE2 was updated to version 10.45.

Pick-to: 6.8 6.5
Change-Id: Ifa0430782bed8ffb1c26f44ca6eb06cd26aaa1f9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 3cb58b053c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 16:13:53 +00:00
Marc Mutz a639174daa qhighdpiscaling: de-pessimize qEnvironmentVariableOptional*() functions
Don't call qEnvironmentVariableIsSet(), since it locks the environment
mutex. Since qgetenv() and qEnvironmentVariable() both report whether
the value was set (returning non-isNull()), we can avoid the extra
mutex lock (and envvar lookup) by just calling those and then checking
for isNull().

In qEnvironmentVariableOptionalReal(), in addition, use qgetenv()
instead of qEnvironmentVariable(). While on Windows, that may convert
encoding, QString::toDouble() first converts to Latin-1, and only then
converts to double, so we avoid one encoding conversion, even on
Windows; on Unix we avoid two.

Amends 4d1f13f354.

Pick-to: 6.8 6.5
Change-Id: I6803e2277b324c2568726765245681bcbf517362
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 8669bc97ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 12:56:12 +00:00
Alexei Cazacov 03fc43b5e9 Docs: Move qmake-specific documentation out of Qt's documentation
This commit moves the third-party-libraries.html topic to the qmake
documentation. The topic is renamed and links to it are corrected.

See also: 623150

Task-number: QTBUG-132504
Change-Id: I711400d887b7e4894021b0433eb1cd61dfdd5349
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 1e7e0b0cac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-17 09:43:40 +00:00
Giuseppe D'Angelo 5adddf6cd9 QMenu: make mousePopupPos a QPointF
QMenuPrivate::mousePopupPos is a QPoint which gets set to
QGuiApplicationPrivate::lastCursorPosition, and only read from
QMenuPrivate::hasMouseMoved to determine if the mouse has moved enough.

When the last mouse position is not known, lastCursorPosition.toPoint()
returns {INT_MAX,INT_MAX} (see c5792dcfd6
for the reasoning). This is extremely prone to overflows. In fact, one
was happening into QMenuPrivate::hasMouseMoved:

  (mousePopupPos - globalPos).manhattanLength()

On the first mouse move the subtraction yields an enormous result which
overflows manhattanLength.

The solution is simple, make mousePopupPos so that these calculations
happen in fp coordinates. The length itself is only used as a threshold
against QApplication::startDragDistance, so its representation doesn't
actually matter.

Pick-to: 6.8
Change-Id: I9c8e30a637de120d086d6f7171725702c205da78
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 7736823500)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-16 18:08:23 +00:00
Cristian Le ea4a6cfdfa Check the PROJECT_NAME more thoroughly
This was missed in 3e1a223318

Task-number: QTBUG-127953
Pick-to: 6.8
Change-Id: I2ff6cafe852ec2696aea37e2e79e3c8b95c0e8ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b8b6382b02)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-15 03:48:58 +00:00
Thiago Macieira c6fdf954e3 QResource: try to survive being created during application shut down
Similar to commit 12d4bf1ab5, which was
for QLocale. Like it, QResource can be used very late in the execution,
like for example the logging system. For example (simplified):

 #9  0x00007ffff759d497 in resourceMutex () at /io/qresource.cpp:188
 #10 0x00007ffff759d615 in QResourcePrivate::load (this=0x41c940, file=...) at /io/qresource.cpp:333
 #11 0x00007ffff759dc19 in QResourcePrivate::ensureInitialized (this=0x41c940) at /io/qresource.cpp:386
 #14 0x00007ffff75011a9 in QLibrarySettings::load() at /global/qlibraryinfo.cpp:80
 #22 0x00007ffff7501756 in havePaths () at /global/qlibraryinfo.cpp:149
 #23 0x00007ffff75028e3 in QLibraryInfoPrivate::paths (p=QLibraryInfo::DataPath, usageMode=QLibraryInfoPrivate::RegularUsage) at /global/qlibraryinfo.cpp:613
 #26 0x00007ffff758e4f0 in QLoggingRegistry::initializeRules () at /io/qloggingregistry.cpp:309
 #34 0x00007ffff758f007 in QLoggingRegistry::instance () at io/qloggingregistry.cpp:424
 #35 0x00007ffff758c50b in QLoggingCategory::init () at io/qloggingcategory.cpp:188
 #43 0x00007ffff758c6bb in QLoggingCategory::defaultCategory () at io/qloggingcategory.cpp:317
 #44 0x00007ffff750ff8e in qt_message_print (msgType=QtWarningMsg, context=..., message=...) at global/qlogging.cpp:2036
 #45 0x00007ffff7509515 in qt_message(msgType=QtWarningMsg, context=..., msg=...) at global/qlogging.cpp:360
 #46 0x00007ffff750a712 in QMessageLogger::warning (this=0x7fffffffd8b0, msg=...) at global/qlogging.cpp:600
 #47 0x00007ffff790e083 in QThreadStorageData::finish (p=0x41b588) at thread/qthreadstorage.cpp:160
 #50 0x00007ffff78ed423 in QThreadPrivate::finish (this=0x41b5e0) at thread/qthread_unix.cpp:404
 #51 0x00007ffff78ec8ed in destroy_current_thread_data (p=0x41b520) at thread/qthread_unix.cpp:154
 #52 0x00007ffff78ec9ec in Cleanup::~Cleanup () at thread/qthread_unix.cpp:204

Task-number: QTBUG-133206
Task-number: QTBUG-133500
Pick-to: 6.8
Change-Id: I7b653afb1b41ef3c1c9afffdaa93e6558740016b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit ba18ae3869)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-15 03:48:53 +00:00
Thiago Macieira ddd0a08490 tst_QGetPutEnv: use a lambda instead of a macro
Neater and more debuggable. This code was added in Qt 5.4, before we
could use C++11.

Pick-to: 6.8 6.5 6.2 5.15
Change-Id: Icd8acccb4a9ae1f500e7fffdc4d4fc7c310cbb89
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b888bc09ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-15 03:48:44 +00:00
Thiago Macieira ff7675817d qEnvironmentVariableIntValue: fix off-by-one with MSVC's getenv_s
This meant a string containing the octal form of INT_MIN (-020000000000)
would be just too long and getenv_s() would fail. This was never caught
because code that was meant to test different bases simply forgot to use
the base. Amends commit bb56586e32.

I've renamed the rows to be the text being parsed, so it matches the
previous rows and it makes clear what was being parsed just by reading
the test's output. That also revealed a duplicate row to be removed.

[ChangeLog][QtCore][QtEnvironment] Fixed a bug that caused
qEnvironmentVariableIntValue() to fail to parse octal values from
-020000000000 to -010000000000 with MSVC. Other compilers were not
affected.

Pick-to: 6.8 6.5
Change-Id: I9095d86cccd9e8001e85fffd6fbbcd6a9a1678c3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 83f2d1130a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-15 03:48:33 +00:00
Thiago Macieira 16b8fc51fe QCborStreamWriter: remove stale doc about 2 GB size limits
Those applied to Qt 5's int-based size types.

Pick-to: 6.8 6.5
Change-Id: Id8436bae9c641e33770bfffdd55bb1b883863a7c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e62407b429)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-15 03:48:23 +00:00
Ulf Hermann 3fd08e19d4 QLibraryInfo: Consider resource paths as absolute
This is what QDir::isRelativePath() does, for better or worse. We've
used QDir::isRelativePath() before and we shouldn't change the behavior.

Amends commit c74cba1117

Pick-to: 6.8
Change-Id: I03e3e921977af2b9c6ff2593535d846d6ce28fe2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit dd2dc8c70d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:42 +00:00
Thiago Macieira b6d2f86695 tst_QFontEngine: fix argc going out of scope
Q{Core,Gui,}Application constructors take a reference to argc.

Amends 4db368d474.

Change-Id: I0a0c9a0ba574133ac7b8fffdb80e4656267d2ed2
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 434222f635)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:41 +00:00
Thiago Macieira 5b10a1e8b4 tst_QByteArrayView: stop using std::basic_string<signed char>
That's not a valid type for the Standard's string, because the Standard
doesn't allow for std::char_traits<signed char> either.

Pick-to: 6.8
Fixes: QTBUG-133689
Change-Id: Icd0d4928fa4cdc9d806bfffd4053f0eb1073e6b4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0cc41083c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:41 +00:00
Thiago Macieira 0fef016748 QLoggingCategory: remove init() and merge with the constructor
Nothing else calls it.

Drive-by initialize the two pointers via NSDMI.

Pick-to: 6.8
Change-Id: I8c51cf5126aeb8bd6254fffdd21a37526329bbf3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c7ec043e46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:40 +00:00
Thiago Macieira edb8d08e46 QDesktopServices: don't use openDocument if the URL has a query
[ChangeLog][QtGui][QDesktopServices] Fixed a bug that caused
QDesktopServices::openUrl() to discard a query when opening a local file
URL that contained a query but no fragment.

Pick-to: 6.8
Fixes: QTBUG-133663
Change-Id: Ie8fa190036417f590540fffdcf03e53f3c99b38f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit aad0ab897f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:40 +00:00
Thiago Macieira b80f632f28 QStringConverter: mark QStringConverterBase as removed in Qt 7
It's an internal class containing the common content between
QStringConverter and QTextCodec (Qt5CoreCompat) so the latter didn't get
the new API from the former.

This allows us to remove the QStringConverter::Flags qdoc hack too.

Change-Id: Iacf32fb88e3c3d0ea369fffd153356cec308e3dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c2fa41a081)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:39 +00:00
Mårten Nordheim 9a634a5c4b QByteArray(View)::lastIndexOf: Guard against needle > haystack
Otherwise we would traverse beyond bounds.

We calculate the delta in sizes between the haystack and the needle and
if this delta is smaller than the starting position
(the `from` argument) then we start from there.

The default value for `from` is size(). With the needle being longer
than the haystack, the delta is negative and we set our starting
position to be the delta, i.e. we start before the start of the
haystack.

[ChangeLog][QtCore][QByteArray/QByteArrayView] Fixed a bug in
lastIndexOf() that could lead to out-of-bounds access when the needle
is longer than the haystack.

Pick-to: 6.8 6.5 6.2 5.15
Change-Id: Id5cd772f00b0c3c50fbf61b4e888bba5587391ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d25e5e2cb7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:39 +00:00
Mårten Nordheim 6dbb95e69c QNetworkInfo: Document threading restriction
Specifically on Windows we use COM, which requires being
de-initialized in the same thread as it was initialized.
Given that QNetworkInfo is a GLOBAL_STATIC with a qAddPostCondition
(iirc APPLICATION_STATIC was not yet implemented at the time) to
delete the backend when qApp is destructed, we need to cope with
destruction happening on the main thread.
If the backend is loaded on a secondary thread, the thread may
have shut down, or we may not otherwise be able to rely on
emitting Queued emissions to perform the destruction.
Conversely we also can't trivially move the construction to the
application thread (eg. using BlockingQueued emission during first load)
because we may cause a deadlock.

This leaves us with just documenting where the first load should happen.

Fixes: QTBUG-133644
Pick-to: 6.8 6.5
Change-Id: I7f52e884151c6c24acc34f1112faabc897d9b0f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6ad2918de4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:39 +00:00
David Boddie 25107519e5 doc: Add missing fromArray() documentation
QAnyStringView::fromArray() was not documented, leading to a broken
auto-link that referred to it.

Pick-to: 6.8
Change-Id: Ibf3704da8b3f16e56589bd649ce1e63a7cbd3739
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f9334be98e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:38 +00:00
David Boddie 8014b45a7a doc: Change links from begin() and end() to constBegin() and constEnd()
It appears that there are no longer relevant begin() and end() functions
to link to. constBegin() and constEnd() are the relevant alternatives.

Pick-to: 6.8
Change-Id: If6fc421ee08364de9a879fb704a7989046b9b43a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c8e59d682c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 20:54:38 +00:00
Laszlo Agocs 80dee1a9f9 rhi: vulkan: Don't assert in VMA when vk header is older than runtime
Building Qt with e.g. a version 1.2.x Vulkan SDK and then running
on an implementation providing 1.3 or 1.4, one will likely get an
assert in debug builds upon initializing the memory allocator.

Work it around by restricting the apiVersion passed in based on the
preprocessor macros.

Pick-to: 6.8
Change-Id: Ia689ffc29d5675b84b6683e289d0725d7e47220b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit b6d4c1368d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 15:12:05 +00:00
Volker Hilsheimer afc5747e9b JNI: generate QtJniTypes forwarding header for the namespace
The documentation claims that this is where the namespace and the macro
definitions live, and it's convention to have a Qt<Namespace> header for
Qt namespaces.

Pick-to: 6.8
Change-Id: Ia49001d61f0967df84344779909860cf65c3623c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6c61d7b0f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 14:44:26 +00:00
Cristian Le cedaf89b0f Simplify genex expressions
Simplifications:
- `COMPILE_LANGUAGE` accepts comma-separated list since 3.15

Pick-to: 6.8
Change-Id: I4af316a463b5771bf5b37a6b4d77e41adba60977
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 51dc4cdd42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 11:25:09 +00:00
Rami Potinkara 7918d0699c Android: update Android 15 SDK 35 to docs
This patch updates the macros for Android
maxApiVer, AndroidMaxVer, AndroidPlatformVer,
AndroidBuildToolsVer variables to reflect
Android 15

Task-number: QTBUG-129462
Pick-to: 6.8 6.5
Change-Id: Ia6edfa7811dd8c98a0a99c10d8781aa09384bdfa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 9b475eadfc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-14 10:09:33 +00:00