The test function casts QMessageBox::StandardButton variables to
integers, to pass them as arguments and verify expected buttons.
In case of a test failure, this makes it hard to figure out, why a test
was failing.
Add a local macro to cast int values back to the enum before calling
qCompare(). That way the enum keys will be displayed in the logs.
Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I23e766d5026cff3e4775db56e58f808809709e4c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fd710fbba3d24f6192625f586eea57309630f8ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were reporting the correct url, but saving to the
root of the file system.
Change-Id: I3e1fd63efb77dd75ccf7a8f44a3211965fe11be8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 5b53f9b3f8e5f0b642e9e9c48cd7574f23e77233)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
getOpenGileContent() takes a parent now, and the compat
API is behind a QT_WIDGETS_REMOVED_SINCE(6, 7) which
the manual tests can't access.
Change-Id: I81784baed178bb8efd1a848d32c9ee4510971e26
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 63a00ef2c09f11c9aec291cf1ab0f01d13b840bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Verify that the file is saved correctly to the local
file system by loading it and printing the sha1 of
its contents.
Also add indents in order to improve legibility. The
output lines should now be correctly nested.
Change-Id: I698c016253656aef29f04129da5f01a9dc35191e
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit a2294287ad3edd729f165280a71b8dd7a5345b1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The XDG trash bin code in 6.7 onwards doesn't compile because VxWorks is missing the POSIX at-file system calls and we're working with WRS to find out more. Currently there is ongoing request to add this and more POSIX system calls.
Task-number: QTBUG-115777
Change-Id: I83fd2ab7130362c06c694195e7b33b6ba8011101
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9735b105588d74c47d4195d367bcac89d3472643)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function definition at the location of the documentation is not used
on Q_OS_DARWIN, so qdoc cannot tie the documentation to it, leaving
broken links and qdoc warnings when building the documentation on
macOS.
Fix this by explicitly specifying the function that's being documented.
Change-Id: Icf2ad1eba9e9ec8cbeea3818b414f740fa31083f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit f63e5318261de755dfeb3d8faedc52333a37c96d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test renders QCalendarWidget, which ends up in the QStyle code
eventually. On macOS we use a CGContext to draw the native style,
into the test's image/paint device, but CGBitmapContextCreate does
not support QImage::Format_ARGB32. It needs either a premultiplied
alpha, or no alpha at all.
The unification of the palette for the calendar, as is done for
Windows, is also needed on macOS.
Change-Id: I5b26e5434b84e4b14eb8784875b76810e0a14230
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a5292ad2f58252f392ad272f8c99a31c43d175a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Prepare mode, "buf" is a null pointer. We never dereference it, but we
still compute an offset from it to obtain a pointer to a (then unused)
QMetaObjectPrivater.
clang's UBSan complains about this, so initialize the pointer to nullptr
instead when in Prepare mode.
Pick-to: 6.6 6.5
Change-Id: Id9d78058f72bb1b44440d07f565374f3eb3c20fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d3d224f546d933acef53f7592fea7d69072f7d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's a shared list that, in theory, can be written to by multiple
threads. Protect it with a mutex.
To make the change in a clean way, move all the .contains() checks
into a separate function so we can simply hold the lock in there.
Pick-to: 6.6 6.5
Change-Id: I99ff185346d52e43a3f59f2910a7b2fa6031e3e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit c60db318836cf22b0f00b78ea189ba33fcf7b1c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Update m_active early during DPI change to make scaling
calls made during the DPI change use the new value.
The existing call to updateHighDpiScaling() in QGuiApplicationPrivate::
processScreenLogicalDotsPerInchChange() is supposed to
take care of this, however that call is made after
the geometry change event is crated (with incorrect
geometry)
Change-Id: Ia0f6006c90355ec69ef92b88a020089ab21e072d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 454068232eae457c8f62f94b70e17b0ef8b7a74a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As described in Apples documentation, own methods which are added to
existing classes should be prefixed to avoid category method name
clashes. This prefix was missing from the function
currentFirstResponder() which caused issues when closing the virtual
keyboard on some iOS devices.
(see https://developer.apple.com/library/archive/qa/qa1908/_index.html)
Pick-to: 6.6 6.5
Task-number: QTBUG-119601
Change-Id: I82fb8a8beeb0a3234594357f1e1db67b0ae3da36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e51b2d70de65f2ac674afb9c7da2a10c7067f142)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The compiler knows how large the array is, so pass the size and drop
the terminating null.
Change-Id: I5795c89834b8395f04d1777d737d080f19be2a21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
(cherry picked from commit a73f10aee422bbbee22c63ff1c436cb3193938e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the USE_XCB_<component>_STATIC switches that force using the
static versions of xcb components if necessary.
The xcb components needs to be built with -fPIC option, to make the
static linking possible.
When Qt is built staticaly USE_XCB_<component>_STATIC needs to be
passed to the application command line, since in static case xcb
libraries are resolved and linked when configuring application, but
not when building Qt.
Pick-to: 6.6 6.5
Task-number: QTBUG-120769
Change-Id: I274e9cf4a6a111dc87ad84bb7f49cad76a3d364a
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 6ce6ff1c529a7a4a09f211980cc749c2b3aa0dab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Silences clazy-copyable-polymorphic.
The Q_DISABLE_COPY_MOVE() disables the implicit default constructor,
so bring it back with =default.
Amends aa8393c94fea01a4806b204fd3aa343a4e90666b.
Pick-to: 6.6 6.5
Change-Id: I44f0b19208d3865fb84e277bcaf65d7f4541d368
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b211d8a8c0196a96b2aa324c9e3d991ae378c7f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix the coding style to match the current Qt style.
Fixes: QTBUG-68661
Fixes: QTBUG-120909
Change-Id: I314ca9da8a03727e3e0336a23fce1ce9d065d3a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2690822428deec4f0c08f4d118d69a7c6036369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtWidgets][Deprecation Notices][QCheckBox]
stateChanged(int) has been deprecated in favor of
checkStateChanged(Qt:CheckState).
Found in API-review. Amends 5a96d13bb5abd5339cf21dd1de7a17152c71f0fc.
Change-Id: I6ff4aa38c2f43622ba4b127420aff83790785455
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3512fb1ec5ff088772170540c4e91b1886fbea45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The problem with the QTestPrivate::testAllComparisonOperators() and
QTestPrivate::testEqualityOperators() functions is that if they fail,
they point into the helper function, but not into the actual test that
called the helper function. This is specially annoying when some test
calls the helper function multiple times.
This patch introduces the helper macros QT_TEST_ALL_COMPARISON_OPS and
QT_TEST_EQUALITY_OPS that wrap the respective function calls together
with the QTest::currentTestFailed() check. If the test has failed,
the macro generates a meaningful debug message with the original file
name and line number.
This patch also applies the new macros to qtbase.
Task-number: QTBUG-119433
Change-Id: Iad709de45e5bf53c82e7afa8e9f51e9275c1e619
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 1353c6f85757ad9d9f77bc754bf16c7fb185df00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When qfloat16 uses float as an underlying type, the operators cannot be
constexpr, because operator float() is not constexpr.
However, operator NativeType() is, so we can make the relational
operators constexpr when we are using a native 16-bit float as an
underlying type.
To avoid code duplication, introduce new temporary macros for
constexpr and Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE.
Extend the tests to verify that the operators are constexpr when
native float16 type is used.
Task-number: QTBUG-119433
Change-Id: I001b087d78c398c71b71a504b65c316199dd4792
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cfc385ce3fc674d48ea2bfbaac6d3f907795b1a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've previously used the zip-file form, but that's not been published
for CLDR v44.1 - the advice on the list was to use github
instead. That, however, has ↑↑↑ as a special value for fields, meaning
to inherit from a prent locale. So special-case that value. I have
verified that v44 from the zip file produces identical results to v44
from github, with this minor fix. As it happens v44.1 also produces
identical results.
Pick-to: 6.5
Change-Id: I6eb0aedda7556753cdc83bb9d76652fbb68dc669
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The constructor and update() method for the system locale were using
GetUserDefaultLCID(), where query() and the fallback locale first
checked the LANG environment variable, leading to inconsistent results
if the user set the environment variable to something different from
the system's configured locale.
Break out the logic of parsing %LANG% into a static helper, replace
the existing parsing with a call to this and add a helper to get the
right ID to use, possibly via it, using GetUserDefaultLCID() as
fall-back. Drive-by: initialize substititionType in its declaration.
Also look up %LANG% each time we want it; it's not that expensive,
given how rarely this code is called, and client code could change its
value at runtime. Partially inspired by a patch from Wladimir
Leuschner <wladimir.leuschner@qt.io>
Pick-to: 6.6 6.5
Fixes: QTBUG-120961
Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcd2a219c4c222309152f1ea2a3124ddc17d4ea5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This flag should be set in order to opt out of that Qt Quick Layouts
takes implicit (built-in) size policies into account, a feature that was
introduced in Qt 6.7
Task-number: QTBUG-117597
Change-Id: I206cd61534b2103b2c3a9b4abc97fec8c88799d1
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 4ae537e67c99160f5dcac99f40d03a7921456556)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
4c60a11d8f935abb762a83b0ab99cefa6db3060c had to be reverted, because it
broke restoring the state of hidden, floating dock widgets.
Extend tst_QDockWdget::hideAndShow() to test this functionality.
Blacklist test function on Apple, because Apple machines on CI show
dock widgets with the main window.
Task-number: QTBUG-120191
Change-Id: Ibc6121a99f15f33d62ca0a9376dbe9fafbe20290
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3195e34742731406a923b545bd85a5a33e970a42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This partially reverts eb0abd9789062d95bc62dbbc29b2038dc40472b1 so we
depend on __SIZEOF_INT128__ in this structure, not on QT_SUPPORTS_INT128
so the Id128Bytes union has a quad-word integer as a member at all
times, even in QtBluetooth's removed_api.cpp.
That's required because on some ABIs, the presence of this member causes
the type to be passed differently, usually in registers (we fixed the
stack problem with the alignas(16) in that commit).
The "Itanium Software Conventions and Runtime Architecture Guide" did
the same back in 2001; section 8.5.1 says integers from 65 to 128 bits
are passed "Next Even" and so are aggregates with alignment of 16 bytes.
This rule seems to also exist in the AArch64's AAPCS64[1], which says,
in rule C.10, that the type should be passed in even registers:
C.10 If the argument has an alignment of 16 then the NGRN is rounded up
to the next even number.
(NGRN = Next General Register Number)
It's unclear whether this applies to the union type as a whole or to its
individual members. If the latter, then Clang may be buggy.
[ChangeLog][Important Binary-Incompatibity Fixes] The QUuid::Id128Bytes
type had a loose definition that could cause it be passed incompatibly
between functions, in some architectures, depending on whether GNU
extensions were allowed. This is now fixed, but may cause code compiled
with Qt 6.6.0 and 6.6.1 to fail when recompiled with 6.6.2 or later.
[1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#682parameter-passing-rules
Fixes: QTBUG-119248
Pick-to: 6.6
Change-Id: I6e2677aad2ab45759db2fffd17a86a208f788cb7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6f9db71154662a648f19a86ca86585eddbe2f9ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QDeferredDeleteEvent was declared in qcoreevent.h, it
had Q_CORE_EXPORT. After moving to qcoreevent_p.h, it changed
to Q_AUTOTEST_EXPORT. The correct macro should be preserved.
Noticed that this change was needed to make GammaRay work
with Qt 6.7
Change-Id: I6fab494d9f60b1261edce6f326a3b96467ff7da1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit bc3b18764aabf95a50a65e090863c54b6ac57e3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a function template defined inside a namespace, `static` makes
no difference here.
Change-Id: I2eb52b4fb4432c269b2449ae37550bd0be0dbbce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 85108e1938fad7b6ca1ce267fb10cda5933dbc50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The static function appeared in two places, and in a unity-build
this fails quite visibly.
Change-Id: I60000d01194a2c79ca9c101f2a6d3f77f469f1a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
(cherry picked from commit a3a48815cc9430d6f5c736a312ea4ea5c0895205)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit ca2f46c04c26ed4649cb6c2c62d3b2e52cd8d5ad.
Reason for revert: <BIC in 6.6 found by Marc Mutz>
Pick-to: 6.6
Change-Id: Ia5b8849e55ebccb514bc753ce1d31855d91e2406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b148a362c36a9b34b0c21c60530353d6bf6b92cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QMultiMap is used, while only qset.h is included.
FTBFS w/o precompiled headers.
Include qmap.h as well.
Pick-to: 6.6 6.5
Change-Id: I5f6e1d204bfa94cc6a81f6883c7a7b0ee1e9963c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 84b792fa98b3a21119f16b0cd9443f90b1ad504d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The CHECK_SINGLE_OPERATOR macro is used inside FOR_EACH_CREF macro,
which, like all other FOR_EACH_* macros in Qt (see qdebug.h or
qmetatype.h), expects its parameter to have a scope or a semicolon.
All other CHECK_* macros are *not* used inside FOR_EACH_CREF, so
they can follow a more traditional approach with the
`do { } while (false)` scope without a trailing semicolon.
This allows to use them in the code like:
if (condition)
MACRO(args);
else
OTHER_MACRO(args);
In the example above, if MACRO ended with the semicolon, adding
one more semicolon would have discarded the else part of the
conditon, leading to compilation error.
Amends bfb237d19a5319bfa020ad0cefaff72e8d94a9be.
Task-number: QTBUG-119433
Change-Id: I9a7f17416ba7c37a50f022f685b54e2643e4a9e2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ecafbc4d5d9a4c12f44de856dec544404c633a6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apply some documentation improvements that were suggested before FF.
Task-number: QTBUG-119433
Change-Id: I9b1d83c69821e25ae4cd8db0cbf3fa6d6330a6dc
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit aae6cf8d15837c9a29503d5fdeceb2a4b5befc55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake has a built in file extension list for "Source Files", that does
not include qml files. We can't extend that file list with a regex,
so we need to add qml files individually as a finalization action.
We also stuff generated files (both auto-gen as well as other generated
files) into a separate source folder, to focus the project on the user's
files.
Change-Id: Ic9a4d9daad088b1874bcf81e75c776537f3ff531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 06ea3e3994b38e5fe9ac4f33044b0efa1f1be294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't always pay to be explicit about SMFs. In the present case,
clang-tidy complains that the move ctors of the class aren't
noexcept. It's a false positive, but just removing all the =default'ed
SMFs makes it go away, too.
Amends 0dba3f6b713a657eb3bf2037face72d16253eb92.
Change-Id: Ib641d4eed9e214b41c143b60494e82790da6fda8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fab57c25e22239516dec737f2d42a7fccae9d37f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We do have special macros for this case, so use one of them!
Amends c2956f8f7685b624d7693ff644125d0f594c585d
Found in 6.7 API review.
Change-Id: I205966d6f7363abf1a26f59b04555b1a48a4e696
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 26b8e99b1ce616a063fcbd0d67f44ba9e7712f23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 4b6f757020382ed157bf6beb572549f05e881359
Found in API review
Change-Id: I9154c6ad0236776054816bcdde03737290a633ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit edf92b8e33f896c764c8aac549385f6e46571a0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously we would more or less wait for the first connection to finish before
initiating more connections. This was just happening by virtue of
calling startNextRequest when a request was finished.
Since we have already determined the preferred network layer, let's just
try to start more connections. In case we are using https this doesn't
make a difference because we will try http2 upgrade first before allowing
multiple connections. Unless, of course, http2 has been disabled.
Fixes: QTBUG-120619
Pick-to: 6.6 6.5
Change-Id: Id3c3be59fd07120bff574d63481119e5ed9eb88a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 88f5fc47ebf558fa72b7b447f8394a0d44b6bf9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Spell out some API names in enum.
Some functions are now protected.
Remove property for autoRenderTarget.
textureFormat -> colorBufferFormat.
Used "fixed" instead of "explicit" and follow
the above naming, so that explicitSize becomes
fixedColorBufferSize.
Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit acebb97b58807d1d5910c79209664b21e741a9c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Says clang-tidy:
destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual
in file:src/corelib/kernel/qmetatype.cpp line:966 col:14
static const struct : QMetaTypeModuleHelper
Yes, these classes are polymorphic (because the base class is). Yes,
the destructor is non-virtual (because the base class' one isn't, but
it's also protected, so fine).
But these classes are not used as base classes, so suppress the
warning.
Pick-to: 6.6 6.5 6.2
Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 11d153ae1ce3ce75e76a1fcac7bf99e4cff05716)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise clicking an existing file in the dialog will not populate the
full file name, which is what you'd expect for a filter allowing all
files.
Change-Id: Ib9a014352d5e567e54f95414e744566615d735d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c53955eaa085b14ef8e5348e951f8cd2cbfa4ea5)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We can not guarantee 128bit alignment on 32bit windows
Change-Id: I16bd3bded16bd29f4cb84b0cdf2671e4d9a19601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0e8086887a2c931dc687b3c344ab5004749fa3eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindowsFontDatabaseBase::invalidate() was defined inside an
the declaration was not.
Since the font file loader is only protected by
QT_CONFIG(directwrite), we move it out from the previous block
and add an #if for the contents instead.
Change-Id: Iedc02cceb15fe3d25d21b49af1486659a4d6373b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0d1ac449bbc38aee4341dd47189de901860d7870)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All that is required is that we write the declaration as if they weren't
inline, like we used to for C++98 non-constexpr static members. Amends
090991123dd82796fe956e4153bc26ace22280ca.
This is required with MinGW and happens with both GCC and Clang: when a
static constexpr variable found in an exported class is used in a
context that requires getting its address, the compiler emit a DLL-
importing statement. For example:
void f(const std::chrono::milliseconds &ms);
void f()
{
f(QNetworkRequest::DefaultTransferTimeout);
}
Emits with GCC:
_Z1fv:
movq __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
jmp _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE
And Clang:
_Z1fv: # @_Z1fv
# %bb.0:
movq __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
jmp _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE # TAILCALL
Fixes: QTBUG-121135
Change-Id: I76ffba14ece04f24b43efffd17aae1a98071c570
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c09219e946ed3d90349c3638afe304553bf38011)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a QFont is moved to a different thread (B) than where it belongs (A),
and the font cache is then purged on thread A, the last remaining
reference to the engine will be on thread B. When this QFontEngine is
later replaced with one created on B, we end up deleting A's QFontEngine
on thread B.
This caused QFreetypeFace::release() to be called on the wrong thread and
the face would never be removed from the thread-local Freetype cache in
A. Hence that cache would contain a dangling pointer to the freetype face
which we would later end up fetching.
To avoid this, we make sure the thread-local cache itself increases
the ref count of the face. That way, the only time it will be deleted
on a different thread is when the cache has been destroyed because the
thread has shut down.
If the last reference (except the cache reference) to a face is cleared
on a different thread, we keep it in the cache until later. It will
then be in a "deferred delete" mode and will be deleted as soon as
possible. This is done either when the thread shuts down, when a lookup
causes the "deferred delete" face to be returned, or when release()
is called on any font on the thread (at which point we will purge all
faces that only have the single cache reference.)
Fixes: QTBUG-118867
Change-Id: Ifa07a9cb6f4cd3e783e12a73d8b283e70d6fb474
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5761dd55c824afb7a7809c7a0d3ce3050b03fe7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the QT_SUPERBUILD procedure when configuring the qtbase
documentation-only build. This only makes sense for qtbase since we
disallow building it using existing Qt installation. Other repositories
should be configured using qt-configure-module script from the existing
Qt installation and simply run 'ninja docs'.
Fixes: QTBUG-120485
Pick-to: 6.6 6.5
Change-Id: Iafed5c17bea5c61edc239f08045922497215fb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 02a556674f0b3f04de5ab09dca53ed8e86a8ba06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>