Commit Graph

69368 Commits (14bd53687faaa5ff26774be2bc19eb0270c0853a)

Author SHA1 Message Date
Giuseppe D'Angelo 14bd53687f QPdf: fix generation of the document information dictionary
The dictionary was accidentally not closed by `>>` due to a typo,
which made the PDF invalid.

Change-Id: Ibb8ab05cf291070d48aa067d550b5696f636e47c
Pick-to: 6.5
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 6a5e2c6f9b0418f9bb8f0ac1abe39ec157c381f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 23:16:15 +00:00
Vladimir Belyavsky 497cc1deb8 QCocoaFileDialogHelper: protect more against dangling pointers
This is in addition to 10b5b4cbba,
where we made m_helper QPointer to make sure it was still valid
before accessing it. There is one more place in completionHandler
where we need the same check.

Fixes: QTBUG-131880
Pick-to: 6.5
Change-Id: Id51d2c68db23b897b145ad25dd1c73b3f5eb9cc1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a794f957c4c17fbcb12a4b78f58240d109c150d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 18:55:59 +00:00
Marc Mutz fad01d6a04 [docs] Add missing qHash(Enum) documentation
Amends fb4bc5fa26.

Pick-to: 6.5
Change-Id: I1097b8313806c5f9272bcbfced21e66036e45763
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 55a6c77d77dab4d877e1c4bb9d9b828b005604eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 18:55:59 +00:00
Marc Mutz cc138604d6 Create qdoc macros for C++ class docs 2.1: qHash()
Add a family of qdoc macros to document the various qHash() overloads
we have.

This patch does not change the \relates of the qHash() functions, they
remain as inconsistent as they have been. Created QTBUG-129815 to
clean things up. Since this author expects the \relates to change in
the future, there are different \qhash commands, and all except
\qhashbuiltin take the class name as an argument, for use in a
centrally-choreographed fix for QTBUG-129815.

As drive-by's, fix:
- missing documentation about Key having to support qHash() in the
  associative Qt containers
- drop noexcept and default arguments from \fn lines that needed to
  have their argument names changed
- move the QStringView overload from qhash.cpp to qstringview.cpp
  (as it \relates to the former)

Fixes: QTBUG-129574
Pick-to: 6.5
Change-Id: I8e8c2edc27422cbe5823f56baf3a24d7f7050836
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit 906aa1533f2267b091615d21c2d31e1742f0a520)
2024-12-04 18:55:58 +00:00
Assam Boudjelthia a0897816f8 Android: fix tst_android::testFullScreenDimensions()
The test was reporting wrong app size values and then
expecting a wrong height after subtracting the system
bar heights. This was happening because an older API
was still being used, using newer APIs fixes that.

Fixes: QTBUG-131338
Pick-to: 6.5
Change-Id: I7306ce62d9c683f84069cc19086a6cd28abf5441
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 50603fddc535179ee02379a8807fe5cb104e0aae)
2024-12-04 15:34:32 +00:00
Assam Boudjelthia 8e2209f3b0 Android: refactor tst_Android::testFullScreenDimensions()
Pick-to: 6.5
Change-Id: Iea06638d1c8eebf36ae010dad23fbeab4b890597
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit ebdc01c1861667116aa09914b46df1ac8504baf9)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-12-04 15:34:27 +00:00
Kai Köhne 133af018d5 Doc: Improve QSaveFile::open description
Force the mentioned QIODevice flags to be links.
Use fully qualified name for the first flag mentioned,
but use the short form for the following ones for
better readability.

Mark true and false to be written in code style.

Task-number: QTBUG-131484
Change-Id: I988ba66341b811c815953e5fd6d067204bdaae6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5a6a9b1d5aa4a9314c09dcbc85dcc9c863ace7f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 15:29:30 +00:00
Ivan Solovev 528c78d3a2 tst_collections.cpp: fix RecursiveList comparison case
The RecursiveList structure was defined like this:

 struct RecursiveList : public QList<RecursiveList> {};

