... because it is not really related to IO.
We were choosing between serialization and text, and ended up with
text, because that's where the standard itself puts format [0].
[0]: https://eel.is/c++draft/format.functions
Amends ffac33964d51971a1c1f61308b6f0a60a4133296.
Found in Qt 6.9 API review.
Change-Id: I827322175da81bc027a9e136098b7e84677f43f7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 584ac8185255da9b15360bf0ca50677cba46ac9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and add more specific #errors.
There are two distinct error cases here:
- First, someone could add more Q_STL_ macros to qstdlibdetection.h,
so like a switch with -Wswitch, list them all here and #error out if
there's a Q_STL_ we haven't yet seen. The audience here is Qt
developers, via the CI.
- Second, one of the "non-major" libraries (ie. not libc++, libstdc++
or MS-STL) add support for C++20, specifically the std::ordering
types as announced by __cpp_lib_three_way_comparison, in which case
we need to retroactively add the correct unordered value here. The
audience here is both Qt developers, via CI, but also Qt users.
So separate the two error conditions.
Also, for platforms where we don't know the numeric value of
std::partial_ordering::unordered, use Qt's legacy value, for
potentially faster conversions to/from QPartialOrdering. There's no
point in guessing which value _might_ be used by a future STL, and
swapping STLs is _always_ BiC, so we don't need to guess which STL
will follow the Dinkumware ones on QNX and VxWorks.
Amends 0231f33ad121a85368bb3f43273973b9632735dc.
Change-Id: I1d06a18ca5bb26aceb7c76a0f035ecd8d4673547
Reviewed-by: Michał Łoś <michal.los@siili.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1a74f77f57fff52e0166dd895a8c6d9e09b388a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes clicking UI elements with a mouse on Android.
8d8cbe87e21f05b7d611ed4be47299977288b267 introduced changes to support
mouse buttons other than Qt::LeftButton, but the release always looked
like no buttons changed, nor were they tracked (m_buttons is always
Qt::NoButton). Qt was not notified of mouse up, so nothing was clickable.
Now all mouse events go through sendMouseButtonEvents, and the last seen
button state is tracked for every event. If a mouse up with no buttons
occurs, the last seen set of buttons is used instead, so Qt correctly
handles the event. Also adds the mouse button state information to
mouse move events from Android, so the workaround for delivering
Qt::LeftButton when a window is tracking a move while a button is
pressed has been removed.
Tested on a Samsung A1 with a Bluetooth mouse.
Fixes: QTBUG-132700
Fixes: QTBUG-130297
Pick-to: 6.8
Change-Id: I241282c2915d7e6cf99db7f0bc1ad2d541349077
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d908e043984dcfed3aa80e30cd1cafacd13b644d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Like QGuiApplication does as well. Also add a note that screen and
window DPR can be different.
Pick-to: 6.8
Change-Id: I1a24cf7f11e945187da9dce4421039350e811997
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97049278443860d3dd1b1efd20d1f7dabaf72a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The various base classes that abstract away template-independent parts
of QVLA have protected destructors to prevent slicing. Re-add the
special 5 (using the macro) and a defaulted default constructor.
Pick-to: 6.8 6.5
Change-Id: I60f036eafc808862a1abee72fd53023dd99b4cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c10072895d1061e258d23f3cc2a9050de5236a46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Application developers using Qt from their distribution, or from the
official installer, get a release-mode Qt build, where QT_DEBUG wasn't
defined. That's no reason to hit the issue that a breakpoint in
code that gets hit when opening a popup menu should lead to a complete
desktop freeze due to the mouse/keyboard grab.
Change-Id: Idf0df03ce5afb792261b62cabb06fab17b5e2952
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit a176f87a6451412a632866fda1fd79290b9d7520)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a class honors the RO0 we usually just leave a comment in the class'
body, and don't explicitly redeclare any of the RO5 special member
functions.
In some cases we may need to redeclare (some of) them. The main use-case
so far is to declare a protected destructor for a base class that is
not polymorphic, in order to prevent slicing; the compiler-provided
destructor is always public.
We can easily declare and default such a protected destructor, but that
comes with the problem that now we're violating the RO5 (as far as C++
is concerned, declaring a SMF counts towards the RO5, even if it's
immediately defaulted).
Specifically: by declaring the destructor, the class loses the
compiler-generated move operations, and the copy operations are
generated but deprecated. Clang >= 18 warns about this.
In such a scenario we *must* redeclare all five SMFs... and default them
all. This is boilerplate, therefore I'm adding a macro to streamline it.
Apply the new macro to a couple of cases were manual refactoring has
already been done.
Pick-to: 6.8 6.5
Change-Id: I5dc0ff9770621fbec0b1057c164d0623f901e3e9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcb57391f73d36914e10ba964dbd9b01fe6f3af2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- There is no load() in Q*Atomic (unlike std::atomic), so link to
loadAcquire()/loadRelaxed(), depending on context.
- Also remove the template argument, <T>, which prevents qdoc linking.
Amends b62c3a85452aecf4f6c863645db34857b05d5ebf and
329e09a3c303fad1ab001de74924288aae1e7a9d.
Pick-to: 6.8 6.5 6.2 5.15
Change-Id: I8c58674ffc7e779fee982555edcd45ed40d4c17d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 9854482835071993968a524878b601c1d9327f1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The selection of which set to iterate over and which one to remove
from based on their relative size violates the function's
documentation, which clearly states that items are removed from *this,
and not from `other`, so the result must never contain any elements
from `other`.
Amends 4f2c96eaa8bfa4d8a6dfb92096e4e4030d0cdea7. Instead of reverting
to the gruesome old code with the forced detach-just-to-remove copies,
distinguish four cases:
- if the two sets are shallow copies of each other, then their
intersection is *this
- otherwise, if either set is empty, clear() *this. This is required
for one of the tests that 29017f1395b1bc52e60760fa58c92f6fa4ee4f60
added to succeed.
- otherwise, if *this is detached, perform the operation in-place,
using removeIf()
- otherwise, create a new set and move-assign to *this to avoid
detaching just to remove something again. In this case, we can
continue to iterate over the smaller set, but we need to keep
picking elements from LHS into the result.
[ChangeLog][QtCore][QSet] Fixed a regression (introduced for Qt 5.2)
in intersect() that caused equivalent elements of `*this` to be
overwritten by elements of `other` if `other.size()` was larger than
`this->size()`.
Not picking to 5.15, as users will have likely adjusted their code to
the buggy behavior, and because removeIf() isn't available there.
Pick-to: 6.8 6.5
Fixes: QTBUG-132536
Task-number: QTBUG-106179
Change-Id: Idfa17c3b3589c4eacec27259fc01df6aeaa6c45f
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 162015e9c6f469951d9212ef655cff16dcace071)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This reverts commit 92acc94fa98d19929d28feb5d543acf8c50c2290.
The change broke QSet ordering guarantees: The documentation clearly
states that each item from `other` that isn't already in `*this` is
inserted ("STL insertion behavior"). Swapping *this and other breaks
this.
Independent of STL vs. Qt insertion behavior, making the picking of
elements from containers "random" in the sense that the size of the
container is now important, and not merely LHS vs. RHS, is a bad idea.
[ChangeLog][QtCore][QSet] Fixed a regression in unite() that caused
equivalent elements of `*this` to be overwritten by elements of
`other` if `other.size()` was larger than `this->size()`.
Pick-to: 6.8
Fixes: QTBUG-132500
Change-Id: Ia636b62325139d618b5467a643ff710716324296
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2d1b3028673493cb144060cbec49b1b95f4188d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Qt versions 5.0..6.7, at least, this used to be the implemented
behavior for unite(). For intersect(), it was implemented up to and
excl. 5.2. Even the documentation states as much:
intersect(): Removes all items from _this set_ that are not
contained in the other set.
unite(): Each item in the other set that isn't already in this set
is inserted into this set.
Add checks that the functions behave as documented (hint: they no
longer do, since 6.8 (unite()) and 5.2 (intersect()), resp.), this
being the only correct way to implement these functions (items in
sets may be equivalent, but not identical; it is important that the
set operations work in a manner consistent with insert(), to meet
user's expectation of how these functions work (unite() just
inserts() the rhs, intersect() removes if !rhs.contains). Note that
QSet, unlike other Qt associative containers, actually has STL-style
insertion behavior (insert() doesn't overwrite).
subtract() is the only one that's still true to its docs. A test for
this function will be added in a follow-up commit - eventually.
In anticipation of adding rvalue-other overloads of at least
unite(), add a test with that, too.
Pick-to: 6.8 6.5 6.2 5.15
Task-number: QTBUG-132500
Task-number: QTBUG-132536
Change-Id: Id309ab5192e6d1c9bbeef496cbd7116d306eaae8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0d4fd5c545b47966c56ed0b9eb9b5c0a8f75c02a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The original patch that added this feature was disabling the core dumps
unconditionally. I guess the check was simply forgotten.
Amends 9df6e8ad3b3a7a57af87e6a3fef2ef793610cb3d.
Found in Qt 6.9 API review.
Change-Id: If3f9cb35d11a0262241a465626a25f6d7d2bbdb4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9860f6522919d154dd4f95ff6f6ae58d3e4c435e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It usage of libc++ was never detected if the compiler was explicitly set
to a specific clang binary and clang wrapper.
Change-Id: I5fd3c84223cafedf06b34afe91d975e71c199e24
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 982fe396e5908a6f1089ba577ed6220d90eaaa95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixing warnings/errors about QFile::open() return value not being
checked, and print the name of the file and the error message that
occurred.
Task-number: QTBUG-132902
Change-Id: I099b300b5fd4563334fa547ffa365ec3f68e08cf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit e99d5c6268862e5773056a008c273e18bf5b4ef7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We look it up with a binary search, so it needs to be sorted.
Pick-to: 6.8 6.5
Change-Id: I0aa25e6ff9722372c0a09f2dce9f9c839fedf00e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 382a7d006b52faa08b84e56d97cc6c216925a43e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On MSVC the values stored end up as negative.
Task-number: QTBUG-132902
Pick-to: 6.8 6.5
Change-Id: I963c57c34479041911c1364a1100d04998bdfaed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 62685375a2d71fa34015faac76f03e709e4217c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QPainter::setPen(QColor) and QPainter::setBrush(QColor) overload
instead creating a temporary QPen/QBrush to gain advantaged of the newly
introduced QPen and QBrush assignment functions from
ab53500cfa11b988e7e4234583fa6eb5027b4c08
Change-Id: I3b8c4f7d669a08558cf6abcc77c23a4fdda99c02
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 82a5e8bdb788179d1323e76b725d57efaab0b217)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows, using a URL of "file:///c:/" as a base to be resolved with
"../" should not result in the Windows drive being removed.
[ChangeLog][QtCore][QUrl] Fixed a bug (regression from 6.7) where
resolving a base URL of an absolute file path containing a Windows drive
could result in said drive being removed (e.g., resolving "file:///c:/"
with "../" would result in "file:///").
Fixes: QTBUG-133402
Pick-to: 6.8
Change-Id: I58286b9c5e5d02363f0efffdb06f983b560340df
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 340c9d88ab353e201f117d64609fa5f7d2fa2b21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We set it when manipulating full URLs. If you're creating them from
parts, you may end up with one without a host. We will still fix that up
in QUrl::toString() ("manipulates full URL").
This allows the path normalization code to avoid accidentally creating a
URL with no host/authority and with a path that starts with double
slash.
[ChangeLog][QtCore][QUrl] Fixed a bug (regression from 6.7) where
QUrl::resolved() could create invalid URLs when the relative URI being
resolved contained a path with double slashes (e.g., combining
"scheme:a" with "..//b.txt")
Pick-to: 6.8
Fixes: QTBUG-133403
Change-Id: I3fe9d5fbd2efcaa66d66fffdc010e5a84066b641
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 7d05f5ed7d3472028e28a09eeda175bb1b1eeb00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Definitely a compiler bug because it passes for everything we threw at
the compiler in the CI but fails for a user. At least the workaround is
simple.
Fixes: QTBUG-133032
Pick-to: 6.8
Change-Id: Ie84590c466cf1d6f01bbfffd3ca1d6c262d77200
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0a5b37b706ee72c7d9042efcde244aa93a5ce9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To prevent colored glyphs (like emoji) from being cut off at the edges,
we can simply apply the solution from bbba71748438dc05d344bb9727f10b7f55a5d229
to colored glyphs as well (i.e. to glyphs with QFontEngine::Format_ARGB format).
Fixes: QTBUG-133297
Pick-to: 6.8
Change-Id: I5578e2d12f956d0635b662b3ecf714aa63474945
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 7cc0ea0b5a1dc1d9e1a9a8cc8639958e42adba3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added the link to the qtcore-toc.
Task-number: QTBUG-130085
Change-Id: I765e01aeda0bce694157bf15ff5a036f239168f5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 43cb7f93a4da2d57513acb3c4cbdd56c1eaf188f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I've been meaning to add this since at least 2012 (cf. commit message
of 9180d9aa8bfb9e9f66fad13f194398a98698eb77), this is as good a time
as any.
Detection taken from qcompare.h, except for
- libstdc++: using version macro instead of date one
- Dinkumware, which is taken from the above-mentioned commit (adjusted
for the LIBCPP->CPPLIB typo),
- STLport/SGI, which are taken from stlport's _stlport_version.h,
- RogueWave, which is taken from Apache stdcxx's rw/_config.h, a fork
of RogueWave, contributed to Apache by RogueWave themselves.
It looks like not all STLs provide a version macro, and those that do
vary a lot in granularity, so for the time being, just define these
macros to nothing and not to some form of version.
[ChangeLog][QtCore] Added Q_STL_ macros for stdlib detection (libc++,
libstdc++, MSSTL, Dinkumware, STLport, SGI, RogueWave). If your STL is
lacking, please file a bug report. Note that these macros are not
considered public API just yet.
Picking to all active branches, since not picking is more risky (code
that assumed these macros existed in older branches could silently
change behavior if they don't).
Fixes: QTBUG-132908
Fixes: QTBUG-132909
Pick-to: 6.8 6.5 6.2 5.15
Change-Id: I8f956d131292483b7727f11f69b460b12a06b583
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b6f825a857d0d2266ea89879f26703f86ddf669a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The replacement is new in 6.9, so the deprecation should be done in a
later Qt release.
Amends 90fe9874d22f0c4b809a3e493766ef852c72cc39.
Found in Qt 6.9 API review.
Change-Id: If68685f98928015163cd4aa0e65fed2c6578e429
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b0364bc2633f322630028a13fe1143e222015cd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends commit 19b7f854a274812d9c95fc7aaf134a12530c105f, which removed
the __PIE__ check because of the GCC version check that was alongside.
GCC and Clang define both __PIE__ and __PIC__ for -fPIE, so checking for
__PIC__'s presence isn't enough.
Drive-by amend the no-PIC #error message to also suggest
-DFEATURE_no_direct_extern_access=ON, which is more modern and produces
better code for executables too. Because of that, I've also changed the
reduce_relocations option to the CMake one, as there is no configure-
style equivalent for the modern option.
Pick-to: 6.8 6.5
Fixes: QTBUG-133101
Change-Id: I957b264eaee360fd964afffd60617964b26fe934
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 014e77801fa4b99cdb03330ccce1e212ac13a0af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When "address" is a QBAV, it points to line(QBAV) which points to
lineArray(QBA), so its data will be overwitten after every read:
while(file.readLineInto(&lineArray))
This amends f0aa391ef89a393221d77d5ad3c1616a4727f11a .
Fixes: QTBUG-133445
Change-Id: Id23e726327529c44e205c4c0720af0dad42c175b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 07eeb45d881bb0240e472167217912b08be44371)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The NSFontPanel emits changeFont even when not the active window, and
applications are expected to update their views accordingly.
As the changeFont action message is sent through the responder chain we
were only picking up the changes when the font panel was active, thanks
to the NSWindow delegate we were installing on the panel.
But when the active window is one of our other windows, we were failing
to process the changeFont message in our QNSView.
We now handle the message by forwarding it to the font dialog delegate,
so that we enter the same code path as before, and emit the right
signals for QFontDialog and friends.
Pick-to: 6.8
Change-Id: I97427c73fe46f129ca11afa6b2c222bf0f0fb0af
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 3d42f31243ce52e517e09843b93f40b79925652f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QSqlQuery has been made movable in Qt 6.2
(14f9f00fdb2dc428610c08e3d9d03e38e9602166). The pre-existing copy
operations have been deprecated, but not removed, in order to preserve
SC/BC.
This left us with two issues:
1) Whether or not to keep the deprecated copies in Qt 7. The answer is
no: the copy operations are impossible to implement in a way consistent
with value semantics (the state of the DB driver can't be copied in
general). Therefore, mark the related APIs as to-be-removed, and not
just deprecated.
2) While we no longer copy QSqlQuery from Qt code directly, QMetaType
still detects the presence of the copy constructor and extracts it,
triggering the deprecation warning.
Rather than unconditionally suppressing the warning (which will hide any
similar issue we might have in the future), add a local workaround that
raises a runtime warning if QSqlQuery is copied through QMetaType, while
not raising the deprecation warning when building Qt itself.
[ChangeLog][QtSql][QSqlQuery] Copying a QSqlQuery object via QMetaType
now raises a runtime warning. Note that copy operations for QSqlQuery
objects have already been deprecated since Qt 6.2, and are planned to be
removed in Qt 7.
Fixes: QTBUG-132752
Task-number: QTBUG-91766
Change-Id: I48714ad53ec706a5e4e055c45a1c05f372382940
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f744cef06cf3a56591782f487c545b55b2a673fb)
Following qtbase/1c8884fc277c5916a420a3c14de68547a391f9fc's making
syncqt error out when an installable header contains #pragma once, we
can now flip the coin and use #pragma once as a static assertion that
the given header is not going to be installed, making it easier to
understand which headers are "public", which ones are "private" and
which ones are "neither, since never installed".
Do this for the XCB platform support files.
In qxcbglintegration.h, the header guard was actually broken (had only
#ifndef and #endif, was missing the actual #define).
As a drive-by, normalize vertical whitespace.
Pick-to: 6.8 6.5
Change-Id: Iede0605c38cda7606edfc7155bd8bfc95990c5bc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 91f9ba2993a2652bcb349ce639aff67b5bfc8938)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Go straight for QResource, because this is run very early in Qt's
initialization, usually as a result of some debug message, via
QLoggingRegistry::initializeRules(). This bypasses the need to create
QResourceFileEnginePrivate, QResourceFileEngine, QFileInfoPrivate, and
QFileInfo, all of which would end up in this .isValid() call.
Additionally, I'm making it query in the C locale, which will also avoid
initializing the system & default QLocales. If a resource exists in any
language, the C locale query will find it.
Pick-to: 6.8
Task-number: QTBUG-133206
Change-Id: I434b498903d793c12d35fffd3e297bfdbdc1b6fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d59e640c868f3db2d661970f3d34a22013d49053)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QPainter::setPen(QColor) overload instead creating a temporary QPen
to gain advantaged of the newly introduced QPen operator=(QColor)
function from ab53500cfa11b988e7e4234583fa6eb5027b4c08
Change-Id: Ib29a932a183b629f2c5f3ce32f4e00bd7ab24a03
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 678564291d8faa7689b4a65376b2c60118fc9936)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reportedly, some unofficial DirectWrite ports are missing the
default values to the arguments for IDWritePaintReader's
MoveToFirstChild() and MoveToNextSibling(), so we make this
explicit to work around the problem.
Fixes: QTBUG-133336
Change-Id: Ia9a01e371e7424508db0d5ad3c75037caaf16854
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cbce69ebd643bb4841de20f34c5b23bddbcde0c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise running the deployment script fails on macOS with something
like
CMake Error at
.qt/deploy_qml_app_texteditorexample_32987d3e6e.cmake:1 (include):
include called with invalid argument:
2/build/.qt/QtDeploySupport.cmake
due to the following generated content:
include(build/texteditor space 2/build/.qt/QtDeploySupport.cmake)
Pick-to: 6.8
Task-number: QTBUG-126827
Change-Id: I8f9923db8dc670a6efbd6f75c48da5dfd1af687d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 65f08c09713b6d167638c4e19ebafcac045fc1c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The feature names are normalized using `qt_feature_normalize_name`, but
a user might read `qt_feature` usage and not realize that they should
normalize the name in the `FEATURE_*` variable.
This change emits an error if it detects such invalid names.
Fixes: QTBUG-132464
Pick-to: 6.8
Change-Id: I33c7ab9f589c92e11e16d376660e8b6152339d12
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b71647d06970b2cc3b63b93c020eca8caf0a519f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The patch provides two documentation snippets: for an arbitrary arg
and for \c {*this}. That is because qdoc does not support passing
a command (e.g. \c) as a part of the snippet's parameter.
Amends e95fb04202b3f786037c10942fd4e912644fd7d2.
Found in Qt 6.9 API review.
Change-Id: I4eed234d18e39f2fc0c30a647a423f3240e31d40
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8511149d886e5aef2a065efffc336c7b25e6540e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is both more accurate and also more stable: The suffix-list
update usually takes several days to go through all branches; using
the commit date avoids using newer fetch dates in older branches.
Pick-to: 6.8 6.5 6.2 5.15
Change-Id: Ifefd7158e4104c7bbdfe6a2d8a505d8acf7275b4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cbea57f80b43a969d2e15d53b759abb9924d52c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When two actions in one menu have the same hotkey and the first action
is not enabled, the action search was selecting the first, disabled
action despite the fact that it could not be selected later on.
Pick-to: 6.8
Fixes: QTBUG-56952
Change-Id: I894ee09d9ccc7154ca506ef907924cd150ac6ed2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 13636f848da6932f9864bf9335d19b439b8387cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QT_ANDROID_SYSTEM_LIBS_PREFIX and QT_ANDROID_NO_DEPLOY_QT_LIBS were
added in Qt 6.4, but they were missing \cmakepropertysince 6.4.
Pick-to: 6.8
Change-Id: Ife0f68e79d331f4923d1015431f5af65d80dca36
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 51474d795a4c801933f9444b73d536fb1c407e72)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Those Android CMake properties have been carrying the documentation tag
of \preliminarycmakeproperty by mistake.
Pick-to: 6.8
Change-Id: I739fee2f078300427557a29b25e1898d57cf04d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 2abc4594791823f1e56d692df38ede69f83e45cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's semi-private API (ie. undocumented) and for most platforms¹, the
change is a no-op, which is why the approach here is a bit different
than your usual REMOVED_SINCE:
Normally, when only the return value changes, we mark the new overload
as QT6_*_NEW_OVERLOAD to allow the two function to coexist and the old
function to call the new one.
But the extra argument backing QT6_*_NEW_OVERLOAD would change the
mangling of the function even on platforms that don't mangle the
return type (the majority), and we'd have to decorate all calls that
could possibly be seen by QtCore's removed_api.cpp TU with
QT6_CALL_NEW_OVERLOAD. The main user of the API is moc-generated code,
though, and so I didn't want to have to change moc's output, even
though, currently, nothing in removed_api.cpp includes moc-generated
code. But it may, at some point in time.
This means I needed to grasp the nettle and duplicate the (granted,
trivial) implementation. Even a private helper function would mean
(maintenance and runtime) overhead for "normal"¹ platforms, so I opted
not to go there, either.
¹ those that (rightfully) don't mangle the return type, ie. all except
... MSVC.
As a benefit, we catch the mistake of modifying the dynamic
QMetaObject under the object's radar already now.
[ChangeLog][Potentially Source-Incompatible Changes][QtCore][QObjectData] This
(undocumented) class' dynamicMetaObject() function now returns a const
QMetaObject* (was: non-const). The backwards-compatible fix is to
receive the result in a const QMetaObject* variable (or to use auto),
and applying a manual const_cast, if a non-const object pointer was
actually required. Modifying the meta object that was returned by this
function was never supported and may lead to problems elsewhere.
Amends 0b044e8b055f9c1d93b278ed69aba76f7c886cb1.
Change-Id: I4ebc43018a2a87433ab7a97554196842b97cf1ba
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2c212e15f8b9dc2578d93ac69a0f5826ea9de18f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>