Commit Graph

69699 Commits (092e8729b29ee5087bf28d843ebe52806115effc)

Author SHA1 Message Date
Alexandru Croitor 092e8729b2 CMake: Add a fake deterministic SBOM generation option
Replaces content like timestamps, version strings and checksums with
constant values to make the SBOM generation deterministic.
This is useful for reproducible builds, to allow cleaner inter-diffs
while developing new SBOM features.

Can be enabled by configuring with
-DQT_SBOM_FAKE_DETERMINISTIC_BUILD=ON

Task-number: QTBUG-122899
Change-Id: Id0003bdd23fe57abd70213a2a108885861693242
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit d2dea0bc08036925cb93c226af19aeb896926309)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit db841d4afe9b6f4baa0f93c0aa1043138e3dde49)
2025-01-25 14:21:52 +00:00
Alexandru Croitor b73f9def98 CMake: Allow skipping some parts of SBOM generation
Makes it easier to debug diffs of SBOMs, due to lower amount of
content in generated files.

Task-number: QTBUG-122899
Change-Id: I5a1e8a9868cda199de4a7344b86a12f68fec31bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 3c516ffa8739a6d8729780138f07a6bea7cfea8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 940fc15ec117588efb0d0ce903a12346bb8e9656)
2025-01-25 14:21:45 +00:00
Alexandru Croitor 7fa13bac66 CMake: Add SUPPLIER as an option to SBOM packages
Task-number: QTBUG-122899
Change-Id: I22cae71dcc7582126320e17271a8c55bea1ad393
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2857d8d5eaaddde3e3cff916d5ad4b3c93a9b760)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fe3b0212eac22fb80ec81d24b99ca9d49df2da0e)
2025-01-25 14:21:38 +00:00
Fabian Kosmale 238868c518 _qt_internal_process_resource: Properly escape XML
XML requires escaping for certain characters, and we need to consider
this when writing out qrc files (which use XML).

This commit introduces a helper function,
_qt_internal_escape_xml_characters, to take care of the escaping.
It uses regular expressions to process the input strings. We take care
to start with '&', as '&' needs to be escaped, too.

We minimize the amount of escaping we're doing (the exact rules
differing between attributes and text), to avoid unnecessary work that
needs to be done when configuring a project. This is achieved by a
SUBSET option which can be passed to _qt_internal_escape_xml_characters.

Task-number: QTBUG-131916
Change-Id: Ic1bd0eedee0343c3d70b6954842e21b3c550b092
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e4fbbdea05540723d4c4429d673d25efa3201d7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6e35353c83925d7c0d5f90db320ef9621f1ffb94)
2025-01-25 14:21:36 +00:00
Wladimir Leuschner b9206f1843 QWindows11Style: Reduce groove size of QSlider
Reduce the groove size of QSlider when using Windows11Style, so that the
minimum selectable value does appear so.

Fixes: QTBUG-133128
Change-Id: I3e5a5378e2eace3920c06db8cb1198122c0937b5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit dee731ae981eb4f41f4b00be80f75c7a0a5c0e11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6a6a1c0fe2f39f560bae4bb71eb48d9dae993231)
2025-01-25 14:21:34 +00:00
Alexandru Croitor 8e7eecc057 CMake: Prepend underscore to qt_internal_sbom_set_default_option_value
Because it's in a Public cmake file.

Task-number: QTBUG-122899
Change-Id: If3f92af848193cb824b88e93e17965ffed93cf2b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4be604c55e3cf493f883a7df484940c9a1244a97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 477972b3e01a5879502aac97a7973ec261c42616)
2025-01-25 14:21:32 +00:00
David Redondo ca04f4fedf QOpenGlContext: Always unset current context in doneCurrent()
Otherwise when no other context is made current until thread exit, the
QGuiGLThreadContext destructor will try to call doneCurrent() on an
already deleted context.