However, this definition does not make any sense when it comes to the
relational operators. QList<T> needs to have operator<() defined for
the contained type T.

The current implementation of QTypeTraits::compare_lt_result_container
simply enables operator<() if Container is a base type of the contained
type. This unblocks the compilation of checks like

 static_assert(QTypeTraits::has_operator_less_than_v<RecursiveList>);

However, this is useless in practice.

This commit updates the struct to have a meaningful definition of
operator<().

Amends 9f13842fe6.

Task-number: QTBUG-120305
Pick-to: 6.5
Change-Id: Iaee96385a33ff131bdceabe945265b3285a370c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 58c492a4dc9868faff7e9334758947cf0027eeac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 15:14:25 +00:00
Ivan Solovev 09ddc1b893 Fix tst_collections.cpp
There was a copy-paste error in NoCmpRecursiveList definition.

Amends 9f13842fe6.

Pick-to: 6.5
Change-Id: I1487710e51a8b92c53b79b747c324654d9b9f334
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 65fede8fae459da86784b0757ca6c3179a8fb883)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 15:14:22 +00:00
Tim Blechmann 837967c839 Testlib: extend lifetime of loggers during message handler
QTest injects a message handler to redirect messages to the loggers
and resets the message handler on shutdown.
This currently causes a race condition if the application thread resets
the message handler while at the same time it is called by a worker
thread:

Application Thread                 Worker Thread
                                   qWarn() ->
                                       calls messageHandler
stopLogging()
    -> restores message handler
stopLogging()
    -> clears loggers
                                   messageHandler accesses loggers

This use-after-free scenario can be prevented by extending the lifetime
of the message loggers during the invocation of the message handler.

Fixes: QTBUG-129722
Fixes: QTBUG-130630
Change-Id: I404145f5e13a0f0e9e7500e7c24900dd31ddc18a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a0303cc7c590ff17fb5b0a5975bff98669e42942)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 15:05:13 +00:00
Assam Boudjelthia 1f69f4e5c9 Android: add option to run app detached to runner script
Allow the script to install, deploy and start the app without
waiting for the logs.

Change-Id: Id852d827f627b902a75d1ed8101892552bd4202d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit df3f5d88d389ef204bf9e0f86238300b23803616)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 14:44:52 +00:00
Assam Boudjelthia 8168d4627b Android: fix warnings in runner script
Remove f-format prints that uses no placeholders.

Check if logcat_process is initialized before accessing it.

Remove unused import.

Change-Id: I72cc34666460300b3b6b58174b3c7cefac27da7d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 2eeb35539c4ab0cf1f4d1d15cb974b4d6b7ff720)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 14:44:50 +00:00
Juha Vuolle 4d6a96bb34 Add iOS UIScene related URL handling
Qt adopted UIScene lifecycle in Qt 6.8. As part of that switch,
the application URL delivery also changes to scene-specific, and the
previous QIOSApplicationDelegate URL handling callbacks aren't invoked
anymore.

This commit adds the URL handling to these scene-based callbacks:
willConnectToSession, openURLContexts, and continueUserActivity.
The older callbacks are removed as unnecessary.

With these additions, the application is capable of handling
custom-uri-schemes and https universal links, both when it's already
running, and when it needs to be launched.

Amends: 76ebf51bc0

Fixes: QTBUG-131741
Change-Id: Icacd76e9769f0a559b2052dfb60466a871187321
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c81f805817c82018e133ca140183f7ecee9d6130)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 14:43:50 +00:00
Edward Welbourne 06f77ab19c Correct handling of World in mapping MS's zone IDs to IANA ones
The AnyTerritory entries in the zoneDataTable are derived from
territory="ZZ" entries in the upstream CLDR data; the World ones from
territory="001". The latter give the default IANA ID for each MS ID,
the former give an (often legacy) IANA ID for the MS ID, that is not
based on geography. Some of these are being removed at CLDR v46.

