This reverts commit b530ae6e81.
The revert is needed for the Qt 6.8 LTS opensource releases.
They cannot contain commercial SPDX license identifiers.
Task-number: QTLTSOSS-264
Change-Id: Ice9d1595750519076d1c2a1c1927d38944811598
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
TalkBack can provide useful additional information such as element
specific interactions, positions or counts. In order for this to work,
the AccessibilityNodeInfo.getClassName() method has to provide names
to actual Android UI classes. So based on QAccessible::Role we provied
these class names.
[ChangeLog][Accessibility][Android] Provide actual Android UI class
names for TalkBack to improve a11y announcements.
Fixes: QTBUG-137806
Change-Id: If7746516eb6eaf03525906f08daed5b93478beff
Reviewed-by: Lars Schmertmann <SmallLars@t-online.de>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit fd1915aba413b2e01d1a0cd2a175b31f0d5f1e9b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 63bb40d3ed6ed4f6f4d7d947232a876894976c11)
(cherry picked from commit f90d762fdc5fe35299454006e636fbb1c5132b74)
The functions assert that the pointers are all non-null, so we should
document it as a precondition.
There may be more preconditions inherited from the underlying math,
but I can't find my Algebra book, and it's pre-existing, so maybe for
another patch.
Amends:
- 1e441d298d (getAxes())
- 88142e73d5 (getEulerAngles())
- 5d784deb71
(getAxisAndAngle() née toAxisAndAngle()).
Pick-to: 6.5
Change-Id: Idadb6183c8cabdaf3bdedb73794d3fc5d6052bac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 7dcd01d0f0cacde02bb7cb9686413ddd00fc76ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3be775d0bb46ff85224f77aa7eba5b9da552fb4c)
(cherry picked from commit 8e885ec844c09852f62155b8af76361f06791a7d)
The load from _v[block] must acquire, to match the storeRelease()
implied in the testAndSetRelease() in next(), where _v[block] was
allocated. A loadReleaxed() will not establish the happens-before
relation required to avoid a data race.
So use loadAcquire().
Pick-to: 6.5
Change-Id: I34003ef7510a0d78f7851d2b4b4aab01a686babf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b6faf63995b63d5958cf4b95ad1e9bab17d1bc6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6b89694a016474c7877ae07f0d49efd42f8fd9ec)
(cherry picked from commit 51f2979e5f79e1d67425834167487d41bb59f9d7)
Add a check that we can compare QObjects implementing interfaces to
said interface.
We can.
Pick-to: 6.5
Task-number: QTBUG-135626
Change-Id: I0e1164b43d9112e051add2c034dea50ab5192b2d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 154d175c9b7b990e5f27bd4779ae2525ec02a1e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4f325cb6d51652fa7866a20b1f6ea38981bde3fa)
(cherry picked from commit f3218e1f603c34f2502d8ebbbb3c8086a6ded377)
Use delegation for the constructors, and = default the SMFs.
The =default, in particular, will indicate to readers that assignment
and destrution can handle the nullptr d (partially-formed state) that
the upcoming move constructor will introduce.
Pick-to: 6.5
Change-Id: Ib00f8a62e3ab6c054102d546f885f7aa52aeb598
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 48e64f821ac3d6c7b3d825d6f8a94f69fa491136)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bbbbe5674be3f9bc9689971969fd3412457def43)
(cherry picked from commit 2def2b7012993b9221c088a0955ccd007cd4fae5)
Say that this operator *move-*assigns, and that, since it's
implemented as PURE_SWAP, leaves the moved-from object in a valid, but
unspecified state (the same as objects of std types).
Partially reverts be4db73231, which
incorrectly changed "move-assign" to "assign".
Pick-to: 6.5
Change-Id: I0c314b598ddd94acb93bbe08c4f339d6db750195
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit bddc78c796dd9e4dd843578e77ee325b9e10a055)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 093dfe16e879319d27e3dab630b6186a10bbf9ad)
(cherry picked from commit 8afadd8cf26307a1dc453ebf5acc278f7b36c800)
Some of these links were self-referencing: they referred to the class
that contained it. In the future, QDoc will warn about this for "see
also" links.
Pick-to: 6.5
Change-Id: I95ccc7c8c1dad595f4a9bebcd2d2257b1b316e26
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cb254fa8e2f6f338735efb501ca24afbc9e0d531)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c25ce0bcf68b0baa3b3c068b858b656d2a9384a0)
(cherry picked from commit dfde71ca7bca55e94806b893005689a4986245ea)
Without qualification, qdoc links x() to this class' x(). But the
documentation means QVector3D::x(), so we need an explicit \l here.
Similar to ab1ce95c8ce38683477373cf84ba5686ea00efed for
QString/QByteArray.
Amends 88142e73d5.
Pick-to: 6.5
Change-Id: I6eb5ca38f328ce36988e10e3221b801e68629938
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit dd1c5723382308d5317f402048de07e0854450a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fdc3da6b44b792842e005a93cce1ee8676db550c)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 628df98b5efaeaf96c2d643d5b42daf936ab4e25)
The type normalization code was crashing when passing a nullptr.
Fix it by explicitly checking the begin == end case in QTypeNormalizer
code.
Modify the test code to make the difference between a nullptr and an
empty string obvious, and add test-casees to cover these corner cases.
Amends 4dbac23e53 which was added for
Qt 6.0, so pick to all active Qt 6 branches.
Pick-to: 6.5
Change-Id: I0f6855d19146f18170c34061f0631f9192df8bad
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 7fec2a2594de9dcfe019546cc8026bccabd12648)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6cf7de8f1d8ea6ff99daef04f1b47c7c7c8de923)
(cherry picked from commit 530c29acfef843eefc8cbff7080e83023072f106)
Up to C++17 inclusive, a default-constructed std::atomic object can
only be initialized using std::atomic_init(), _not_ by .store().
While __cpp_lib_atomic_shared_ptr is a C++20 feature, when std::atomic
default construction has been fixed, compilers may implement these
feature in any order, and it's not much work to call the
std::atomic<T>(T) ctor in NSDMI instead of the default constructor, so
do that.
Amends a0303cc7c590ff17fb5b0a5975bff98669e42942.
Change-Id: Id3148db0049ee4e16509c2bfd78c9f9ee145f269
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 0a4e5840a59cacbaedb8af058725fdc1804e5887)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 99844c5955038914274024416b667bc291803121)
(cherry picked from commit 43dd9848e799ca8f5eae815846cb46710ec8671c)
The code load()s the shared `loggers` to iterate over it (or copy from
it) (= read the memory pointed to) and it store()s the shared
`loggers` after intializing it (= writing to the memory pointed to).
So relaxed loads and stores are not sufficient here. Stores must have
release memory order and loads acquire memory order, otherwise the
writes before the store() will not happen-before the reads after the
load(), which is a data race, which is UB. The fact that the pointer
is a shared_ptr doesn't change that.
Amends a0303cc7c590ff17fb5b0a5975bff98669e42942.
Change-Id: I8f82e5db240efdd414983f5b1cb0e1c1f1861100
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit d4757de5de3e151d129e8d272ad3b3d27172cfde)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit af61c5e8a94e9d5aba66047af1151e76b6d56c45)
(cherry picked from commit 27002dd50973f409bf0d4618f6f019d889b0ca2b)
It's immutable, as appends happen on a copy, so let the stored type
reflect that. Of course, the initial copy needs to be mutable, so
remove the forced cast to SharedLoggersContainer in addLogger().
Amends a0303cc7c590ff17fb5b0a5975bff98669e42942.
Change-Id: I7e3ca8f3779b1e8a653899069d34216f83480d7f
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 057929359d7aa554bebfeaad70f1242573b6a6b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9d095c2e43a347358f0046d1a9c2b92c8c589c2e)
(cherry picked from commit 3a4e89d5a907b692a626fee41522804643067c93)
The eulerAngles name will clash with a function I intend to add, of
the same name, probably triggering -Wshadow. Besides, this fixes long
lines and isn't any less readable.
Picking all the way since it's 100% risk-free.
Pick-to: 6.5
Change-Id: Iea552c6cad4ad20164cf0cc462cb1dcb2bc752c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit eb98bb80162cdf3656c9839bae5ee126f4ff00a8)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b5eb2c657d6e1bdae755389767e9083e6f7aed70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a88b8012da7e72bbbe95549eb5613fe8681a1744)
None of these are necessary, so replace them by early returns. Qt does
not subscribe to SESE.
Mercifully amends the start of the public history.
Picking all the way back, because goto's deserve it and this makes the
code easier to understand and safer.
Pick-to: 6.5
Change-Id: I7b38795a2434f09fba7990e1267cb1a9127e37eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7d11a03aea09275e1b83031968a2d822376484c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 71ecb7da65867bbce6ee10a3c7ead807a5a030f8)
(cherry picked from commit 6dd958ced18b0f2b479cdf6550d04fcfd8929412)
Instead of linking from QMetaMethod::typeName() to the deprecated and
overloaded static QMetaMethod::type() function, link to
QMetaType::name() which is neither, and a more relevant reference.
Change-Id: I2a4451d92d9dd36adf6a55a8069230333358fe63
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 219a7e0deff61c6880426ba2b1dfabec8895e30c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f910f9e5d4aface0a1a08542528db1cc83b27db0)
(cherry picked from commit 5f39c5738efcb2563b0813bff02eba35a1e21cf6)
Up to C++17 inclusive, a default-constructed std::atomic object can
only be initialized using std::atomic_init(), _not_ by .store().
While it's probably not a problem in practice, it's also not much work
to call the std::atomic<T>(T) ctor in the ctor-init-list instead of
the implicit default constructor, followed by a store() in the body of
the ctor, so do that.
Amends a8a38f7caa.
Pick-to: 6.5
Change-Id: I9ba953d1bc34fe09326554a65393b8a2deb35328
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 1de46a1cda8762b138df7ebde87cd761a7c7c8d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ff256cf5dd355e1c2f9af037c52a3860a1247cc7)
(cherry picked from commit 8de402e9b7d4283bbdfbe0b756216ee86c9c8e0c)
Up to C++17 inclusive, a default-constructed std::atomic object can
only be initialized using std::atomic_init(), _not_ by .store().
While it's probably not a problem in practice, it's also not much work
to call the std::atomic<T>(T) ctor instead of the default constructor,
so do that.
Amends 0cab9b56e9.
Change-Id: Iece5ee724809ce7b5e698871dbc65e14a5d21330
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 091d095c844c30212657a23c8324adb8745408ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bdce476ab847f9302fa34e660fb99e3541c314e4)
(cherry picked from commit ec1b3b124b348ce58cb89905e73222daaf3fc425)
One must never overwrite the first argument of realloc() with its
result, before checking the result for nullptr, otherwise the old
pointer value (which still needs to be free()d when realloc() fails)
is lost and therefore memory is leaked.
As a drive-by, replace C-style with static_cast.
Found by explicit review of realloc() calls (incl. QtPrivate
wrappers).
Amends the start of the public history.
Manual conflict resolution for 6.9:
- 03d5daf9437d8b46db2e89e3a9763ea701fa681c is missing, so
s/fittedRealloc/realloc/
Pick-to: 6.5
Change-Id: Ifac55291898837a9e063c508e03f1c7da0a0e61f
Reviewed-by: Aurélien Brooke <aurelien@bahiasoft.fr>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit afd44ac9f582fc7a81465da8e6c6cf72a43db03b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 46ed8947ddcf820582655bf04f2379c6faac0a5c)
(cherry picked from commit 8dbc6232932ed11bd52a8effb68194053fe7ad2f)
"Angles" are plural, so the verb has to be in plural form, too.
Amends 88142e73d5.
Pick-to: 6.5
Change-Id: Ic19ba9de8b7f33fafb35eff7f256698ebf4b8443
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0344d817d25cdaa19b80513d5fc517871daa13c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ee5465a7a813fd6fcaff0a42c61d4c962e6750bc)
(cherry picked from commit 4a976fbaebfb66475be8a41d4931c596807393c4)
I don't know why, but after years of no changes to the header, the CI
on 6.5 started to throw the dreaded
qquaternion.h:138:8: error: 'QQuaternion::QQuaternion()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
Fix by plastering the class with inline keywords. This just goes to
show that separating definition and declaration of inline functions
(and exporting non-polymorphic classes wholesale) is usually a bad
idea.
Remove the inline keywords from the definitions to order to use the
linker on all platforms to verify we marked all functions inline that
are.
Later releases are unaffected, because
f9f1272e7c plastered the class with
constexpr, which implies inline.
Manual conflict resolution for dev:
- there were three inline keywords left outside the class after
f9f1272e7c, this patch removes them,
so mark it as a cherry-pick of the 6.5 change, which did the same
Change-Id: I5f044e4aae8e31173c0717d4b70d53fece99b927
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fccb455a4f94e5bc95ba6ad54a46fa71439314bb)
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
(cherry picked from commit 1b1cb5bf666df76be876e593da04125f21c7b30b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit dea1706b7799ee1f659dee2c8a8282dd6fcbf8c1)
(cherry picked from commit ba0847ad338b7b19124c52359de0226b8c38a7de)
QWindowsScreenManager::removeScreen() read an element from m_screens
and removed it. If the removed screen was not the primary screen,
QWindowSystemInterface::flushWindowSystemEvents() is called.
When removeScreen() is called from handleScreenChanges() in the same
class, flushing window events can lead to a re-entry. That is e.g. the
case when a RDP connection is closed and the server removes the virtual
screen.
QWindowScreenManager::removeScreen() removes the platform screen only
at the very end, which means that m_screens contains a stale pointer.
The re-entry can therefore crash with a double delete.
Take the platform screen at the beginning of the method, to make it
safe for re-entry.
Fixes: QTBUG-135337
Pick-to: 6.5
Change-Id: Id18a6fb3e72922bcdb62c9e79857b6bb713c0c1b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 3416d28c8b0fa8e5cd6622fc86fe6fc5aae9222b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0e0db3eefdfdde8480bf80304056d6e129168bf8)
(cherry picked from commit a3839e8b320e29687fa15ac0b711b1c7d7b7d9cd)
The realloc() calls unconditionally overwrote m_spans with the result
of realloc() before checking whether realloc() succeeded. This way,
they leaked memory if realloc() did fail (they lost their handle on
the old, still-existing memory block).
Fix by piping the realloc() result through q_check_ptr(), which
inserts Q_CHECK_PTR(), so we don't need a temporary variable here.
As a drive-by, replace C-style cast with static_cast and fix spacing
around binary operators.
Amends the start of the public history.
Pick-to: 6.5
Change-Id: Ia77a246bf6eec4e29ea6a01f999d3f4a43e0ee1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fa225324cdb2867c9eb45b3c610651f9871c911a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b0857c01f1bf4135251abbd21a12fba072316601)
(cherry picked from commit 5f66bb8fe7e46910e069118326238d4e8b1e3d14)
Coverity complains that the QXmlStreamPrivateTagStack default ctor
dereferences nullptr. I haven't understood, yet, why it thinks that,
but manual inspection revealed a Q_CHECK_PTR() in
QXmlStreamSimpleStack::reserve(), called from push(), fingered by
Coverity, that comes too late: If Q_CHECK_PTR() is configured to throw
std::bad_alloc, then we'd leak the previous buffer if realloc()
failed, because we had already overwritten the old value.
Fix by moving the Q_CHECK_PTR to after the realloc() and before the
assignment of the realloc() result to the data member.
Fingers cross that this fixes Coverity's complaint, too.
Amends 403343039d.
Coverity-Id: 474174
Pick-to: 6.5
Change-Id: Ib3564c34626950b927aa54df50abeecc42e8e674
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fc00de90bb93fa0f7ba11da696c0ed408efa100b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 84675a6b5cbe047e294161b2b42930731dbda759)
(cherry picked from commit 1747f783d7d613e416019dcebf411517db9ffc8b)
One must never store the result of realloc() back into the first
realloc() argument, because, if relloc() fails, one still has to
free() the old pointer, but one has just overwritten its value with
nullptr, leaking memory.
To fix, first check, and then assign.
Found in manual review of realloc() uses.
Amends the start of the public history.
Pick-to: 6.5
Change-Id: Id6d369116d4e01fb9cb1d6db3627b9956d4b6201
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3aa82a0ecf9c7a5cb2a1c7f64261d9b8582645ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ee09d5aedefeef67f5dd5cd6f29fa5728da1579b)
(cherry picked from commit e60e999c4680918c328e3012faad243ba65aa0c1)
Coverity (rightfully) complained that Functor f objects are being
passed around by value, but not move()d, but copied.
Add the missing std::move()s. This might allow passing move-only
function objects now, but I didn't check. This is a de-pessimisation
and Coverity complaint fix, as far as I'm concerned.
Coverity only shows me two such issues in the file, but I found
several others by looking for "Functor f", so fixed those, too.
Coverity-Id: 480972
Coverity-Id: 480976
Pick-to: 6.5
Change-Id: I3866c94bbbde25d351650838e1e141ecbec38c0d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 870a3e4bc693f220bfef94f1d87f2b85072d5ba9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 82ce2315e5f730810695bd4a784682171def1f04)
(cherry picked from commit caa45581ebe3a24b392d46d89d5ea6845a39e4b6)
Updated the commercial SPDX-License-Identifier to
the source files (including tools and utils). Examples,
tests, documentation, or build files are not updated.
Modified licenseRule.json and REUSE.toml accordingly.
Task-number: QTBUG-136484
Change-Id: I4b82a867e37cb90a9d94db60a9c5715dd0557562
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Some of the changes required updating the tests.
Like spanish separators and (English,France) now returning
France instead of United States for territory.
[ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to
v47.
On pick to 6.8, skip the qtimezonelocale_data_p.h change, as the file
is not active until 6.9, and regenerate by re-running the scripts (as
the data generated could be different - it wasn't on this occasion).
Task-number: QTBUG-137782
Change-Id: Ic939666b9718d59ab28c51f65ac38cf84b97bf93
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 7176ca82bf5e69f58d863e738ca249fd91f64190)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b909757a29ca44395bd9ae7d96ab0d4a2f657e96)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 943e8ac26f6c00ce43983e8155f46f24741eece3)
Since C++11 unions can store types with non-trivial special member
functions. Remove the inaccurate paragraph from the documentation.
Change-Id: I2d2fa7e69da5e30f29e19b39a67a5fc28c250acd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ad080afa7fb00b0672e51e8315596d4540107d64)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a7efe339e7e1297017a075a1efa4e2340d3a8eb1)
(cherry picked from commit c3378e0ef18c1cf76995454c75f132c9b5408883)
It can be quite confusing to find out that fontItalic() == false
but font().italic() == true, or vice-versa.
Or worse, the fact that fontPointSize() returns 0 if the size comes from
the default font.
Fixes: QTBUG-49564
Pick-to: 6.5
Change-Id: I05239ed80e82080ea942524f289b953f806c8196
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 1447c303b1b7b27bf0f9b20362a26c7b91749346)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5d72729168c69f5bb92386d5b3f7929e5b19768a)
(cherry picked from commit 0228d58840ec98591407306cf0b753a1e0c9caa4)
The usual whack-a-mole: libstdc++'s std::optional implementation like
to throw a -Wmaybe-uninitalized warning when the default ctor is used.
Says GCC 15 (kinda cryptically):
In function ‘constexpr void qt_ptr_swap(T*&, T*&) [with T = QFileInfoPrivate]’,
inlined from ‘void Qt::qt_ptr_swap(totally_ordered_wrapper<QFileInfoPrivate*>&, totally_ordered_wrapper<QFileInfoPrivate*>&)’ at qcomparehelpers.h:1145:18,
inlined from ‘void QSharedDataPointer<T>::swap(QSharedDataPointer<T>&) [with T = QFileInfoPrivate]’ at qshareddata.h:97:18,
inlined from ‘void QFileInfo::swap(QFileInfo&)’ at qfileinfo.h:62:17,
inlined from ‘QFileInfo& QFileInfo::operator=(QFileInfo&&)’ at qfileinfo.h:59:5,
inlined from ‘constexpr void std::_Optional_payload_base<_Tp>::_M_move_assign(std::_Optional_payload_base<_Tp>&&) [with _Tp = QFileInfo]’ at optional:193:19,
inlined from ‘constexpr std::_Optional_payload<_Tp, true, false, false>& std::_Optional_payload<_Tp, true, false, false>::operator=(std::_Optional_payload<_Tp, true, false, false>&&) [with _Tp = QFileInfo]’ at optional:442:22,
inlined from ‘constexpr std::_Optional_payload<_Tp, false, _Copy, _Move>& std::_Optional_payload<_Tp, false, _Copy, _Move>::operator=(std::_Optional_payload<_Tp, false, _Copy, _Move>&&) [with _Tp = QFileInfo; bool _Copy = false; bool _Move = false]’ at optional:458:26,
inlined from ‘constexpr std::_Optional_base<_Tp, <anonymous>, <anonymous> >& std::_Optional_base<_Tp, <anonymous>, <anonymous> >::operator=(std::_Optional_base<_Tp, <anonymous>, <anonymous> >&&) [with _Tp = QFileInfo; bool <anonymous> = false; bool <anonymous> = false]’ at optional:535:23,
inlined from ‘constexpr std::optional<QFileInfo>& std::optional<QFileInfo>::operator=(std::optional<QFileInfo>&&)’ at optional:778:11,
inlined from ‘QDirEntryInfo& QDirEntryInfo::operator=(QDirEntryInfo&&)’ at qdirentryinfo_p.h:24:7,
inlined from ‘void QDirListingPrivate::advance()’ at qdirlisting.cpp:360:30:
qswap.h:32:9: warning: ‘*(QFileInfoPrivate**)((char*)&<unnamed> + offsetof(QDirEntryInfo, QDirEntryInfo::fileInfoOpt.std::optional<QFileInfo>::<unnamed>.std::_Optional_base<QFileInfo, false, false>::_M_payload.std::_Optional_payload<QFileInfo, false, false, false>::<unnamed>.std::_Optional_payload<QFileInfo, true, false, false>::<unnamed>.std::_Optional_payload_base<QFileInfo>::_M_payload))’ may be used uninitialized [-Wmaybe-uninitialized]
32 | lhs = rhs;
| ~~~~^~~~~
qdirlisting.cpp: In member function ‘void QDirListingPrivate::advance()’:
qdirlisting.cpp:360:30: note: ‘<anonymous>’ declared here
360 | entryInfo = {};
| ^
To fix, use the std::nullopt_t ctor instead.
Three year old list of upstream bugreports:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100115
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102801
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105749
IOW: they (still) don't seem to care much.
Amends c39a0d1e89.
Change-Id: I6c724142116f78f0ba8ed311f46b80091e995d74
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 6eb65b75fe3cbc0ea7092f80b5a1d7280400e2a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c101e4abe5e7d9d538bf6cd1f1f16ee3de48437f)
(cherry picked from commit 8820a62ca3b20537cba79b262f3df93d03f54c8a)
It was missing from the original commit in 6.8.
Amends 21dfb0ebcc
Change-Id: I482a621ecc1a04e3f3ce9ba37c7a1ad22e140ce9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7482efd17196e3686075213701423667c0bf198f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6f9c34317e15b4e0e67d780d6a06cb97d8736f5b)
(cherry picked from commit 8bd21ecca92b6a388569b8a5b385973ba90b50ae)
The QStandardPaths class provides access to OS-specific standard
locations on the filesystem, and also allows to search for files
within the defined directories. Other parts of the application
should be able to rely on the results returned by this class. Bugs
in this code can lead to severe issues like overwriting of user files,
reading configs from an incorrect place, or loading an incorrect
external code for execution. Therefore, the respective files are
marked security-critical.
QUIP: 23
Task-number: QTBUG-135187
Change-Id: Id1a8189f2a7cde4a760446428551f2fe682d4073
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f10e599e3f6e5c77890281b44fad996542d60fca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 594012d43992da611218a22c9ab88753f0b092e9)
(cherry picked from commit 8458767d5619468a2d0fc414a8ac2c809a04dc40)
This class and its backends are mostly forwarding data without
inspecting it.
Qt still does some parsing itself and it has to interpret the
answers of underlying calls correctly. Therefore the QFSFileEngine
implementation is marked critical.
The iterator and the header files are marked significant.
QUIP: 23
Task-number: QTBUG-135187
Change-Id: I8ba5583fd044889b288174d02a8ac80583e52873
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5bd58d67c14ac765a2a0abb7d5dbb499ac60f13b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 259a3e29b7146c9889e02538f6ffd5875579cd5e)
(cherry picked from commit f8817a0c6809dfca44a3ae424b65b85faa9c7823)
The qquaternion.h include will vanish from qmatrix4x4.h soon, but some
TUs depended on on the transitive include.
This patch includes qquaternion.h into all TUs that use QQuaternion,
but didn't include its header.
I didn't check all the individual TU's history to make a detailed
"amends", so I'll just pick this all the way back, knowing there may
have been more users in older branches, or some TUs don't exist there,
but it since we're not picking the removal of qquaternion.h from
qmatrix4x4.h further than 6.10, I don't need to do detailed
checking. CI will tell me when something's wrong.
Pick-to: 6.5
Change-Id: Icf0db8ba4f12421fd46f9d1041f235bf4cc2c12b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bd1fa8379cf17db80228c89293ee5aa7152b3a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bde0dd48e2c1354c9a6ba88b719109ad9e5656b0)
(cherry picked from commit d1c6073837e346606eff980572be14e7d85b0e8c)
The implementation of match() was only looking into the source model,
without considering the fact that data() could be reimplemented in
a QIdentityProxyModel subclass (a very common usage pattern for the
class, part of the documentation).
The simplest solution is to let the default implementation from
QAbstractItemModel do matching the usual way, calling data().
Fixes: QTBUG-78013
Change-Id: If984ffa5f8dbdfe9a76eaec8b82648d705cfecd4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 729ee33a881cc4a829bacc75e323c3bedadf6f0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 861a8fbdcfccda76238c7f06d2e31dc02ee8f2a3)
(cherry picked from commit ede6826dab29e85fbb57f314c39c9d0e8e012e14)
When a new screen is attached Window might move windows to the new
screen automatically, in which case they will get a WM_DPICHANGED
event. But at that point we have not received WM_DISPLAYCHANGE yet,
so we fail to reflect the new screen's DPI.
To account for this we explicitly check for screen change after adding
a new screen.
Fixes: QTBUG-125319
Change-Id: Ic854fe9f9ae52f53bb34cb8434111a6a1ba032d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 78a0018c86b98a63ccb13f61d4a33e94c3f053cc)
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The function is no longer overloaded. getEulerAngles() used to be
called toEulerAngles() (88142e73d5), but
was later renamed to the idiomatic get-prefix
(1872857ca7).
Amends 1872857ca7.
Pick-to: 6.5
Change-Id: Ibc71635aa836e9c33fb2b88ce30cc7a35fbf1291
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 515ea07e40c692dc502bc4c9e960feb7f9eca40e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4941e8a79507eebbd73185fbaf555093c77904b4)
(cherry picked from commit feafb490fbe63b170472834f35b98e1f7de52f7b)
The fromEulerAngles(QVector3D) function is and will stay inline, as
it's just forwarding to the (float, float, float) overload of the same
name. So it needn't be, and shan't, either, be exported come Qt 7.
Remove the QT7_ONLY export.
Partially reverts / amends f9f1272e7c.
Change-Id: I8ed0054ca89ab04ef0b06bea953473e91789fda6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e8f596785e28e3bfbe0d47a329a445bc29415488)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 564851b55f23a0d1659b03dbce27e9a9ae5afee0)
(cherry picked from commit c6ca7e80d35bd92ffdb63f230f12ad18849fcd59)
As a drive-by:
- replace direct by copy initialization and reflow the line with the
ternary
- make objects const
- don't compute the cross product twice; it's anti-commutative, so if
a × b is 0, then so is b × a = -(a × b).
Amends 95d034a14f.
Pick-to: 6.5
Change-Id: I4dc4582854b3d93a6e3468e8b19afe28d77c6c1c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 10d46c19c5be3430415eeb8463f1853e3b838683)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 462379f08dda96216ccc75e5c91361eb459d926c)
(cherry picked from commit 63aca282295f212cc91920b09b7ce639cb0a55e1)
It's easier to comprehend what's going on, because there are quite a
few different ones here.
Exception: if the #if block contains only very few lines (max four or
so, didn't count), then a naked #endif is ok, and arguably easier on
the eye, so leave them in that case.
Amends the start of the public history.
Pick-to: 6.5
Change-Id: Ib1b27859344916caa17dc1ff0010b6b10d34bb13
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d9e77680600de1bdcd8009c6a2cfdf82de2085fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1cf2fffee41fdb00deb52e2f330a9fca10e95734)
(cherry picked from commit 595c9956d59a8a57b729efbb22d442787bccc4e9)