Change-Id: If55dd69a72b8ab4012780a449f6a02729dd0ed43
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit cd1686e55f706048286cbc962bbe02032c2396cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 10c195b86432eaa430c6991c0fcb74c411407cdf)
2025-01-25 14:21:31 +00:00
Andreas Eliasson 952020ba66 Doc: Fix method docs for QOpenGLTexture::setWrapMode
The current method description seems like a copy-paste left-over.

Fixes: QTBUG-57209
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ife9f9f7bc97d990f5d447208bd39c2d2b6a614fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 9182f60b455cead33c0f4fd4e452b210e2de0fca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 83cd96307fd7a28157d47cefa042a2fc63a0d259)
2025-01-25 14:21:29 +00:00
Marc Mutz 51abd703d6 tst_QUuid: fix -Wreturn-type in make_minimal(QUuid::Version)
The code relies on -Wswitch, but lacked the Q_UNREACHABLE_RETURN() at
the end that compiler and code readers need to understand that we don't
accept values other than those enumerated, even though an enum variable
could hold other values, too.

Since the function is constexpr, can't use that macro directly, but
need to copy the usual GCC 8 magic incantation.

Amends 171ff57be1b8fd1c1b33cffbffa389790f239b5c.

Change-Id: I6c9dd0e4178211f57da61aa6df70f8036370f158
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 420ca3463ee8adf2d986af5802d8da4bb24ce14d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 760688cc754f7f84c10596345e488055ed511cfc)
2025-01-25 14:21:25 +00:00
Timur Pocheptsov 931f45a6f1 QTestLib: Add helper function to check for keychain access issues
To be used in network-related tests where we potentially are
using private/public keys and (on macOS) end-up with keychain
access blocking a test with dialogs requesting a permission
to access the keychain.

Task-number: QTBUG-132645
Change-Id: Ide74633bf88b0453d5d8f8de56282c8cf8207380
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 13109ba350686cd8ce8e298db5d76d0e7c209bd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2d819c70272607e465a2478ab68592ea77c320f3)
2025-01-25 14:21:22 +00:00
Cristian Le 48d03f7344 Make user tools symlinks relative
Fixes: QTBUG-132724
Change-Id: I0f1d95ef6b66c81e2d12730eae3d5c0452a3a7a1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a4df2ac243d54f36ad1c1b406803e6caa1be294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d45687f4999f6ca6a7449b0124348c74588819c2)
2025-01-24 14:42:16 +00:00
Cristian Le 4b6fb23425 Export `INSTALL_PUBLICBINDIR` to `QtBuildInternalsExtra.cmake`
`INSTALL_PUBLICBINDIR` is only exported if it was defined by the user
when building QtBase. The conditional check aligns with the one used in
`qt_internal_generate_user_facing_tools_info`

Fixes: QTBUG-107016
Change-Id: Id5c38555e1d22cb3c16d85261cb052c695b4de03
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a9964422360c637c7a46f85628a580448bb13bc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9db4c36a2f9049b0e1a248af1c03e6246c232876)
2025-01-24 14:42:16 +00:00
Cristian Le 555d94cda0 Use `_qt_internal_relative_path`
Change-Id: I1c4248bbf7e06536503224cbfceb57f41de019bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1192f2c87778c90530553cc62e763afaa0b6456e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 430779a28767cfd4429864b17a3fb9933c016490)
2025-01-24 14:42:16 +00:00
Cristian Le d002fa52e2 Add `_qt_internal_relative_path`
This is a compatibility function for `cmake_path(RELATIVE_PATH)`.
For CMake<3.20 it uses `file(RELATIVE_PATH)` instead

Change-Id: Ibf9ca221c1753bd99dcc1820bffaea28f9bfe5af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 334acc2eb3ec0cba702780036c94abdac306864e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 54f5a61fbc01ac6b176a3811294aea1aa32ecdba)
2025-01-24 15:42:15 +01:00
Liang Qi 12ebf4a046 QGenericUnixServices: avoid to call virtual function in constructor
This amends 1969b1a90a79dad049694bd1540f8627d5f26875 .