The documentation said the ZZ entries have "no known territorial
association", hinting that there may be some (unknown) territorial
association; however, CLDR's inclusion of them is as entries with a
known non-territorial association, so revise the phrasing to reflect
this.

Also document that windowsIdToDefaultIanaId() returns empty when
there is no territory-specific value, and callers can use the
territory-neutral call to get a suitable value in that case. (They
may, however, wish to distinguish this case, to treat it differently,
so I decided not to just return that in place of empty in any case.)

The upstream CLDR tables do have entries for territory 001, so we
should report these if asked for World as territory. Amend the
available zone ID lookup and mapping from MS to IANA functions that
take a territory to duly handle World via the default-data that was
derived from 001 data in CLDR, instead of from the territory-varying
table, from which those were effectively filtered out when generating
the two tables. Update docs to mention this handling of World, for
contrast with that of AnyTerritory.

In the process remove a spurious split-on-space from the MS to default
IANA lookup, asserting there is no space (in a field now stored in the
table for single IANA ID entries, instead of the one for space-joined
lists of them in which it used to be stored, before I noticed it's
always only one ID). There is a matching assertion in the cldr.py code
that extracts the data. Added an assertion to this last, that each
default IANA ID given by CLDR's MS data does in fact also appear as
one of the IANA IDs for at least one territory (potentially ZZ), and
comment in C++ code on why this means we don't need to scan the
windowsDataTable in a few places, where it would just produce
duplicate entries.

On picking to 6.8, removed the timezone_locale addition, only relevant
on 6.9 and later.

[ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World
and clarified in docs how QLocale::AnyTerritory is handled when
QTimeZone selects zones by territory.

Task-number: QTBUG-130877
Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e23dc7c420297fb62db9834a17c59bbf5992dad7)
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-12-04 11:50:36 +01:00
Edward Welbourne abf8d5a671 Use QByteArrayView lists of IANA IDs before working out which we have
The QTZP::availableTimeZoneIds() overloads taking a territory or
offset to select on were building a list of QBAs, allocating copies of
static data to do so, and then taking their intersection with the
no-parameter overload. Since the latter is of QBAs and the
intersection code used its begin() and end() for the first pair of
parameters to std::intersection(), from which the results are drawn,
we can use a QBAV list for the second pair of parameters (with whose
range the first pair's range is intersected), thanks to QBAV entries
in the list being comparable with QBA.

This saves allocating copies of the static data, when we can make do
with simply building a list of views of that data.

Belatedly picking to 6.8 as a prerequisite of a later change.

Change-Id: I42de4a91273e23fb394f9ae7a86f7f3fadf95be3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 67fb5dcfcd1bac5d5b30723a4ebba84acda58902)
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-12-04 10:50:36 +00:00
Antti Määttä f60fd291b5 Fix creating multisampled pipeline on dx12 backend
Use the depthStencil format to check multisample support when the
pipeline doesn't have color attachments.

Fixes: QTBUG-131505
Change-Id: I8fec8383ed854a581586213e3dbd401bb457cefc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit f6d67ed9b760e87af3e032ea49e5babc6951ef91)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 10:50:36 +00:00
Eskil Abrahamsen Blomfeldt f2b7d064b0 Fix assert in certain cases of missing glyph in a string
If a substring for a fallback engine spanned multiple characters,
we would only assign the first of the characters to a glyph in
log clusters. This could cause the log clusters array to become
non-monotonic (you could get an array like [0, 1, 2, 0, 3, 4]).
In turn, this would confuse the text layout algorithm which
depends on the indexes always increasing, and we would sometimes
hit an assert in addNextCluster() if we were unlucky.

To rectify this, make sure all characters in the substring are
mapped to the same cluster.

Fixes: QTBUG-131731
Pick-to: 6.5 5.15
Change-Id: I93415a58351349ead6eb7a016b32b09f274e6fe4
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 40e364172f001ce7dd6e4e72716e9c17c9d29b9e)
2024-12-04 08:55:48 +01:00
Mårten Nordheim 1fe4271af0 QHttpNetworkRequestPrivate: copy and compare local server name
Because I forgot in the original commit

