On VxWorks there is dlopen, but the feature can be turned off for static
builds, so Qt can use EGL even when dlopen is not present. In
qeglplatformcontext.cpp dlsym needs dlopen feature. There is no dlopen
on windows neither on Integrity.
Task-number: QTBUG-134671
Pick-to: 6.8
Change-Id: I7ced5f53ca21a8b0ceb25732ed4b1dc6c0bb1300
Reviewed-by: Janne Roine <janne.roine@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3c919b6d0d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The return value of this function is constant and some users call this
function often (an earlier version of QGenericItemModel did, possibly
QML does?), so memoize the result of the function instead of
re-creating the QHash on every call.
Use QAbstractItemModelPrivate::defaultRoleNames() so we don't need
an instance to get the base class' contents. Add a comment to keep
the two in sync.
As a drive-by, port from the QByteArrayLiteral macro to _ba UDLs.
Amends 32b586864e.
Pick-to: 6.8
Change-Id: If00b51e60930c974e6f8f928711dc78ba1f42b93
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fde232c855)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
...when the return value is unused.
The code should already be safe from restart()'s preconditions: either
the timer is explicitly checked for validity before the call, or we can
reason about the code (in testlib, the functions are called after the
one that starts the timer, making it valid). Therefore, this is just a
"cosmetic" cleanup (and a super-micro-optimization), but Marc doesn't
want to think about the qtestlib changes and says to pick it all the
way, "just in case".
Pick-to: 6.8 6.5
Change-Id: I73cf287ce1314fc3626734ec64ddf5884afe3383
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit baffc8e47d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It might be redundant, but I can't definitely prove that these timers
are already started by the time we call elapsed() or restart() on them;
I "just" think they are because the CI is happy with the existing code,
even when adding assertions into QElapsedTimer.
As a precautionary measure, add more isValid() protections to QNAM code.
Also replace restart() with start() since the return value is unused.
Pick-to: 6.8 6.5
Change-Id: Ic64ab27116d8b1cb6c14e18dee79a15aa40844ce
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit dd70656166)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's illegal to call elapsed() or restart() (sic) on a non-started
QElapsedTimer, so don't do that. In QNAM code, this has been observed by
adding assertions into QElapsedTimer, which then make network tests
crash. (While I am unable to run the network testsuite, this is
reproducible locally by running tst_QNetworkDiskCache::setCookieHeader).
The QTextStream test also calls restart() without a start(), but then it
calls elapsed()+start() which is the whole point of restart(), so amend
accordingly.
Pick-to: 6.8 6.5
Change-Id: I5cfe308f64b631b68b92843b409777a6b9176828
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 585471b138)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not all flags have an affect on an already created window, depending
on the platform and existing flags. Add option to force recreating
the window.
To aid debugging we also now log platform destruction/recreation events.
Change-Id: I7822cb58eaed51d72ed4ea3244f1f4113964cff7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d56dbdd48c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fix ensures that QDomElement::setAttributeNode() correctly replaces
an existing attribute with the same name. Previously, calling
setAttributeNode() with a new attribute of the same name resulted in
both the old and new attributes being present, violating the expected
behavior described in the documentation.
Fixes: QTBUG-15125
Pick-to: 6.8 6.5
Change-Id: Ibdda37a65f6e754d9f7e68e725d3438bbb2d9e0c
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 8c99134584)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We should also test removal, not just addition.
Amends 5ffb9d7ae6.
Change-Id: I0842a6be6230362e2095f6c8b2b1ced230826c5e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e15ef96bcb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The return of a default-constructed QVariant 'v' from three branches
invites NRVO, but most compilers won't let it kick in, because there
are two return statements that don't return 'v'.
Return an rvalue from each branch, so RVO is guaranteed (since C++17)
to kick in.
Amends the start of the public history.
Picking back all the way, since it's risk-free.
Pick-to: 6.8 6.5 5.15
Change-Id: I495885bee3ebba63c9e52640903c792011c1dee2
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 26ba78900d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The painting of the various icons for CC_TitleBar was done with the idea
to do some fancy alpha blending. But it actually was never used and just
makes the drawing code a lot more complex than needed. Therefore merge
the drawing code for textColor and textColorAlpha into one.
Fixes: QTBUG-131492
Change-Id: I89ac7bcf76f5264cb85cd8a00f0d74da4b85fd7c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 04e00e4e6c)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Adjust toe color of the close button to match the native color. Adjust
the hover text color for the close in light mode to match the native
behavior.
Fixes: QTBUG-133945
Change-Id: I2c9fafba9fee65f45f3878168b67b0d0a4b2a54c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit b24b9bba68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In case that no application icon was provided, use the IDI_APPLICATION
icon when Qt::WindowTitleHint was provided.
Fixes: QTBUG-133941
Change-Id: Ifb479a7056e0841215d525c2346938bda31fc1c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 92a14cdc36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not sure why it worked at implementation time. But now it definitely
doesn't. We may check the EXCEPTIONS flag value, since it's the
equivalent of its presence/non-presence in the argument list.
Amends f98fd70529
Task-number: QTBUG-118901
Change-Id: I9769b4921a2f72d31aea2b0bffd2511edd89f88f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7106e492bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We use QCocoaWindow::windowStyleMask to compute a new styleMask for the
NSWindow, based on the QWindow flags. However, some styleMask bits we
do not control in this function, so we need to preserve them in case
they were already set on the NSWindow, as otherwise we end up clearing
those bits. We did this already for NSWindowStyleMaskFullScreen, but now
we do it for all style mask bits we don't control.
This fixes an issue after QCocoaWindow::applyContentBorderThickness()
started calling setWindowFlags to control NSWindowStyleMaskTexturedBackground,
after the introduction of the Qt::NoTitleBarBackgroundHint window flag in
a1e6fed449 and then
bddc019829.
The symptom was losing the NSWindowStyleMaskDocModalWindow style mask
for sheets or other modal windows with a QTabWidget in them, as that
widget ends up calling applyContentBorderThickness().
Fixes: QTBUG-134447
Change-Id: Ie3e9ca3ff14f84ce70438d3633bd283fb78b9e8c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b90b473ee0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 027624b4d5)
When building Qt with a non-double qreal type, i.e.
QT_COORD_TYPE=float, mixing types on qFuzzyCompare will result
in ambiguities since only
qFuzzyCompare(float, float)
qFuzzyCompare(double, double)
are accepted.
Pick-to: 6.8
Change-Id: I4450516ffdf019ef8288aefd99a8e729c039bcd1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d693a06522)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This adds rudimentary support for linking against xcframeworks. We can
now do
LIBS += /absolute/path/to/some.xcframework
and this will end up in the frameworks section of the Xcode project.
This is required for linking against the FFmpeg xcframeworks we're
providing for iOS.
Pick-to: 6.8
Task-number: QTBUG-86387
Task-number: QTBUG-129651
Change-Id: Id212700d3554689160d23eafb26d99ac43b91062
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1185f651e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It seems that even we correctly get Uri from FileProvider, we still do
not used it. This patch started to use Uri received from FileProvider.
Additionally, to avoid the issue of case insensitivity, we started using
QString directly instead of QUrl for the openURL method.
Fixes: QTBUG-133702
Pick-to: 6.9.0 6.8 6.8.3
Change-Id: Ia3b5b6f1562194af4211b9d5bf6a0d56b43c1b05
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7ca68d0e2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
hashLengthInternal() already returns the size for each algorithm, so call
resizeForOverwrite() in one place. The hash lengths are specified by the
respective RFCs, so they have to be the same with/without OpenSSL
(confirmed by looking at the OpenSSL source code). So use
hashLengthInternal() in the EVP code paths and replace
result.resizeForOverwrite(EVP_MD_get_size()) call with an assert.
MD4_RESULTLEN isn't available when USING_OPENSSL30 is defined,
hashLengthInternal() returns 16 for md4, since MD4_RESULTLEN == 16,
just use 16 directly.
Change-Id: I5526d5e840b4882f3e5229df239b86924daee475
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8786a930d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current style adds padding to non-pre elements, such as any p or div
elements. The final html adds a wrapping div with a .pre class that
also gets padding added to it. This patch removes the padding from this
wrapping div.
Fixes: QTBUG-133710
Pick-to: 6.8 6.5
Change-Id: I6411dcda9cfed5f0f82d8bd9ea8dc809b1a3b4d6
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 9e61bd2465)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The qtprovider_paths.xml is used by FileProvider[0]
The file defines the different file locations that can be used for
sharing content (with other apps). Previously it used only the
files-path type (for private files inside internal storage).
According: qstandardpaths_android.cpp file, we need much more here.
This commit adds more file types to qtprovider_paths.xml
[0]https://developer.android.com/reference/androidx/core/content/FileProvider
Task-number: QTBUG-133702
Pick-to: 6.9.0 6.8 6.8.3
Change-Id: I29c8eb3d00490e9127d0aa646b4c50643b5f51ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4a54c32e6b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This line in QDirListingPrivate::checkAndPushDirectory() was causing a
call to GetFileAttributesEx() for every single directory entry when
recursion was enabled:
// Follow symlinks only when asked
if (!iteratorFlags.testAnyFlags(F::FollowDirSymlinks) && entryInfo.isSymLink())
return;
That happened because QFileSystemIterator::advance() never set
QFileSystemMetaData::WinLnkType in knownFlagsMask, because QFSMD is
supposed to contain the information about what that .lnk was pointing to
and we don't want to read it unnecessarily.
However, we *do* when the directory entry is *not* a .lnk file. For
those cases, we can set WinLnkType in knownFlagsMask, which will cause
QDirEntryInfo::isSymLink() to return false without having to make
further system calls.
This change is fragile and this code deserves a bit of refactoring
(starting with getting rid of The Boolean Trap). All calls to either
fillFromFindData() or fillFromFileAttribute() are currently protected by
a .lnk filename check (all of them are either in this function or inside
of QFileSystemEngine::fillMetaData()).
Fixes: QTBUG-134699
Pick-to: 6.8
Change-Id: I87b19f89035bcd7e1c1ffffd14eac5fb5ac3e693
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 606ba10507)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Honor the palette set by the stylesheet when drawing a
QPush/ToolButton.
Pick-to: 6.8
Fixes: QTBUG-134497
Change-Id: I33b9cdf8d4999e1fccdae250543db541b66b3b7d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b0dec15d2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The latter was used both as a concrete type as well as a base class,
driving Coverity nuts because it couldn't prove that we weren't
deleting derived classes (AnchorData) through a QSimplexVariable
pointer.
This is the same issue that Coverity took with QBrushData (CIDs
218724, 11772), and the solution is the same
(cf. 3bbc9e29ef):
Split the Janus-headed class into one that acts only as the base class
(and has a protected dtor) and one that only acts as a concrete class
(and we can mark it final).
The protected dtor in the former now statically ensures we don't
delete a derived class object through a QSimplexVariable pointer.
We don't need to modify AnchorData subclasses, because AnchorData
introduces a virtual destructor.
Coverity-Id: 390828
Pick-to: 6.8 6.5
Change-Id: I981c02e69af44ebacd4ba3aec76792e14eb15836
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit a405834ae6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make this explicit, with a link.
Pick-to: 6.8
Change-Id: I8b8b64c88daacba43df1eecf5a347c0a89d837e1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit ca26e80450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's UB (as per docs). Creating a QTimeLine and calling
setCurrentTime() will end up calling restart() without having called
start() first. Moreover, the return value of restart() isn't used,
so that's useless work.
Pick-to: 6.8 6.5
Change-Id: I53c80838f60fae406a44ffe2cf578c6c79cc9df4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit a43453d9a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
LWG4135 applies to the quoted Standard paragraph (and therefore
to our own code as well).
https://cplusplus.github.io/LWG/issue4135
Pick-to: 6.8
Change-Id: I05caa4cba001ecc473412c789738480d8eafa0c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41ffc92f18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
so we can use Q_LOGGING_CATEGORY_WITH_ENV_OVERRIDE outside QtCore.
Otherwise clang++/macos says
Undefined symbols for architecture x86_64:
"QLoggingRegistry::instance()", referenced from:
QLoggingCategoryWithEnvironmentOverride::QLoggingCategoryWithEnvironmentOverride(char const, char const) in qrhi.cpp.o
As Thiago suggested, don't export the whole class to autotests,
export only the symbols they need. This simplifies the code.
Pick-to: 6.8
Change-Id: Id653385376a2a7604dddd2f520a0a90de5a541f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8500343037)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use EXISTS path insead of using find_path because find_path finds the
last target's generated headers, but we want to generate headers for
each target separetely.
Ammends 95c70bbc5b
Fixes: QTBUG-124800
Change-Id: Ib2b9ceefbc6d11f9bf67fdc6ce25dea3366afe3d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1593220552)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These final touch-ups for CID 390828 make the code easier to
understand and safer, because more unsafe operations are now forbidden
(subclassing and copying).
Coverity-Id: 390828
Pick-to: 6.8 6.5
Change-Id: I2e43be71d8c3db59d95e69ec16c41c1547a2f180
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 912388b306)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
std::optional::value_or() should not be used when its argument is a
non-trivial type, because the argument is created and destroyed
independent of whether it is used in the end. In this case, we don't
even need an optional, because parseScreenScaleFactorsSpec() takes
the output of qEnvironmentVariable() (not -OptionalString) as-is, so
we can just drop the unneeded optional-(un)wrapping.
Since this patch apparently removes the last user of
qEnviromentVariableOptionalString(), mark that function as
[[maybe_unused]]. Outright removal may cause cherry-picks to fail,
so will come as a follow-up.
Amends 4d1f13f354.
Pick-to: 6.8 6.5
Change-Id: Ic2bb8a3aa8e946b957047ff4faf48c4082fc9c01
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit bee49bde04)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complains that image.format() is used to index into
qPixelLayouts[] when it may be NImageFormats.
Most code paths (e.g. QImageData::create()) defended against that, but
e.g. QImage::reinterpretAsFormat() did not (at least not overtly), as
didn't some of the backend functions.
Add checks, document the invariant on 'format' and assert it in
QImage::format().
If this doesn't convince Coverity, we'll need to turn qPixelLayouts[]
into a function, so that it can defend itself against out-of-bounds
access.
Pick-to: 6.8
Coverity-Id: 390711
Coverity-Id: 390720
Coverity-Id: 390758
Change-Id: I29431193face3cae8be56f01da8dced19c3abb38
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a2e60ebee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][Third-Party Code] The copy of TinyCBOR in Qt was updated to
0.6.1.
Manual conflict resolution for 6.9:
- worked around 34f60877bd not having
been picked to older branches
Pick-to: 6.9.0 6.8 6.8.3 6.5 5.15
Change-Id: If5d5ef6220874ae8858efffd1712a567597b6317
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7df128675a)
... instead of std::pair.
This is in preparation of breaking QSimplexVariable up into
QSimplexVariable (with protected dtor) and trivial subclass
QConcreteSimplexVariable, to statically ensure that we're not deleting
derived classes (AnchorData) through QSimplexVariable pointers (which
is UB, and subject to a Coverity complaint).
This is basically the same program we did for QBrushData, culminating
in 3bbc9e29ef.
This second patch modernizes the code a bit and, by scoping the
variable holding the return value of createSlack() tighter, allows the
use of auto and therefore isolates the code from the changes in the
final patch of the series.
Pick-to: 6.8 6.5
Coverity-Id: 390828
Change-Id: I15b51a3118c7ef33e8351a3e198abaebf4300d61
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 3aa431e3fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is in preparation of breaking QSimplexVariable up into
QSimplexVariable (with protected dtor) and trivial subclass
QConcreteSimplexVariable, to statically ensure that we're not deleting
derived classes (AnchorData) through QSimplexVariable pointers (which
is UB, and subject to a Coverity complaint).
This is basically the same program we did for QBrushData, culminating
in 3bbc9e29ef.
This first step scopes iterators of for loops in the for-loop, and, as
drive-bys, makes them use auto and the shorter cbegin()/cend(), so
they fit into a single line, and fixes the extra {} around single-line
bodies (only in touched lines).
Pick-to: 6.8 6.5
Coverity-Id: 390828
Change-Id: I439e0a10ebb316a33e92c42c255ee209139d47a2
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 49809c6e41)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port from explicit array sizes to implicit ones, followed by an
explicit size check. This prevents mistakes where, due to missing
initializers, value-constructed trailing elements cause lower_bound()
to be called out-of-contract, such as the one
5d8f815e10 fixed.
Also statically verify that the arrays are sorted. This doesn't work
on GCC < 10, e.g. QNX, so guard it the same way we did in
qhttpheaders.cpp in e3fe3997eb.
Task-number: QTBUG-103721
Pick-to: 6.8 6.5
Change-Id: Ia55149102013fa4e1619be68a69bc52b46e0f006
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ddf69669d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Othewise there is a risk that variable is taken from other scopes.
(Random finding).
Pick-to: 6.8 6.5
Change-Id: I2517adec5d82639e95ac2758633109413811cf9a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6685da4ec9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QTabBar draws PE_FrameTabBarBase only when drawBase is enabled,
so QTabWidget should honor this as well.
Otherwise, there will be an awkward line below the corner widgets
but not the tab bar when disabling drawBase on the built-in QTabBar.
Pick-to: 6.8
Change-Id: I7621476d66c3580282846dc924cd0b3700ce250f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d28881fa33)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As decided with lazy consensus on the development ML¹, we'd like to
separate precondition checking from internal consistency checking.
Add a new Q_PRE/Q_PRE_X macro for the former, to leave Q_ASSERT/_X for
the latter.
As requested in review, modernize Q_PRE_X vis-a-vis Q_ASSERT_X by
skipping the `where` parameter (defaulting it to Q_FUNC_INFO).
Added as undocumented API, for now, to pick back to all active
branches without actually promising semantics different from Q_ASSERT,
a change that, realistically, will only happen for 6.10 at the
earliest. But by making the macro available to all active branches, we
avoid conflicts when picking changes back, and the change is rather
risk-less.
Apply to QStringView, to have at least one user.
¹ https://lists.qt-project.org/pipermail/development/2024-August/045588.html Items 1-3.
Pick-to: 6.8 6.5
Task-number: QTBUG-98965
Change-Id: Ia04248a64c8feba80cce10f8f5cbde580436db88
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit eb3df4edbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As noted in the comment, we had a chicken-and-the-egg problem with
plugins and the event dispatchers: we need to destroy the event
dispatcher when plugins are still loaded (otherwise we could and did
crash) but we also wanted the QThreadData to exist when the plugins
unload.
The solution for that is to split the work: destroy the event dispatcher
first, then unload pugins, then destroy the current thread's
QThreadData. On ELF systems, this is guaranteed to work because we set
the init_priority to call destroy_current_thread_data() to higher than
QLibraryStore. In other systems, it's a best effort with dynamic
libraries and not guaranteed at all with static builds (don't even
report bugs).
Fixes: QTBUG-134080
Fixes: QTBUG-133861
Task-number: QTBUG-132697
Task-number: QTBUG-102984
Task-number: QTBUG-132381
Pick-to: 6.9.0 6.8
Change-Id: Ifaa28bb87338f4117d51fffdf721da68c0762e5a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 6763e25cbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In case that no window title was provided use the
QCoreApplication::applicationName when Qt::WindowTitleHint was provided.
Fixes: QTBUG-133942
Change-Id: Ieeff0ba97bd996225c6f83f691fc1c149e3d7172
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5d8c3a5985)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike in other cases of structs, Coverity doesn't say which field,
exactly, it considers uninitialized in `op` upon return from
getOperator(). Manual checking confirms that all fields are written in
all branches (and all configs, btw), with the following exceptions:
- src* fields are not written in QSpanData::None mode, but this branch
is marked as Q_UNREACHABLE()
- `linear`/`radial` are only written in QSpanData::Linear- or
RadialGradient mode, which means that their (unnamed) union is not
written in Solid/ConicalGradient/Texture modes
Assuming it's the latter branch that trips Coverity, introduce a
std::monostate member, noGradient, to said union, and initialize it
Solid/ConicalGradient/Texture modes. This makes the union a kind of
optional, but without the churn of actually introducing a
std::optional<Union>.
The effect is that in those modes the active union member is now the
empty monostate, so static analyzers will not complain about `linear`
or `radial` being uninitialized (because they're not active members).
'noGradient' being the active union member should also help statically
and dynamically (ubsan, one day?) detect accesses to `linear` or
`radial` when they're not active. Before, I believe the first declared
of the two was implicitly active.
Amends the start of the public history.
Pick-to: 6.8 6.5
Coverity-Id: 11400
Change-Id: I743363cc06af3778f85c205bfb6880c696229f92
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 8492ba01ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Adds a more detailed overview of behavior changes between Qt 5 and Qt 6
in the Qt XML module. This update is based on multiple reported tickets
highlighting behavior differences, where users requested further
explanations.
Fixes: QTBUG-134503
Pick-to: 6.8
Change-Id: I2e25268c6de7fd7e3a0e0244b83bb2ba616ef60e
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 275396b013)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>