Pick-to: 6.5
Change-Id: I1be4e229d531f8a91e1ad3133a5b62784d18bb41
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 225f8e069b8fabff849f2167acd2d9e4b7b94788)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9cb8a156fd7a6067c30799e5b2915f4e8bb963d0)
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-01-24 12:42:00 +01:00
Mate Barany 7bb97b13c5 Update CLDR to v46.1
[ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to
v46.1.

Task-number: QTBUG-132851
Change-Id: Id08d9337e11234d0ca428c7e435808be1b044f7c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 918566aeddbbf56f8539c44bcd45223d2fbab996)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit eac8f36080881f7b8f41a0e1ed811da6e9f08a2c)
2025-01-24 11:41:40 +00:00
Felix Lionardo d810e4844d Add libfsnotify to the core library for QNX 8
QNX 8 moved the inotify API implementation to a separate library,
libfsnotify. Added qt_config_compile_test to verify inotify in libfsnotify

Change-Id: I5906d8fd0f146dc9db8d9ae2d8c0053bff21b840
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2dfbfd5f9a800f40afd2a4e48a208a9f781fb0ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a50b3916a2467c7ef4a881ddf07c713d3ec7eb66)
2025-01-24 08:05:58 +00:00
Marc Mutz 2e98d8d1db QTemporaryFile: add private API for an overwriting rename()
In many situations, it is desireable that QTemporaryFile::rename()
overwrites an existing file, such as when emulating QSaveFile because
one would like more control over the temp file (such as passing it to
a different process). The public API of QTemporaryFile did not allow
it, making the typical Unix mktemp + mv algorithm to avoid symlink
attacks unimplementable with public Qt API.

QSaveFile is not a 100% replacement, because it always follows
symlinks and places the temporary file beside the physical target
file, keeping the symlink intact, instead of placing the tmp file
beside the symlink and clobbering it, if the target happens to be one.

Extract Method QTemporaryFilePrivate::rename() and add a bool
overwrite parameter that causes the existing
QTemporaryFileEngine::renameOverwrite() to be called in lieu of
QTemporaryFileEngine::rename(). The non-atomic path via
QFile::rename() is not affected.

This makes the functionality available as private API, in case we need
it in older branches.

Task-number: QTBUG-132646
Pick-to: 6.5 5.15
Change-Id: I0d5ca96c0a1a557854582e1a565a3db0d8af2a95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a01b14f1de59d378088a949bb21f3536832634c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1ec2f5df26d843bd431b1d202382d626dfac3184)
2025-01-24 08:05:57 +00:00
Alexandru Croitor e79d6db33b CMake: Add an option to pass --showinternal to qdoc
This adds an SHOW_INTERNAL option to qt_internal_add_docs that
passes the --showinternal option to qdoc.

The option can also be set for all calls by setting either the CMake
variable QT_QDOC_SHOW_INTERNAL or the environment variable.

Fixes: QTBUG-118176
Change-Id: If72c4072e10bc5f12b0431a5f8abea6ee1e2bd69
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0b7ff3d0a7be7b8df6184cde5ca33bb681790131)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3f5df82334b89102902051726e761180a1a72fec)
2025-01-23 23:04:39 +00:00
Alexandru Croitor 146f0ef932 CMake: Add various option to pass extra args to qdoc execution
Calls to qt_internal_add_docs now accept the following options:
- QDOC_EXTRA_ARGS: Extra arguments to pass to qdoc
- QDOC_PREPARE_EXTRA_ARGS: Extra arguments to pass to qdoc prepare
  phase
- QDOC_GENERATE_EXTRA_ARGS: Extra arguments to pass to qdoc generate
  phase

In addition, the following cmake and environment variables can be set
to pass extra arguments to qdoc for all targets:
- QT_QDOC_EXTRA_ARGS
- QT_QDOC_PREPARE_EXTRA_ARGS
- QT_QDOC_GENERATE_EXTRA_ARGS