Fixes: QTBUG-131801
Change-Id: I597673b13e01fdfa22ae178dd1a82671e52794c1
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit fd923ad6e900593d56b6b0f84e8e796a9d8e4ed7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 04:36:58 +00:00
Thiago Macieira 47d584b281 selftests/silent_fatal: disable core dumps and MSVC debug dialogs
Otherwise the test may hang forever waiting for the user to click a
button or just too long waiting for the core dumper.

Change-Id: Id570aab34608aed86b86fffd8d196c84296e0389
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 898abae6adf0ab9ff75752df456aaedef71ae096)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-04 01:47:11 +00:00
Alexandru Croitor d6816e4104 CMake: Fix standalone build of sqldrivers with SBOM
The standalone build of the sqldrivers plugin never called the SBOM
project begin and end functions.
This cause an error in qt_internal_add_plugin which tried to read the
SBOM project name.

Replace the calls to qt_prepare_standalone_project and
qt_print_feature_summary with qt_build_repo_begin and
qt_build_repo_end.
This ensures the SBOM project is setup, as well as many other
behaviors that a standalone internal build of a module is expected to
have.

Additionally we need to tell the SBOM project where to find the
licenses for the standalone build. This is done by setting the new
QT_SBOM_LICENSE_DIRS variable to the qtbase license directory.

Fixes: QTBUG-131799
Change-Id: I2e31ecffdff28561d1c4a6b8fbcd8125188d2c48
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit df30953228f0e364e9a3915d97f522efd8e67489)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 20:38:55 +00:00
Alexey Edelev 4ec2d31d18 Use add_dependencies to add the Android custom target dependencies
According to the CMake documentation we should use the add_dependencies
command to add dependencies on other targets for targets created
using the add_custom_target call.
Adjust the code for the Android targets.

Task-number: QTBUG-131653
Pick-to: 6.5
Change-Id: Iec9a3036f34f065f067568ecfca838345d35ff93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 312717d821aea191bd61285b2bf21ef11c509318)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 20:38:51 +00:00
Alexey Edelev 67cb5b9bcf Fix the unescaped path MATCH condition in QtHeadersClean
Use plain string find instead since paths containing special regex
symbols, give either the invalid MATCH results or lead to regex
compilation error.

Pick-to: 6.5
Fixes: QTBUG-116042
Change-Id: I9deb2fe760843c9be1e622cf2216c6dc81d73e71
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 41b72465d83af147cef4d560756ced2b457955ec)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-12-03 16:14:49 +00:00
David Boddie 1038ba6c58 doc: Fix auto-linking to network classes
Added a qdoc dependency on the qtnetwork module to resolve links to
QNetworkAccessManager.

Change-Id: If625c63fc0a2ecc9cfea9f467796bf8388478c1c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7a473ca3224d5517c5f09cc14a4047da06112bb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:35:35 +00:00
David Boddie 40da8302e2 doc: Fix QString::slice() code example
The snippet referred to had a duplicate identifier to an earlier snippet
in the snippet file, causing that one to be quoted instead.

