Swift 5.9 includes built in crash reporting, printing stack traces,
libraries, and registers to stdout/err.
https://www.swift.org/blog/swift-5.9-backtraces/
As (Core)Foundation is written in Swift nowadays, we get this feature
for free even in our "C++" apps, as we always link to CoreFoundation.
To enable the feature the binary needs the com.apple.security.get-task-allow
entitlement, so we add it for all our tests automatically.
The final piece is to run the tests with SWIFT_BACKTRACE=enable=yes,
but we'll do this in our CI provisioning, as setting it from within
testlib doesn't seem to work.
Change-Id: I31090efee06460f45522093e17f900e76590b282
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9bebdc97f161cc58461530fa0171e0defc6cc1ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b04935ed9f72d63304e0ac83a50a2f232076ae17)
When using qmake to build a user project on macOS, the Qt headers are
included with the -I option, rather than the -isystem option. This
means that the compiler will not silence warnings that are generated
while parsing Qt headers.
If the user project compiles their code with the
-Wzero-as-null-pointer-constant compiler option, this leads to
warnings like:
/QtCore.framework/Headers/qcompare.h:226:78:
warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
friend constexpr bool is_eq (partial_ordering o) noexcept
{ return o == 0; }
^
nullptr
Fixing qmake to use -isystem instead of -I is not trivial.
We already silence these warnings for gcc in the header file.
Do it for clang as well.
Amends bdd41f491c
Fixes: QTBUG-132581
Change-Id: I7883248b7be548580a03333e76620ac10f57733a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0711eb60716b53dc86cacb2fc19b72aa4ffee3d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fa8effc7da2417f6ccaca923bd1b2c376f63ac38)
Decrease the bottom line frame thickness for QToolButton by using
fractional coordinates.
Task-number: QTBUG-132261
Change-Id: I77a3acdd20c694dce38d809db9c3051949a98fa3
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3e9baca7d2197bfc10d20de6f326e2749a8f781e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f8adee805b9cb673ed66ffa22f5bb1896439e6b3)
QException has an out-of-line destructor in order to pin its vtable.
But like any std::exception subclass it's meant to be (and effectively
is) copy-constructible and copy-assignable (cf. [exception]/2).
Add the missing copy operations, and the default constructor.
One may argue that this class should use some other approach since it
also has a polymorphic clone() -- for instance disable assignments and
make copy constructions protected -- but that ship has sailed.
This prevents a Clang warning about the deprecated copies in the
presence of a user-declared destructor.
Change-Id: I4d8613ade265ea85a5a7e97255b75b7fcf3e5a27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 793309693aac24e7f88fc225408d92def638996e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 37a553a3a51cfe58b73083432634ba4235401b10)
Increase the size of QComboBoxSize and align the subline for editable
QComboBoxes with the begin end end of the rounded corners.
Task-number: QTBUG-132261
Change-Id: I235ec1ceb94a5e87f373b007ac31d0d8a83cf600
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 23c16c611cfeee55ce38e928989b346c697270b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 840cf0a43a3242c7e5fd6769efe37c5d6e3b400e)
In preparation of adding QT_NO_SCOPED_POINTER, which would be rather
pointless for users if public headers continued to mention the type.
Task-number: QTBUG-132213
Change-Id: Ib5a40a1b8defe1cfe858218bb25c422f900dfe6b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c5a4e3f790eb4157e33eac2402110f71a76a5418)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2c4756af80226ce1354c18ecba0da5875fe7106e)
When installing a top-level build using the DESTDIR env var mechanism,
the SBOM generation process could not find the qtbase sbom document,
while generating the qtshadertools document.
Make sure to prepend the DESTDIR env var to the install-time install
prefix, when looking for external SBOM documents.
Fixes: QTBUG-132188
Change-Id: I1cdb75842fc552b43d982f05444b5ddc1fe58595
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f2ce68d8f31f4c90471183d66075bd6fd5955d6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0e14e9042d5f9237cff14584b7a3c814535a5544)
Calling reset() with the owned handle should maintain ownership and not
leak resources. Move assignment should also handle self-assignment
without leaks. The new tests verifies that this holds true.
Task-number: QTBUG-132507
Change-Id: Icdfa4d67b06b71a74e810593e57449b51982c98c
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
(cherry picked from commit 03bd9491491881529ad28cd6d672edfdda9a0065)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 33f37ff6376835dc8add4e5d8273f3dc5e7b086d)
The message displayed to the user says they need "at least Visual Studio
2019", but in reality the minimum is now 2022.
Amends 9a409295c7cfe74b4fb6b1892f4ff86d4f3c23f3
Change-Id: Idaedd72d114b994fddd2ba7574fb7a45ca0a3e85
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 652250295c7f9812b49c522ab2fbe518ac9690e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0ce8e1db2bae8dc5da1b4ee3ae55fc5115efa491)
Commit 6ebe3d0f08 introduced extra
SFINAE checks on the template conditions.
However, it broke the case of using callables with deduced return
type, because SFINAE does not work for such conditions and treated
as a hard error instead.
Fix by explicitly providing all template parameters, so that compiler
could figure a better overload on its own.
Only QtConcurrent::blockingMapped() seems to be affected, but add
unit-tests to check all other methods as well.
Fixes: QTBUG-130766
Pick-to: 6.5
Change-Id: I1ddbe712d8ce04ac96ba13841cb569d728cfb943
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
(cherry picked from commit f73765682e7c8f1e0e78b7464deec57c7f2669ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7b356f0f31e3bbfaeed25dd338c9c9c6d3c3f2c4)
Handle traits should be simple, and not require exceptions. Note that
we should not make calls to fclose() or close() noexcept, because these
are POSIX cancellation points.
Change-Id: I8bbf573b1346eafd52c6080dbb024f8b3bc89359
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a80d1bf2716b1ba404799d6a09003b145b73b079)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 64c5043a40c061c5910d755752bcc3f776298cf4)
qopengl.h pulls in headers from the OpenGL framework on macos when
opengl is enabled. We should therefore also link the OpenGL framework.
fixes linker error in libqcocoa:
Undefined symbols for architecture x86_64:
"_glGetIntegerv", referenced from:
QCocoaGLContext::updateSurfaceFormat() in
libqcocoa.a(qcocoaglcontext.mm.o)
"_glGetString", referenced from:
QCocoaGLContext::updateSurfaceFormat() in
libqcocoa.a(qcocoaglcontext.mm.o)
Change-Id: I02d2c80e2652da0cf16eaca7ab161cf711599dc2
Pick-to: 6.5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6f41c1652f73e1d79d6a4a91d009671a1e285b15)
(cherry picked from commit cffb015be5811eea5869d5f4ab5708ca692ff258)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Handle traits should be simple, and not require exceptions. This patch
will allow us to improve the noexcept correctness of QUniqueHandle.
Change-Id: I84d92818a2fcea5b98e09c0b7dc08b251751396c
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
(cherry picked from commit 3c57c7357422bdfda60f56901a7590b258915b6b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8adfacca6184d439c5febd71a6c78db3edce87c6)
On monitors where the subpixel arrangement is blue, green, red,
our DirectWrite rendering would give the wrong subppixel
antialiasing, causing color fringes on text.
Like we do with Freetype, we determine subpixel arrangement of the
primary screen and use this as the default.
Change-Id: I9ce7025449106a2376bd0ed02ce07b59c79438bd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit d5cef74d8d71458500f979c0d31a7241b3fef9db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 501f78855e9a2212cd8c9a9f50c1728e9e945f2c)
This can be tested by enabling "Don't keep activities" in the developer
options. With this option Android will immediately destroy the activity
when it is moved to the background. In this case registerBackends will
be called the first time before the BackendRegister was created. Because
m_backendsRegistered was set to true even if it failed, the final call has
no effect. So we need to ensure to set m_backendsRegistered only if a
BackendRegister is available.
Fixes: QTBUG-132085
Change-Id: I2ea1c0e0737c982594ceb06cbaf540399c45e3f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9903242ecab82c1ed72dcaf90e90a171c942a84a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 850ed0222f8ff1808ad5508ccf4bc6bfa78d061f)
Set the <package>_FOUND variable to TRUE by default, so the follow
logic that need to change the flag only need to take care about
setting it to FALSE if something exceptional occurred.
Amends 8d0283ad2cae3d8fbd4b1b7ee5c6454f7fcc079c
Pick-to: 6.5
Change-Id: Idd4407ea77e81703b5fa8cc5efa8c52b53d401ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 13608241793f6671500868c9ce96468f604f651e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d83081c78e96aa493727159f1a3fedeaf4a3b812)
This does not change the behavior of release() but gives more
compact code.
Task-number: QTBUG-132507
Change-Id: I5b34c80409ca0e9e9a5e9aee9ef7bc80017610af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ec0c62385e0df00f42bc9fb5e117cb8b994cfc96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b72c4988fbfbc9b695601e4ce266e8a52c264d73)
cmd.exe has a huge problem when running the batch scripts locating
by paths contaning spaces and more the one set of quotes in arguments.
This can be worked around by using the 'call' command as the test
command runner.
Fixes: QTBUG-132258
Pick-to: 6.5
Change-Id: I9b6fb0f8bccf44456e4cb9b79f3c6bd3f9fe4678
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 10a3859809fc0b6e1edd6cbb93e409f0513a9bbe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ee533138d8e2eddf38a1768913b3a1a1192a3213)
It's more efficient (doesn't need to allocate the QSignalSpies on the
heap) and makes the header fit for the upcoming QT_NO_SCOPED_POINTER.
VxWorks seems to have a problem with its std::optional implementation,
though:
QWARN : tst_QAbstractAnimation::stateBinding() Trying to construct an instance of an invalid type, type id: -2125884168
QWARN : tst_QAbstractAnimation::stateBinding() Trying to construct an instance of an invalid type, type id: -2125884172
QWARN : tst_QAbstractAnimation::stateBinding() Trying to construct an instance of an invalid type, type id: -2125884024
Received signal 11 (SIGSEGV), code 2, for address 0x0000000d
So write a small optional-like wrapper around std::unique_ptr for that
platform.
Amends 930e59b798.
Pick-to: 6.5
Task-number: QTBUG-132213
Change-Id: Icf85678d616bc96c7d74b982d0b919ea3f13265a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 7bd47fb70881e7240c027cd2844866c99f8f096d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ffb442db62888db5b5cdf82c03655c09e58373b5)
The existing lookup mechanism doesn't consider Qt path when looking for
the Qt Tool package dependencies. In good scenario this leads to the
missing Qt Tool package, in worst case scenario the Tool package could
be found by alternative search path and attempt using the invalid
tools.
Use the lookup functionality we have for Qt modules when looking for
dependencies of the Qt tools. This will look the tools in Qt search
paths first and only then attempt looking elsewhere, considering the
QT_HOST_PATH.
Pick-to: 6.5
Fixes: QTBUG-132340
Change-Id: I570c03037f2a92922d2546a4f5fde1bc17a7f812
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 035fbd068b5a3fbc18b7868ecac9a6a6a2f6602c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b942110a4a5d54ef1f225d9f71107a1c6f9132e8)
Starting with Qt 6.8+ we should error out if the minimum sdk / Xcode
version requirements are not met.
An opt out is added for cmake build tests, otherwise all the tests
that use private cmake api will fail to configure when run on older
Xcode or SDK versions in the CI.
We do this by checking for a new QT_INTERNAL_IS_CMAKE_BUILD_TEST
variable.
We do the check inside
_qt_internal_check_apple_sdk_and_xcode_versions
instead of passing
a QT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK variable to the test
configuration, because not all cmake build tests use private api, so
this way the list of projects that get the opt out is more
constrained.
Task-number: QTBUG-119490
Change-Id: I1284616c91341848a9cf6406fbf35750707d1227
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a13bfec63df2cf206e354ab56fc017a1f0eb8f6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cdc881149200bb86e56f9fb7e2f8bccbd7c8e1cf)
Having a defaulted argument to QUniqueHandle::reset() gives a convenient
way of releasing ownership without assigning a new handle, and makes
the QUniqueHandle API more similar to std::unique_ptr.
Task-number: QTBUG-132507
Change-Id: I842d4545d7cc2da8fe2df08280d0d816ed4be7fd
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 248ac4128fe86150532ff7146d0459abb5260946)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5653829bf8503c38f705893ebbf6b11dd69b211b)
This only affects the !QT_CONFIG(thread) case and requires the rewrite
of the old-style static cleanup() deleter protocol into the modern
operator()() one.
As a drive-by, mark the deleter noexcept, like destructors are
supposed to be.
Task-number: QTBUG-132213
Change-Id: I8839865880647d76b77eb9a3f2858067db86234e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6da1f72311b844b2232da3067ad6e1e24614e67c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7aadf25ccd70fd739a7b06f6b6bccbdee03847a5)
A typical usage for mapping a 4-point polygon to a rectangle might be
QTransform transform;
bool ok = QTransform::quadToQuad(polygon, polygon->boundingRect(),
transform);
It works because the QPolygonF(QRectF) ctor is implicitly called on
the second argument; but that ctor turns it into a 5-point polygon.
So it should be legal for QTransform functions to work with 5-point
closed paths.
Fixes: QTBUG-21329
Change-Id: Iae249012e14b8a3e8d3b0dfa35da8f9759359832
Pick-to: 6.5 5.15
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 48b1af941c50ab28cc92f9ea65a8a74a32eaf2bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5ead2a3d63a905ed758390e1558dbac744756077)
When requesting a readback every frame, the readback activeFrameSlot
alternates between 0 and 1. Suppose we are in currentFrame 1, and
process a list of readbacks of slots [1, 0]. First, we skip the readback
of slot 0 since it does not match the currentFrame 1. The list thus
remains [1, 0]. Then, we process the readback of slot 1, and call
activeTextureReadbacks.removeLast(). This removes the readback of slot
0, while in reality we processed the readback of slot 1. The
activeTextureReadbacks is now [1], containing a readback for which we
called vmaDestroyBuffer(), leading to a crash ("double-free" attempt) in
Vulkan on the next function call.
To fix this, remove the readback that is actually processed (index i)
instead of the last one. Since we iterate backwards, indices remain
valid.
Change-Id: Idd4296de45167edd0a9da345dcc1c3b6ac71a6d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 73405890b8911dd1a58120665ce63a38281c6ce4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 076a818f7490b7e6b10dc5ae831a447226c00ee0)
When a layout is used to arrange the children of a non-top-level
custom widget, the layout's contentsMargins need to be manually set to
zero to avoid extra empty space around the widgets, misaligning it
w.r.t. its siblings.
Add the necessary call.
Amends 2690822428, which, however,
inherited the missing margin adjustment from older code.
Change-Id: Icd1945a4f2b1635f031e50758ec2f1ec9313ae27
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 15524d1623a1400e4de15e57408e37020d394986)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 101fedb17f1d12ba49d09ac8ac5ca9ba9e28f828)
Examples should show idiomatic use of Qt and C++, so mark the custom
widget constructors in this example as explicit and their destructors
are override.
Amends 2690822428, which, however,
inherited the missing explicit from older code.
Change-Id: I5b5b49f69330c6f139345bed7264c85a36c36e9b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e0e9a5627376e04aba1b2ca2591554851d7de240)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cc1af8409aecb26513e1c06284e3b91eefa5d0db)
The old code used manual memory mangement (raw new/delete) to
(de)allocate the Ui struct. This is so 80s.
Use an owning smart pointer to manage the memory. Ordinarily, this
would have been QScopedPointer, but seeing as that doesn't have a
create() method to hide the raw new, use std::unique_ptr and
std::make_unique() instead.
Amends 2690822428.
Change-Id: Icabb9154eb38630855e14094b958af0214516f6b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0da2c2c4ef2219967db87021eece2a60b6e207af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 88600c30964bc1d11ed09e3dddd4cbe4477f02d3)
The old code used a grid layout inside the QGroupBox, but the design
with labels in the first and edit-widgets in the second column lends
itself to a QFormLayout, which adapts the alignment of the widgets to
the platform style, so use that.
Amends 2690822428, which, however,
inherited all of the above from even older code.
Change-Id: I528f0ce9d8cb7a997fbfabcdca887c059f571b38
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9c099ef942216d01261c26b60e3727a2a467f12a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 02f05bdb5fa7e43d36a50d90a290dd069c2dea62)
- The old code used two QPushButtons in a QHBoxLayout to provide
Ok/Cancel buttons. This hard-codes the positions and text (and
icons) of these buttons, instead of adapting to the platform style.
The new code simply uses QDialogButtonBox, which is designed for
this purpose.
- Also, the old code connected the Ok button's clicked() signal to a
custom slot that then called QDialog::accept(). This means that the
code in the custom slot is not executed when the dialog is accepted
by other means (e.g. return press in one of the line edits
("auto-default"), though I'm not sure here).
The new code uses the idiomatic Qt way of overriding
QDialog::accept() instead, and connects the button-box's accepted()
signal to it. This is done in the .ui file, so it already works in
Designer preview.
- Finally, the old code made a manual connection from the Cancel
button to QDialog::reject().
The new code uses the Qt idiom of connecting in the .ui file
directly, using QDialogButtonBox::rejected() as the signal.
Amends 2690822428, which, however,
inherited all of the above from even older code.
Change-Id: I83afd6156a0811e0c0f99f2480625ea6b69ff78b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3419c299369ac1da94ba5710aaf5f5f65c38c33c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8dbd0828e94497ab6ee6c5d924e51b4778e5bccc)
...and vcpkg usage was requested.
The user got no further feedback why vcpkg wasn't used despite passing
the -vcpkg configure argument.
Change-Id: Ib43c2045f093c3887a63406e37f37bdd681341cd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit fecae6ab1b1aa36f43b5cd87b229de4df37e44ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 523f71129520a2f8a1017eaa65955d521b470b5c)
QT_NO_CAST_FROM_ASCII is a policy setting, not a strictness
setting. The other components of QT_ENABLE_STRICT_MODE_UP_TO all deal
with clearly undesirable APIs, which QString(const char*) cannot be
said to be.
Keeping it in QT_ENABLE_STRICT_MODE_UP_TO would seriously impede the
use of strict mode in Qt itself (cf. QTBUG-132327).
Amends 3a6c8e02b6.
[ChangeLog][QtCore][QT_ENABLE_STRICT_MODE_UP_TO] No longer includes
QT_NO_CAST_FROM_ASCII. If you wish to continue using
QT_NO_CAST_FROM_ASCII, you need to define it in addition to
QT_ENABLE_STRICT_MODE_UP_TO. The reason for this change is that, while
everything else in strict mode should eventually become the default,
we're not proposing to remove the ability to construct a QString from
a const char*. QT_NO_CAST_FROM_BYTEARRAY and QT_NO_CAST_TO_ASCII
remain enabled in strict mode, though.
Task-number: QTBUG-132327
Change-Id: I36b850833b1de79a47de975ca28d3591a0a0e089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f9163ae7a8167daded0798654d99a2e3a5aaa2b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 77de3d45d3a56bfc04dd3bf2838bcb8f09f64ca5)
Both whenAll() and whenAny() have two overloads:
* an overload taking two input iterators, e.g.
whenAll(IntpuIt begin, InputIt end)
* an overload taking an arbitrary number of future objects, e.g.
whenAll(Futures &&... futures)
The public APIs are properly constrained, but internally they call
QtPrivate::when*Impl() template functions, that have the same two
overloads, but do not have any constraints.
As a result, passing exactly two QFuture<T>{} objects was leading to
the compiler picking the Impl overload that takes a pair of iterators.
Fix it by applying a subset of constraints from the public API to
the private implementation as well.
Amends 102f7d31c4 which was introduced
for Qt 6.3, so picking down to Qt 6.5.
Fixes: QTBUG-131959
Pick-to: 6.5
Change-Id: Ide29ac9a494d07870e92957c40c1f614e56825f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8aef5b0d8fd57684abe39c88af8c14d8882ef07b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 90fab1e4e98962ecaff5fd66d218d4f76cb7b8cd)
The old code connected to the wrong signal and therefore had to write
a custom slot to perform the disabling of the group-box.
The new code simply connects the QCheckBox::toggled(bool) signal to
the directly-compatible QWidget::setDisabled(bool) slot, removing the
need for a custom slot.
Also move the connection into the .ui file, so it works already when
checking the form in QtDesigner.
Amends 2690822428, which, however, only
inherited the issues from older code.
Change-Id: Ia834f92de270bb7b18981273188f6e5b6cd457a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 53826d1cde26f825d1983476c6697f72130e351f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f2b88b3225e6267126b722c50cc781159b327e4d)
Because we don't need one. I guess I was just lazy.
Amends b12fd1fa9d ("Long live
qEnvironmentVariable()").
Change-Id: I5b9141c5a32f9d784e0bfffdc3e4d742790aebdd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ce95c26034cc5b3ae8094c1521221e5b2f13ecfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 36d260014fe28be17259abee7547b660669dfdc4)
Wrap them in QVERIFY(), as usual.
Found by QFile::open()-turned-nodiscard-come-6.10.
Amends e673e5a257 and
25c96d547b.
Change-Id: Id39e5d9e500b524af8443cb57916a12f98bd7c23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cf6ae9a90106a3557a8df1e0d2567b02a4ef6ded)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 11f485ea68cff32f550c3d99475bb859a7495f69)
As pointed out by Thiago the QT_DECLARE_METATYPE calls are redundant, so
remove them.
Task-number: QTBUG-132101
Change-Id: I73800e70d3f270fb87941d4e053aa7ac5ed1841c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3bb4c4949fed9ccf8653151c78d5130b8db00716)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 01edc916d210238a06a043c1f8f9f44d69113ce2)
We can use hashLengthInternal() to check if the buffer is big enough.
This matches what the QCH::hash() method does, it also has an assert
that `result.size() == ba.size()`, so we can assume this works with
OpenSSL's EVP_MD_get_size() in EVP::finalizeUnchecked().
Amends c70c81b371.
Change-Id: I64935f3d590ab243b361a0b764f011c388820e32
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b83e825fab16f83f86149ead78efb6ec3d2fa16d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cc369ad07f9d66fe7ff71170a1a3ddfd2245e8cb)
The local appDir variable was only used to hold the return value of
another function call. But hardly any compiler will be able to look
through the QString atomic ref-counting to turn the non-Darwin code
paths into the tail-calls that they ought to be.
Remove the variable and return the result immediately. This removes
the move-assignment and dtor calls in the two changed lines and lets
RVO kick in, turning these calls into tail-calls on non-Darwin
platforms.
Amends 4ac872639e.
Pick-to: 6.5
Change-Id: Ieeefbd52fc983ab7aebcff6419965b206f374935
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit e57113feac183abd1f5bfcfb633a33e1387b2d3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3ea877a844438af01337d77b1f813a2af04aba05)
The tests peek into QEventLoopPrivate, which means that a UBSan build
needs access to QEventLoopPrivate's type_info, for which we need to
export the class.
Amends 3af20bd8eb8c75017c5d6d138d7c42914ee5bee3, which fixed the weak
vtable that, presumably, made this test work before.
Change-Id: I4104ba95093fa240c5ef7d9d5bf287c1652333f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8bf54385319df958ea88f9998e7690d4c35e354d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c9709094377ca8a5f419e49996ce0091b95a6141)
Different styles provide different icons for SP_CommandLink so reload
the icon on every style change.
Change-Id: I2d8bd706d4c1bca89b91c90f1bb90a796b38e0d3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d4c518b210ad56cb51c17e6e1b4a81b0deb7253c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fba5f806e6d7b7ab3a4c5e0796a0149218888843)
QCommandLinkButton was using QIcon::pixmap() without specifying the
current device pixel ratio. Switch to QIcon::paint() to not have to
fiddle around with the dpr at all here.
As a drive-by remove a useless QPainter::save/restore call.
Change-Id: I7e2492a09b28cb8a4f4cc60454733e0054fe1e9b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 785fb89e0aafc25a435d28ff05bf0dc05385b372)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6790d8d716d330993d892b5df14b3e3cb6b8343a)
It's safer and clearer.
Also standardize on unique_ptr instead of QScopedPointer, because the
latter is not supposed to be movable, so the assignment in
QLibrarySettings::load() would not compile.
As a drive-by, scope a variable tighter (in an if condition).
Task-number: QTBUG-132213
Change-Id: Iecdd910af4d06dbd03d2daf3ccf99dd4822f04ac
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aa1f2064801b39a26a718703817e197a3e31447e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b79b2edde8cc0dc3af6aba75c0dce65d620f6fe6)
The backend-provided DRM device might not be the right one,
so allow kms config to override it.
Task-number: QTBUG-131887
Change-Id: Ied744ae7015eae64f4556f1528e0dbe8ae69d206
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit c3bbbb22b8bc920e4937cf640fd1d2df3b0f9205)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 884c33835556c2485596be4bb53e57e6c37e202f)
The previous patch to not modify the CT_SpinBox by QStyleSheet when
nothing was added for QStylesheet also removed the additional margins &
paddings handling for the size calculation. This patch re-adds this.
This amends 96adebed606cdbc73c73778917d777dc04c6e93e.
Task-number: QTBUG-130642
Fixes: QTBUG-132431
Change-Id: Iff1f0febeca90d3154e61fd80e4b359bc7766b84
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b2cc8824ec2cdeb6e053a2ff92d7d5b71f8d0ee5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e23933e868949b823b1f3f18706dcc3a7245d28f)
This could cause conflicts with other users of these algorithms, notably
libb2 itself. Though if you're using libb2, you shouldn't be using the
un-optimized copy inside QtCore...
I've updated the SHA1 of the last commit in the repository, but there
were no changes to our sources.
[ChangeLog][Third-Party Code] Fixed a bug that caused the BLAKE2 symbols
to be visible from QtCore in a static build. If you need to use the
BLAKE2 hashing algorithm in your own code, either use QCryptographicHash
or import libb2 into your build environment. Using libb2 remains the
recommended solution for all systems, especially those for which it has
optimized (vectorized) implementations.
Fixes: QTBUG-132347
Change-Id: I48003b58cef0d8bcc720fffdd89b0f151fd102e3
Reviewed-by: Linus Jahn <lnj@kaidan.im>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b884fbf10237547e809745f528978942faf0e5f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d39c493390202faaa51e4f8ccede82acfdf07f5e)
This is more robust and lessens the impedance mismatch as seen by the
old code using std::unique_ptr<char[]>(expr).get().
The new code isn't impedance-mismatch-free, either
(UP{qstrdup(qba.data())}), but short of writing a small string class
whose internal buffer can be release()ed to comply with the archaic
QTest::toString() new[]'ed const char* return value, there's not much
we can do about it atm.
Also separate the internal from the "public" stuff in
QCborValueFormatter by adding private: and public: sections.
Change-Id: I09a2ad1a75bb9eab3d01f2b5b60afc2d762da384
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d9264ee65d6f24e1008b08494b1472a54ac01940)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5e6fa3dbc5abc765c60463fa101692bf40c6055b)