The cmake variables can also be set at directory-scope, before the
call to qt_internal_add_docs.

Task-number: QTBUG-118176
Change-Id: I0e28f3b863d5ca4efd0256432130af1c9c965f9d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 948b2f601dd9c7f526497680c5c4928d2793c238)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 98d5581e1684cfcb499600e81e04a7c6fe6685c8)
2025-01-23 23:04:33 +00:00
Alexandru Croitor 9ba8ebafaf CMake: Clean up and document qt_internal_add_docs
Change the option handling code to be similar to our other internal
functions.
Break too long lines.
Add a doc comment.
Add a message(DEBUG) for the case when qt_internal_add_docs is still
called with one argument.
Rename doc_project variable to qdoc_conf_path.

Task-number: QTBUG-118176
Change-Id: I73167f1e72e2abcdb90722ecd6ee00f7636b8a5d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2fd16b2acb726e597479bb30f42363075e3de56b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a764da6902ad9dd251dbe275cd409682172496fb)
2025-01-23 23:04:26 +00:00
Christian Ehrlicher 02b165f1fa QAbstractFileIconEngine: store pixmaps with correct key
QAbstractFileIconEngine stores the generated pixmap in a QPixmapCache
with the size as key. This is wrong as the size is multiplied by the
current devicePixelRatio so this has to be done also for the key.

Change-Id: I6d8ceedc950d23abf9c4d79d92e86848b9508c9b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 83ff179f85559af880d28d7832d44f95c5ce9616)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit da4e9b7637f3ac71397c91109c460ca781abbc7a)
2025-01-23 16:33:08 +00:00
Marc Mutz b086e31bbd Update public suffix list
Version 47264b57765919188b9f4144de8d95cf77e1b6dc, fetched on
2025-01-22.

[ChangeLog][Third-Party Code] Updated the public suffix list to upstream
SHA 47264b57765919188b9f4144de8d95cf77e1b6dc.

Pick-to: 6.5 6.2 5.15
Task-number: QTBUG-132851
Change-Id: Iba19f5006e8cb60505505c96a4e4649b075cae6e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 09fa335fb22122c42f057380e3d6f4d8944256d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit faf10af206c7f35f658ee18db2a90915acf43861)
2025-01-23 14:26:31 +00:00
Marc Mutz 08db6dc0ee util/update_public_suffix_list.sh: adapt to PURL addition to qt_attribution.json
Also add a comment to publicsuffix-list's entry that the update is
done by a script that should be updated whenever this file's contents
change.

Amends 36dca3c04f759449f74008a3e79021a179b0f35e.

Pick-to: 6.5
Change-Id: I1a0e51568e6d4300197c09f759ad3d82277a74d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b9f74f9a0b97588fc07d75fa6a427f5c8d6a2c6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 94e4f3c53214d65f6049d44064c348e95682ef8b)
2025-01-23 14:26:31 +00:00
Marc Mutz 66456f9aa0 tst_QSet: check whether remove/removeIf detach if nothing is removed
They do.

Task-number: QTBUG-132831
Pick-to: 6.5 6.2 5.15
Change-Id: Ia4e9de7e443d11af9675924718c551a06bc4b447
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit b80679a90f39106052f1b53f4073e679d5077a5f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cd99c6aad554925d31d2b73e9fe7067f565d19e5)
2025-01-23 14:26:31 +00:00
Morten Sørvig 8389f6d699 no-thread: add QThread::isMainThread() definition
In this configuration there is one thread (as far as Qt is
concerned), and that is the main thread.

