Add two new enum values:
IsDecoratedRootColumn: notifies the style that the current cell also
contains place for the tree column branch indicator so it can e.g.
properly draw rounded edges in a cell or complete row.
IsDecorationForRootColumn: the item contains the information to draw
the tree column branch indicator.
Pick-to: 6.9
Task-number: QTBUG-131585
Change-Id: Iee2823fe3a227630f926d0448095a10fad2b0ba7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There is no need to set a minimum width for QAbstractSpinBox in
QWindows11Style::polish() as this might override the user preferences.
Also the minimum size handling is now properly done within
sizeFromContents().
Pick-to: 6.9 6.8
Change-Id: Ibc1fd7a6f862fc85e3739025b9de581aa235d74c
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Pruning the part of a locale name after the first '_' should now be
redundant, as QLocale::uiLanguages() now includes the resulting
truncations. It may do so later in the sequence than the pruning used
here, where the pruned version either might be a bad choice (due to
being in a script incompatible with what we started on, e.g. pruning
pa_PK to pa, which uses a different script) or would also arise from
some later, more specific, entry (as when uiLanguages() is expanded
from {en_NL, en_150}, where checking en immediately after en_NL would
bypass the more specific en_150 when present).
Pick-to: 6.9
Change-Id: I4c7c199ca16a8e4803843547c5a689cea11af1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The documentation for QPaintDevice::PdmDevicePixelRatioF_EncodedA
refers to encodeMetricF() which was nowhere to be found in the
documentation because it was marked as internal.
Pick-to: 6.8 6.9
Change-Id: I37707bc641d359f367f77c958043b6dfa33d4dcb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since standard (non-Pro, 1st gen, 2nd gen, and USB-C) Apple Pencils
do not support rotation (barrel roll), the rotation value
should be set to zero.
Task-number: QTBUG-128467
Change-Id: I33511c39cab1fb14a2ef622ab98ce49eb95f3295
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If you drag-and-drop a OpenGLWidget in Designer, the main window gets
re-created when the OpenGLWidget is instantiated. So in general (in
rare cases), at the end of QWidgetWindow::handleMouseEvent() we might
have a different window, and therefore can't reliably call
QWindowPrivate::maybeSynthesizeContextMenuEvent() without checking for
a valid pointer.
Amends 84a5f50c7766c99f62b22bb4388137e0aa8dd13d
Pick-to: 6.9
Fixes: QTBUG-132912
Change-Id: I7b220b4daceab988aadabf9427ef6b2d5624e00d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
According to the discussion in QTBUG-132398, the script stopped
working in newer Xcode versions, and also didn't cover new
Objective-C language features.
Remove the script to avoid confusion.
Pick-to: 6.8 6.9
Fixes: QTBUG-132398
Change-Id: I37b96ac6a77af1fcc4221591cb1f6320fa9a024b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Libc++ is migrating towards fine-grained headers [1], removing indirect
inclusions. To prevent breakages in client code, this feature is opt-in,
happening when one bumps the C++ version used or defines the
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES macro.
This commit adds the macro when building Qt. I'm pretty confident this
won't cause breakages because we have also been building Qt on the CI in
C++ > 17 modes.
[1] https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
Change-Id: I7553274ef51ccc9b462c98fdab55b27e5715afaa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Follow the same "pattern" as for the rest of the #if directive: first
test if a macro is defined, then test the value. Otherwise the code
triggers a -Wundef when building in C++.
Task-number: QTBUG-132900
Change-Id: Icc838bf8dfafed1ab317ff70cb19559b72b22dc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add the qt_<plugin_type>_plugins_all target that allows building
all plugins of the <plugin_type> from build tree at once.
Change-Id: Ie5057b9c51dcdfba36e3572064533d698d7549e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
qt_register_target_dependencies does the same thing as
qt_record_extra_qt_package_dependency but in more convenient way.
Update the qt_register_target_dependencies signature and adjust naming,
it now accepts PUBLIC and PRIVATE multi-value arguments and called
qt_internal_register_target_dependencies.
Use it and deprecate qt_record_extra_qt_package_dependency.
Pick-to: 6.5 6.8 6.9
Change-Id: I0594cf699ec1e3af7210dd7450fa3f81c1f565ae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To avoid the following error:
The custom command generating
.rcc/qrc_editabletreemodel.cpp
is attached to multiple targets:
editabletreemodel
editabletreemodel_tester
but none of these is a common dependency of the other(s). This is
not allowed by the Xcode "new build system".
Pick-to: 6.8 6.9
Fixes: QTBUG-131631
Change-Id: I1c5d0702596a4f8f723d9080bc5304d6ad06853b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
By using void as default template argument in callStaticMethod and
callMethod, we can avoid having to type <void> after every void method
call, while still allowing the caller to remain explicit about the type
if they want to.
Change-Id: Id7143d1116364be7699712d1fead257f26f20420
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The generic copy-and-remove fallback will first open the original file
with a different case, truncate it, and then remove the original file.
Leaving us with no file at all.
Task-number: QTBUG-132785
Pick-to: 6.9 6.8 6.5
Change-Id: Ia5a41d26c1d6d6bdc231c71acf15bd2ea496c715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When we're trying to resolve a font for color emojis, we will
prefer any color font over the selected font (since a normal
font may have monochrome glyphs for emoji characters and that's
not what we are after).
If there are no color fonts on the system at all, we need to do
a final match where we ignore whether the font is in color or
not and just return it anyway.
In this final pass we would find the first best match among the
fallbacks (typically the first one), but never actually check
the font that was requested in the first place. This was a
mistake. Unless it does not exist, we should just return the
requested font family.
Pick-to: 6.9
Task-number: QTBUG-132377
Change-Id: Ie53a6bd665ebdaaca92bf0c33fabf5195e1aa5fe
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Construct the arguments list explicilty to QStringList to avoid calling
QProcess::splitCommand() and potentially splitting a path with spaces
that shouldn't, this also saves from having to deal with shell quotes.
Fixes: QTBUG-132891
Pick-to: 6.9 6.8
Change-Id: I48f6c219830269c507f146b654bcfa025f0e3203
Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
There were two mistakes in the code that intended to detect
if a specific font was a color font in the FontConfig database.
1. The "int n" parameter in FcPatternGet*() is not an array size,
but an index, so it should be 0 and not 1.
2. We need to add FC_COLOR to the list of properties in our pattern
when populating the database, otherwise we will just fail to match
it and none of the system fonts will be listed as color.
Pick-to: 6.9
Fixes: QTBUG-132377
Change-Id: Ib3c112e8a354abacd05679c62283a1f1abfb40ee
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The code was duplicated in multiple places.
Pick-to: 6.5 6.8 6.9
Change-Id: If2ab30b7afbf6d2f99c9fffd999218802b734d5e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
QT_MOC_CPP is not the same as Q_MOC_RUN, which moc's preprocessor still
sets. It appears Qt 3's qmake set it when ALLMOC_HEADER was set... a
feature that doesn't appear in Qt 4 (but exists with cmake_automoc).
MOC_SKIP_{BEGIN,END} appears in Qt 3's moc, but not in Qt 4's. But they
weren't in qthreadstorage.h at the time, so I guess they were added in
the 4.0 development cycle when QThreadStorage changed, but before moc
was rewritten (which deleted the Qt historic repository's oldest file,
moc.l).
Pick-to: 6.9
Change-Id: Ibfff778c9f4d17af006dfffd8545fb24b495ecdd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
It's now in the FreeBSD headers themselves, so we don't need our own.
Change-Id: I136aa8018a2c02f70ab8fffd484f07f287ca0305
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
And remove NOLINT(clang-diagnostic-self-move), silencing the warning for
Clang seems to work for clang-tidy too (tested locally).
Amends 03bd9491491881529ad28cd6d672edfdda9a0065.
Pick-to: 6.9 6.8
Change-Id: Ibdf982a728f2c6150f2911173dc3c9246f3662b8
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This probably doesn't make a difference because QByteArray::fromRawData
is inline, does not allocate memory, and (as of the last commit)
noexcept. As an beneficial side-effect, we get to test that feature in
QtCore's own build.
Change-Id: Ifd19cfdba83064bbf4d3fffdd032622ec102e234
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Amends 08c6cc62c743e172fbf064ccaad1159b2a1fb850.
Found in Qt 6.9 API review.
Pick-to: 6.9
Change-Id: I1ed29a913e34ecf093a98c2053c319f0edfb9135
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of storing a pointer to a QStringList to indicate whether the
list was populated or not, use the QList's d-pointer. Unlike QString and
QByteArray, QList does not have isNull(), so we roll out our own.
Pick-to: 6.9
Change-Id: I6903de324c8215ed4934fffd9d997a34f2e7fa99
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
There's no need for it to be a global, if the data isn't either. I have
a vague recollection of the data also being globals back in the
day... (they used to be plain QStringList pointers).
Pick-to: 6.9
Change-Id: Ie5f1a71d0b20a0195822fffd992101c94824a07f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Those aren't GUI tests. I suppose they've been in tst_QApplication since
Qt 2 or 3, when there was no QCore/GuiApplication yet, and were never
moved.
Pick-to: 6.9
Change-Id: I30b3c1a309ba2c720210fffd045ebd0bcfa803fe
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
With LTO, I'm seeing GCC conclude that it's best to inline the
lockInternal() and unlockInternal() methods into the public ones and
then emit out-of-line copies for those. That's actually sub-optimal, so
force GCC not to do it.
Pick-to: 6.9 6.8
Change-Id: I88c29098757ea6e70c00fffde56989ec05b136bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The idea of b2ed29b8d9b33dcece83000aee28073dd27f1cd9 was to have the
contents of <version> (if it exists) available in all Qt headers.
Since we broke up qglobal.h into smaller pieces, qcompilerdetection.h
is no longer necessarily included by any given Qt header, which
thwards the original idea.
Try with qtconfiginclude.h, which exists since
61935786c30b0209811fa32f7a02f138da8570b2 (Qt 6.6).
For Qt 6.5, we'll need to add it separately to qtversionchecks.h and
qtconfigmacros.h, whence qtconfiginclude.h was extracted, as well as
keeping it in qcompilerdetection.h, which includes qtconfiginclude.h
only since 22029a76c37d8d670479d523684a84f7966ed434.
Amends the breaking of qglobal.h into smaller headers, without being
attributable to any one of the individual commits that made up the
change, or else amends b2ed29b8d9b33dcece83000aee28073dd27f1cd9.
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-108228
Change-Id: I909196bd767e8d9e016069f1a59994d40e646e59
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QHeaderView has no resizeMode property, only a ResizeMode enum type that
is then used in the sectionResizeMode API.
Fix that reference, reflow the paragraph, and apply some light editing.
Amends 9e3a96189d9db8a458e65cd5078509afe7a160db
Pick-to: 6.9
Change-Id: I240c3f64fd45c96f4d3ba95c2086a638468e137f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The header triggers compile warnings -- -Wundef, to begin with.
Since it's included from multiple places, we either fix the header or
wrap it. The header isn't maintained upstream (we actually keep patches
"on the side"), so I'll go with the wrapping option, and suppress
-Wundef in there.
Task-number: QTBUG-132900
Change-Id: I8fdd32fa2ec1cde83ef28945259bce836439f73f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We want to test if QT_BUILDING_QT is defined, so use the right
construct.
Pick-to: 6.9 6.8
Task-number: QTBUG-132900
Change-Id: Iac26f70021a337a2c476618979b4b8eb180ffd3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use ifdef, not if, otherwise we trigger -Wundef if the feature
is unsupported.
Pick-to: 6.9 6.8
Task-number: QTBUG-132900
Change-Id: I8a779da59bf2c7add14ace6405faf19b7ca48c28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This value is used by nothing throughout the Qt Android code.
Task-number: QTBUG-132716
Change-Id: I694d016131b7eccd9ea5789e77f0501676a7f21a
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Those two params are already marked as unused, so there's no point in
calculating them passing them and then not using them.
Task-number: QTBUG-132716
Change-Id: I840473a42ac4256164252df805b52b859d2fa3de
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Call QCoreApplication::forwardEvent() rather than sendEvent() to ensure
the QContextMenuEvent is spontaneous if the mouse event is.
Pick-to: 6.9
Fixes: QTBUG-132873
Change-Id: I6198c2105210d2841f43ef81a9be0f917272846f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
moc (and thus the bootstrap library) has needed JSON output since Qt
5.15 (commit da284ef10e0ef80776b9fc9b7bb0e6dc8d71ba63 "Add support for
machine-readable JSON output to the MOC").
Pick-to: 6.9
Change-Id: I4b8cf51c092eb35cc383fffd48d120f0cb2c56b0
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Johannes Grunenberg <nerixdev@outlook.de>
This value is used by nothing throughout the Qt Android code.
Task-number: QTBUG-132716
Change-Id: I694d016131b7eccd9ea5789e77f0501676a7f21a
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Those two params are already marked as unused, so there's no point in
calculating them passing them and then not using them.
Task-number: QTBUG-132716
Change-Id: I840473a42ac4256164252df805b52b859d2fa3de
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Emit a warning if the string we get is too large for Java, and cast
the size to jsize before calling JNI.
For consistency, replace the Q_ASSERT in QJniArray's size check to use
the same logic.
Addresses header review comment; code was not handling this case before
it got moved into the inline helper either.
Pick-to: 6.9
Change-Id: I00d68509be8b5f7304dda2e824fa0ced0f8f8d48
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
GCC 8.x does not treat __builtin_unreachable() as constexpr and
disallows using the Q_UNREACHABLE_RETURN macro. Guard the statements
with the respective checks.
Amends b0b34c56a99130bfc9c82cb006653ce6b8f0516e
Pick-to: 6.8 6.9
Task-number: QTBUG-125285
Fixes: QTBUG-132804
Change-Id: I88cdbe3bae1a336edc255e3e93e8d948bde253da
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Added the missing function declarations to the #if Q_QDOC part of the
header. Also fixed a typo in the std::unordered_map docs.
Amends 850d4895be565931d18c92e5e2f9a33b7f26de6d,
0c96528e8d43ad4309bdca14b179a5045984655a,
a9fe57fefaac0cb047e4c02e0b8c8f8327e0a58c,
and a8c9a5617c72ad2e55bf497df6ff2c2e141cbdef.
Found in Qt 6.9 API review.
Pick-to: 6.9
Change-Id: I792023b506e2afdbdca4bca3197887e50c98a788
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Amends b294927a1270f7d0c5aaf0bbe93b617ac995e149.
Found in Qt 6.9 API review.
Pick-to: 6.9
Change-Id: Iab64d52c506030dd755d61edc376bb47865478ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Unless a module overrides it by setting the environment variable
COIN_CTEST_FORCE_IGNORE_EXIT_CODE.
As this change trickles through submodule updates we'll mark modules
as COIN_CTEST_FORCE_IGNORE_EXIT_CODE if needed.
Change-Id: Ia37d6e4c4dee41a3dd7446fa23ab96593dab9402
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
As we produce crash reporting via Swift on macOS 15 now.
Pick-to: 6.8 6.9
Change-Id: Iab4777b29bcaa66eff9d2f1de63072f5744d56df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>