Change-Id: Id46f6da807806f874291cd5d4c25b8884e511cfc
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit d2c9982a568181d55a9043c8646a4ee88b635fc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:35:34 +00:00
Tinja Paavoseppä e4d5537775 Android: Remove redundant JavaVM reference
Task-number: QTBUG-130610
Change-Id: I788a3789b5a5b178b97b5a2c9b7568a7d925e1a8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c95426619f5788be03c6111c3b21db46b234921a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:52 +00:00
David Boddie 371f603b94 doc: Fix links to OpenGL functions
Change-Id: I0192aed6b26c1b90fe7c92845212cbd4246b5892
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit e409947113c9fbb8692cdce60b1f31c547792100)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:48 +00:00
Tinja Paavoseppä b7f24ec07f Android: Remove unused ClassLoader reference
Task-number: QTBUG-130610
Change-Id: Ide5d1539f6c608a6d031d28d1942b55b0e9b5407
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1a6efa0728c03979096dbd669d1244fd715a8f26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:46 +00:00
Juha Vuolle 3bffcf1baf Document that QNetworkRequest::setRawHeader() lowercases header names
Fixes: QTBUG-131474
Change-Id: I3637fb989000cdb991969aa46b9552e52dacad49
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a3e2f34abda9656bd0eafda5eee97de957c0a292)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:43 +00:00
Mate Barany 6c775b478c Add type annotations to Spacer
Task-number: QTBUG-129564
Change-Id: I942d135da630f7ba6641170a1a597b0578aca878
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 519d3d36c38fb68945c2d42ba3bc5786c27aa693)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 08:19:33 +00:00
Alexandru Croitor cdd257c674 CMake: Fix unescaped path MATCH condition in QtPublicSbomHelpers
Use string(FIND) instead of if(MATCH) since paths containing special
regex symbols like "+", can either cause an invalid MATCH result or it
can lead to regex compilation errors like
 RegularExpression::compile(): Nested *?+.
 RegularExpression::compile(): Error in compile.

Amends 6e7f871edfd35174b40c7eb7386282bfe019f276

Fixes: QTBUG-131782
Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: I59a2c3e4fe2431303c7cbca8fd54360f254da90f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9cb0d48aae81c5436bda783b64721d0b77bc3f6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 22:01:41 +00:00
Mate Barany 8c0867699c Add type annotations to QLocaleXmlReader
Task-number: QTBUG-129564
Change-Id: I8711152840e6bcb39ff1b1e67ff60b53801f28f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit feb39b2d033eae19937e86eca89c1c96141a0b4f)
2024-12-02 19:44:08 +00:00
Patryk Stachniak 42e138a529 Removal of generic stylesheet rule for dropdown
The generic stylesheet rule (* { border: none; })
was overriding specific styles for
the menu-indicator, causing the dropdown arrow
to appear larger than intended. This rule was
removed to restore default or explicitly set
styles for the arrow, ensuring consistent
visual appearance

Task-number: QTBUG-120604
Pick-to: 6.5
Change-Id: If93de1e1595a2155e9a76644a3c615bd432bf53f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ebe9a6ca4bd0df04ae88f926eceda6dabe543748)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 16:44:07 +00:00
Alexandru Croitor 83521f6654 CMake: Add missing SBOM attribution entries
Add entries for the cmake 3rd party files, as well as mimetypes
and gradient gen.

Task-number: QTBUG-122899
Task-number: QTBUG-131477
Change-Id: I22f243798d66422a0b52aa37532eba2b3210c98d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cecff9ec41ca9387386215540cb851ca8b65e2a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 15:43:45 +00:00
Alexandru Croitor d28a99f5f3 CMake: Add more unsupported options to allow using any CMake for Qt
Currently we have two options that allow overriding the minimum CMake
version required to either build or use Qt:
- QT_FORCE_MIN_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_MIN_CMAKE_VERSION_FOR_USING_QT

These options require specifying an exact CMake version that should be
allowed, which is a bit cumbersome.

Introduce two new options that allow using any CMake version without
specifying the exact version.
- QT_FORCE_ANY_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_ANY_CMAKE_VERSION_FOR_USING_QT

Also introduce a Qt CI specific check that would allow using any CMake
in Qt's CI Coin, to allow decoupling of the minimum CMake version bump
from the provisioning of the new minimum CMake version.

This check should only be enabled temporarily, and then reverted back
once the provisioning is done.

The current change has the check disabled, it will be enabled in a
follow up change, so it's easier to revert.

As usual, using any of these options is not officially supported.