Change-Id: I6817961a0f95f2e8b1bb3ea120154d954f1eaf0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 59039f42d863815556a9de05a452f8802c727582)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit f1136de66638060b8a1ab9bc0cdf1a91dcb5ec01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-01-23 14:26:31 +00:00
Jani Heikkinen 26dbd670d7 Bump version to 6.8.3
Change-Id: Ia3e12247064f4977aae2d666f742cca0b2d772ac
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-01-23 11:04:42 +00:00
Marc Mutz 7f3539202f Short live q20::exchange()!
We have weaned ourselves off of qExchange(), which, however, has C++23
semantics (is constexpr and noexcept), while we only require C++17 atm.
At the same time, we have more and more uses of a constexpr exchange(),
iow: the C++20 extension.

We have the qNN namespaces for this, so let's use it: Add
q20::exchange(), with C++20 semantics (constexpr, not noexcept), and
use it to port the only remaining qExchange() user (since ported to
2×std::move() to make the header compatible with QT_NO_QEXCHANGE),
QScopedValueRollback.

No user requires the C++23 noexcept on the function (compilers will
figure it out, because the std::exchange is fully inline), and we
can't provide a q23::exchange() even if we needed to, because the
author of P2401 forgot to ask to update the value of
__cpp_lib_exchange_function...

Conflict resolution for 6.8:
- worked around missing a313caca239638b384018aec18906de44aab2171,
  by back-porting the relevant subset of it

Fixes: QTBUG-133038
Change-Id: I003df445001d1c5ab02402119c5e5106aa156263
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b5ed7fb203335cef7b7b4f70f4130b07166cecf2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cebb2dd0681f7e4f8a838730a2b15e0c7384c711)
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-01-23 05:26:27 +00:00
Edward Welbourne eff8f1c050 QtTest: Update valgrind (fatuously) to v3.24.0
Nothing has changed in the headers we use, aside from the version
number, since v3.23.0, so we may as well declare ourselves up to
date.

[ChangeLog][Third-Party Code][QtTest] Valgrind headers are up to date
with Valgrind v3.24.0.

Task-number: QTBUG-132871
Change-Id: Ib2ad8d73e662535a014d241b46cc50214b45f50b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 549bab4150b4652bb8b6577c737e49ae03f6348f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9ed5d93c77f335cd58ae448bd7ce8ebb2c50fa74)
2025-01-22 23:04:14 +00:00
Mitch Curtis 23cd9fc756 Make iconbrowser manual test directly openable in Creator
This avoids the need to run qt-cmake-standalone-test and then import
the test, as described in QTCREATORBUG-25389.

Change-Id: I010d6613debb2e34ef3809d2da78ca33ade4d602
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 742a0ed72f5264b0198d87df6c4e0657eaf48172)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 133838a7c72bb026a6b34c6d35390111cc5fbdcf)
2025-01-22 23:04:14 +00:00
Christian Ehrlicher f86da3d3f8 Windows11Style: don't set minimum width for QAbstractSpinBox
There is no need to set a minimum width for QAbstractSpinBox in
QWindows11Style::polish() as this might override the user preferences.
Also the minimum size handling is now properly done within
sizeFromContents().

Change-Id: Ibc1fd7a6f862fc85e3739025b9de581aa235d74c
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 2ec4c28470de115c16944653a5d4f6209452d56c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b93a8dfdfe6900cb542fdc587dd2682007a6ac53)
2025-01-22 23:04:13 +00:00
Christian Ehrlicher e43f6d7087 SQL/ODBC: escape values in connection string
The previous attempt to escape invalid characters for username/password
did not work for e.g. '}' or '{'. The msdn documentation is somewhat
inconsitent here but after testing it looks like putting the
username/password inside '{' and '}' no matter if needed or not is the
easiest way. We have to escape '}' by doubling it though.
No need to escape the DSN - testing on windows revealed that ';' is not
allowed in there and '\'' and '"' at the start of the DSN is perfectly
fine without any escaping.

Fixes: QTBUG-122642
Change-Id: I04d007d343dd65eb0dbc0252518843eb43cd9ab8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 38277a88f1dd69de6e031bc8313c8d5beadf6bd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d10cba961bb0782b21442f479821ce201577e842)
2025-01-22 23:04:13 +00:00
Tuomas Vaarala 2434b2df0c Remove quotation marks from objcopy call parameter for QNX
If the objcopy call parameter is in quotations marks it fails the call
and prevents separate debug info builds for QNX.

Fixes: QTBUG-132801
Change-Id: Ifadf57f80eb5c354aedeb8985bc7a0c9b79dc62e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9261b68395df75dbb01539c547832d9cc35521d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0d4c3c852abb77da83b1b096cf9f5352f9bb0eca)
2025-01-22 23:04:13 +00:00
Jøger Hansegård 599301270f Compare QUniqueHandles using comparesEqual and compareThreeWay
This fixes an issue where comparing pointers to object is only defined
if both pointers point into the same array.

Task-number: QTBUG-132507
Change-Id: Ib7ccb30001add38ad25b62c848a01cd53566d8bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5dcdeeebbc08be8845cdb5a0e586b7a864b7f16f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 99d401220c3b200e76f00cb7457a5a3935379572)
2025-01-22 19:31:26 +00:00
Cristian Le a05d4402c1 Fixup: Add `*_check` build targets for auto cmake tests
- `PARSE_ARGV` should have been 1.
- `module_includes` target needs to be unique
  See gerrit comment of previous change, and
https://gitlab.kitware.com/cmake/cmake/-/issues/26580

Amends: 8f2f4ad4688df4963982c489c80b84e115cda29d

Task-number: QTBUG-98640
Change-Id: I82b85813f282ba1d5b4c938e59558e32647d4d86
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9f805b5bf7dc61a032a7ec79fd514c932103f1de)
(cherry picked from commit 1ae6883162351f7e6b983b2acf7886cce01ee153)
2025-01-22 16:12:35 +01:00
Cristian Le 55a1ef3ee3 Add `*_check` build targets for auto cmake tests
Similar `*_check` targets are created in `qt_internal_add_test`.
This change extends that implementation to auto cmake tests.

Note: These generated targets do not have additional dependencies, on
the build targets, unlike those generated by `qt_internal_add_test`.
You would need to (re-)run the build first separately and then run the
`*_check` target.

Fixes: QTBUG-98640
Change-Id: I387f09570b6a4a345756133870c2eb9ef1cf3cf8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 8f2f4ad4688df4963982c489c80b84e115cda29d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 566db56dd3c3d1ed6697f2774054533aa2329d91)
2025-01-22 16:12:32 +01:00
Edward Welbourne 2457a59435 Add a QDuplicateTracker<T>::contains()
When even some values I haven't seen may need to be left for later,
but values I have seen are definitely to be discarded, I need to know
if I've already processed them before doing the fiddly check for
whether to defer; but if I decide to defer, I haven't yet processed
and need the later check, to which I've deferred, to see the value as
still new, even though I did once ask about it before. So I need a way
to query without adding to the set.

Pick-to: 6.5
Change-Id: I712f1c400147210c149aeec6de1d15d2e095d6a9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 09b77a8d07276e0b5e5fec596f957f8fc4a78869)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 007c0a1854e0bcf6bbe6965fbc24ff1ae6a43cc5)
2025-01-22 15:08:02 +00:00
Edward Welbourne 7d8f529353 Correct description of 3rd-party CPU cycle counters
Task-number: QTBUG-132871
Change-Id: Ia0a467297393be72ff7d39b7333ad86e09057dff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a419db7160f2070de9ae52e80dcfff05304d9229)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d1f0e924e903f50c8738699ca72618666b5e0742)
2025-01-22 15:08:01 +00:00
Liang Qi 399e3df534 QGenericUnixServices: avoid dbus calls on non xdg envs
Fixes: QTBUG-130884
Pick-to: 6.5
Change-Id: I2525293f776676cda63e61c3c5093045dbafcf38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1969b1a90a79dad049694bd1540f8627d5f26875)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2a4604e59e14ab0c784ac05cb17fdfabd7b6df1d)
2025-01-22 06:05:58 +00:00
Liang Qi fc5cbf3606 qpa: lazily populate the services object except xcb
In order to optimize the footprint of QPA plugins, we avoid to
create QPlatformServices object in QPlatformIntegration constructor.
It benefits embedded platforms and others.