Task-number: QTBUG-131169
Change-Id: Icc3f51ad457ebf8f4251309be97e72a3ff4cd2e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit df7091d9f4cf7849cfc91f4987b2ad8cda141e0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 15:01:55 +00:00
Edward Welbourne e5ab6a6588 Shortcut QDateTime comparison when difference is large
We want to avoid caling toMSecsSinceEpoch() since it's expensive for
LocalTime (which is presumed to be the common case). We can do so when
both sides have the same offset from UTC (and this can cheaply be
determined) but that's no help for two local times months apart, one
in DST the other not. However, in this case, the difference in millis
is big enough that no plausible difference in offset can overcome it,
so we can again avoid toMSecsSinceEpoch() and simply compare millis.
This should make some previously-expensive comparisons cheap.

Add test-cases to the QDateTime ordering test that verify this doesn't
lead to mis-comparison at the biggest offset-difference known.

Fixes: QTBUG-131491
Change-Id: I1afd5d058c8663c908f898d4c50d0837549b87db
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ef540d77751e24fe0b345694f43cdafca3434c68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 13:49:13 +00:00
Tim Blechmann e3f3706422 Testlib: improve messageHandler without loggers
When the messageHandler is called without loggers, we used to simply try
to restore the old message handler. This is not ideal and the assertion
seems to be wrong.

The situation of not having any loggers can occur during teardown, if
the message logger is called from a worker thread, while the application
thread stops logging (compare QTBUG-129722)
In this case, we simply forward the message to the original message
handler, which should simply print the message.

Change-Id: Ic8147f7ab6317f1ceb4f52c79ce298464a94de30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 56106d1bd770c474bc15df47ae6aa64d37ea3d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 13:39:01 +00:00
Kai Uwe Broulik 21166a91e2 WindowsIconEngine: Add icons for bidi ltr/rtl and command prompt
Change-Id: I5757a650b6972f6e4e08267ff5b21333db8cc8b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3347432beefc5c31a5a874c190d2f840ff12e9cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 08:59:51 +00:00
Christian Ehrlicher 6855403445 QStyleSheetStyle: avoid double lookups to QRenderRule::styleHints
Avoid double lookups to QRenderRule::styleHints by simply checking if
the returned QVariant from styleHint() is default-constructed.

Change-Id: I4ca657662c2af66582fb4fc7c2ed1b77258ab050
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f1fd15b4549a740dbd0abff44a43b551eef12d31)
2024-11-30 11:09:35 +00:00
Allan Sandfeld Jensen bede1100fb Mark max length work buffers uninitialized
Otherwise the hardening with initializing all buffers causes serious
performance regressions

Change-Id: I3f7a0b7f0e0d08644b1dbb520cf1f6d5e052b270
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 11dc7e1c05d83d45c5057d50560037a2da4416a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-30 00:22:59 +00:00
Frédéric Lefebvre 8a874d5b31 Fix flakiness in tst_QWidget::saveRestoreGeometry()
Add setWindowFlags(Qt::X11BypassWindowManagerHint) to bypass the
creation of the frame. We are checking the geometry of the widget
itself, not of his frame in this test.

Remove the comments preventing that it can be flaky when debugging.

Remove unnecessary QApplication::processEvents().

Remove several unnecessary qWait().

Change-Id: I4a4bcf5cb9522a9a504925c1ae31f0677deae3b1
Pick-to: 6.7 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cf45ae08bc90b5dbbd20a7e7842856805205bca4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 16:58:42 +00:00
Liu Heng 79390471e8 fix QApplciation with a QML popupWindow
Since 6.8, QML has popupWindow. When in popupModeMode,
it does not necessarily have a popupWidget.

Not checking whether popWidget is nullptr will cause the
program to crash.

Fixes: QTBUG-131664
Change-Id: I624b62ef7185f0ab35215c2c34b0d6e9c80539a0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 706d54eefee22e2feb16a7a7717c0a48ff270460)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 16:15:55 +00:00
Christian Ehrlicher 53a5df8cf0 Windows11Style: fix painting checked QToolButton
A checked QToolButton should be drawn similar to a checked QPushButton.
As a drive-by avoid calculating the paint rect twice and make the code a
little bit more readable.