Task-number: QTBUG-130884
Pick-to: 6.5
Change-Id: I5c0d2616ace9fbc0e077eece32d8836b40fc83dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ff51ea5418d131248b07e327513b41dad1231f37)
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit dcac89b5c78110be635c5da843a02b89fe77ced6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-01-22 06:05:52 +00:00
Shitong Xu 49bf887980 QFileDialog: the lastVisited not loaded correctly
Url passed from the QFileDialogArgs will never be invalid, it will
always be the value that user passed into or the lastVisited or the
working directory. And because of this, the fixes code of QTBUG-70798
will never be invoked, and the `lastVisited` will never be initialize if
nativedialog is in use.

I wrote an init function to initialize the `lastVisited` global
variable, to make sure the value will be loaded correctly

Fixes: QTBUG-70798
Change-Id: Id05f63db7b4738e6317721741111882a565437e3
Reviewed-by: Xu Shitong <xushitong@uniontech.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 34f1b6b6d1dd7c37f2d71c0032ddc0c83360c11c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3b5fcd4901a65a5acf2af740990a02d4ec5dcada)
2025-01-22 06:05:47 +00:00
Eskil Abrahamsen Blomfeldt b7cd440921 Update Harfbuzz to version 10.2.0
[ChangeLog][Third-Party Code] Upgraded Harfbuzz to version
10.2.0.

Pick-to: 6.5 5.15
Fixes: QTBUG-132855
Change-Id: I542c054ccdc311b17363456c693a2057c2e496c1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 308ee2738f24d5f01fc8914f071735ad91716947)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c2e528ef425a68e3904d5989d578fc4a4dfce997)
2025-01-22 02:25:31 +00:00
Thiago Macieira 80f6295b72 QMutex: improve codegen for non-futex lockInternal()
Amends commit ff9da1db0b.

QDeadlineTimer's Forever constructor is constexpr inline, while the one
taking an integer is neither. In an LTO build, the compiler might have
realized that it's constant, but let's be sure.

Change-Id: I2c07caec660e05efe695fffd6ac8ec3120258a96
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ef73a5f175f8d51a0bacbdd30cacbd3b6d151d36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5dbe3ecde8864e7ce4cfd32b650b6684be693d69)
2025-01-22 02:25:30 +00:00
Nicholas Bennett 1cf9530a88 Docs: Add that Qt Print Support is not available on Android
Created a list and added Android to the existing mention of iOS.

Fixes: QTBUG-132742
Change-Id: I6e906980d28b54daf18c019eb9299a9d67daef3d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit afa34d5f3773dec4fb2a7d524100a6f7a307e3e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d07c24d1bac5bd466ea4cf5288612cc58483dfa7)
2025-01-22 02:25:28 +00:00
Thiago Macieira c4106f3d5e tst_QProcess: remove duplicate DisableCrashLogger variable
Amends 90bc0ad41f.

Change-Id: I3faad81a5748ed0942d4fffd93c82124fc18b751
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 08cd38078e11988530251240096b3686e26dd783)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c88a8c78bdcd8c763fb7d264af884cf91024415c)
2025-01-22 02:25:26 +00:00
Alexandru Croitor b5e21105b6 CMake: Build executables in single-config debug-and-release builds
If qtbase is configured with -debug-and-release -force-debug-info,
which maps to '-GNinja Multi-Config'
'-DCMAKE_CONFIGURATION_TYPES=RelWIthDebInfo;Debug'

and then qtopcua is configured with -GNinja -DCMAKE_BUILD_TYPE=Release
building the 'all' target would not build executables or tools.