Fixes: QTBUG-129439
Fixes: QTBUG-129700
Fixes: QTBUG-130822
Change-Id: I573132e804f26b9fa41112267a9f685680cf0864
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b3c0b08eb040bbd76b81a7c6172e3846e8ec0000)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 15:36:09 +00:00
Fabian Kosmale 1be6e99b55 moc: Do not get confused by constexpr token in functions
Surprisingly, moc had no awareness of constexpr at all. This would still
mostly work, as we were just skipping it, except for the case where
constexpr appears as the last keyword – in which case we'd pick it up as
the type name.

Fix this by adding constexpr as a known token, and add it to the list of things we ignore in testForFunctionModifiers.

Pick-to: 6.5
Fixes: QTBUG-122609
Change-Id: I0ae0c0477e611ff83fbb841233035bea52216be2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 984ad9019a62a9a130647dbd765e38ee2e6250c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 14:47:56 +00:00
Assam Boudjelthia bc00516d84 AndroidDeployQt: don't use QFile pointer
The file is used only in the local scope so no need to have it
as a pointer. As a pass-by, use WriteOnly open mode.

Change-Id: I9999f4aed0f888af9a3e08ed6c3573432c29d195
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 7539b659d9ffbb3c44e45bdb7d9669a6df8915c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 12:34:09 +00:00
Shawn Rutledge 4059ea60e5 QFileSystemModel::sort(): emit layoutChanged with VerticalSortHint
It's good to give a hint about what changed, and it helps behavior of
QQmlDelegateModel when that is used in the view.

Fixes: QTBUG-131487
Change-Id: I8478eaf1e8294e101f3fedc285e44f83e600c566
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bf714c246b5e45d259a07cf19b668f091fa396a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 05:10:09 +00:00
Shawn Rutledge c014312c20 doc: Remove obsolete note after moving QFileSystemModel to QtGui
There doesn't seem to be any reason that it should require an instance
of QApplication. However, given that the model is by design
asynchronous, it does need to live in a thread that runs an event loop.
Add a note about that to the "Caching and Performance" section, and
apply some drive-by editing.

Amends fb9ec8ad44

Task-number: QTBUG-66177
Change-Id: Ibe3095e0264ce033732d1c724f59a871e2a0d3b8
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 22bde5209a7a3c510d4b90b9eaee413f3ba3dee4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 05:09:33 +00:00
Jaishree Vyas 437a7626f4 Doc: QMetaProperty documentation references deprecated "type()" function
Documentation of QMetaProperty mentions deprecated members, which
includes type(). Added link to the metaType() to avoid confusion.

Fixes: QTBUG-131446
Change-Id: I8d96bcf712c78ca2b9ce609e511d275053cf6cbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 07c5ff8246b568f2d89e8b0e8236b1ec517e16b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 17:54:03 +00:00
Christian Ehrlicher 0188953c6d Fusion style: misc speedup drawing indeterminate progress bar
When drawing an indeterminate progress bar, QPainter::drawLine() is
called very often. Avoid it by first calculating all lines and then call
QPainter::drawLines() once with all lines to draw.

Change-Id: I51ce23236b945b30da649fd06aad60676321e403
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0eedffa01daed077aba4781b240068929cf768be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 17:54:02 +00:00
Christian Ehrlicher 6f353bb066 Fusion style: cleanup PE_IndicatorToolBarSeparator drawing
Cleanup drawing of PE_IndicatorToolBarSeparator - there is no need to
call QRect::topLeft/bottomRight() and then only use x or y. No need to
stress the optimizer that much.

Change-Id: I477dcea6c9bebd981777fdc1eb53963074257e01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9fa471f9c7b4f2218109fa4bd17d66cf5b24101d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:13 +00:00
Christian Ehrlicher 49cb3203a9 QWindows11Style: simplify CC_TitleBar painting
Move common tasks into a lambda to improve readabilty and avoid
copy'n'paste errors like it happened for SC_TitleBarContextHelpButton.

Task-number: QTBUG-130673
Change-Id: I5cb198b976d459b73e339d066def92d70b71ade5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9a97e78d8310c13212aacd578f5529b5521e395a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:12 +00:00