That's because the targets have their EXCLUDE_FROM_ALL property set to
exclude any non-first multi-config, and Release doesn't match
RelWithDebInfo.

Such a scenario can happen for our multi-config windows builds, when
someone tries to build a repo not with qt-configure-module but rather
with cmake directly. They would then not specify the same build types
or generator, which can happen when opening in an IDE like Qt Creator.

Make sure to also check if the current generator is a multi-config
one, in addition to whether QT_FEATURE_debug_and_release is ON, before
adding the genex to the EXCLUDE_FROM_ALL property.

This allows building and installing executables and tools in such a
scenario, because in a single config build, the genex would not be
added, even if QT_FEATURE_debug_and_release is ON.

Fixes: QTBUG-132609
Task-number: QTBUG-132338
Change-Id: Iaee1a0afb19df97ee1263dbaf27c8e29fc127831
Reviewed-by: Jannis Völker <jannis.voelker@basyskom.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit baddc0a1958c8ea9cb946465c93ecdd62bde9d3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 858bb5df19374ccb7d6df599c6d83ccc1b9ceb64)
2025-01-22 02:25:23 +00:00
Giuseppe D'Angelo fbc7223df7 QEasingCurve: fix (de)serialization in QDataStream
The serialization code did stream out a function pointer as an integer,
and then tried to set it back -- effectively, it has *never* worked
since the beginning of public history, unless
serialization/deserialization were done within the same process.

While we cannot support streaming custom easing functions, we can
recover the non-custom functions from the type, which was also streamed
out; setType will take care of that, and we'll just ignore the
subsequent field in the stream.

If one tries to stream out a QEasingCurve with a custom curve, what do
we do? I've decided to just print a warning and stream _something_ out,
so I can keep some degree of behavioral compatibility and aggressively
cherrypick this patch.
AFAIK, there's no support for such a scenario in QDataStream: all
out-stream operators have a wide contract, and there's no Status flag
that meaningfully represents this case (and I doubt anyone checks QDS'
status while writing into it).

Change-Id: Ifa80cf3a9003cab074ddf112022c09b364497007
Fixes: QTBUG-132575
Pick-to: 6.5 6.2 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 78a46bf16b7061bfd77b7b3bcf392c28ee788bfc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b223437124b9acac005b86074eba39620f96574e)
2025-01-22 02:25:21 +00:00
Friedemann Kleint 884146fdc6 Standard dialogs example: Fix compilation with QT_NO_CAST_FROM_ASCII
Add missing tr(), use literals.

Change-Id: I35387e29ce1b08f9df0ade5ee743b33561639f7a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 3e1707d43068d43b078a2e626a0c46ff78da997b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 84ad5064208bf301ecce5bdbd33a6a9e0cb61d84)
2025-01-21 16:57:48 +00:00
Friedemann Kleint 5b3d11aa87 Standard dialogs example: Fix some clang-tidy warnings
- Use auto * when initializing with new
- Initialize variables
- Fix static invocations
- Use per-class includes
- Minor cleanups

Change-Id: I137bc7dfad63bc55a1b1bbc3f42d758bbfdb86ba
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit f388ca8841ad25cf79e5fdf8fa3e9d2f4de48ebc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 82e7d1e56e29c38f24e785148697726bafcfa35a)
2025-01-21 16:57:46 +00:00
Alexandru Croitor b35ee06bc0 CMake: Use a unique resource identifier in simpletreemodel example
To avoid the following error:

 The custom command generating
    .rcc/qrc_editabletreemodel.cpp
  is attached to multiple targets:
    editabletreemodel
    editabletreemodel_tester
  but none of these is a common dependency of the other(s).  This is
  not allowed by the Xcode "new build system".

Fixes: QTBUG-131631
Change-Id: I1c5d0702596a4f8f723d9080bc5304d6ad06853b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9f593791988da197dbe956669b8a4647dc50124a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b51ee7068c5b41d8dae8bb9105167f3347e2d134)
2025-01-21 10:45:05 +00:00