Configuring a test as standalone would fail with the following error:
Invalid max SDK version: It should be a major version number,
without minor
This happened because _qt_internal_check_apple_sdk_and_xcode_versions
expects QT_SUPPORTED_MAX_MACOS_SDK_VERSION to be available, but it is
not yet set due to Qt6 package not being found yet.
Avoid the issue by exporting the version requirements into both
Qt6ConfigExtras.cmake and Qt6BuildInternalsConfigExtra.cmake.
Make sure to assign the variables only once.
Amends a29bff3d80219f54d0837b0e6e0577192011dea1
Amends a0bdd2195f24d8a7d880ba506afc16b41337218e
Pick-to: 6.6 6.7
Task-number: QTBUG-119490
Change-Id: Ic297eeaabf22c8c42ded1a766906f88fdb91fd3d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
According to QUIP-18 [1], all .qdoc files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I7c4d8a1957db6f6d7ad18cbc1928499724e9305f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
According to QUIP-18 [1], all doc snippet files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I6e5bc9d05a5d510cc07a15abafe2257034562510
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Noticed when building with -c++std c++20 for macOS. Lots more warnings
in general but this one was an error.
Change-Id: I8dd9ae33f23dd77b2ec619b7357f50b97e3ed8ef
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The elements we iterate over are always jobjects, i.e. POD, so iterating
over values is at least as efficient, and less unnecessarily clever.
Pick-to: 6.7
Change-Id: I6142dab84f3d37d82613ecf27cc03dde7810e541
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I88e3640b32e6b4bd83c49c14df6aecd7c824aef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2f6fe3a26843ff68c5d3f9af0a2fc3cce6caac22 has made calls to
QApplicationPrivate::setActiveWindow() redundant.
Remove redundant calls.
Task-number: QTBUG-121488
Change-Id: I13ea8c0994eaeb764462af23ef66ea1a37659b77
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Insofar, painting with a CMYK color (pen/brush) was completely ignored
by QPdfWriter, although the PDF format can faithfully represent CMYK
colors.
This commit adds support for CMYK colors in the PDF engine. The support
is opt-in, in the name of backwards compatibility; an enumeration on
QPdfWriter controls the output.
QPrinter was using a hidden hook in QPdfEngine in order to do grayscale
printing; this hook can now be made public API through the same
enumeration.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
[ChangeLog][QtGui][QPdfWriter] QPdfWriter can now use CMYK colors
directly, without converting them into RGB colors.
Change-Id: Ia27c19ec81a58ab68ddc8b9c89c4e57d7d637301
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Use the new (in Qt 6.4) QByteArray::resize(n, ch) to avoid the manual
memset() unpleasentness.
Pick-to: 6.7
Change-Id: I786988125f52b1bc1f733c30ab2b95eda569481d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Don't do the memset() manually just to save re-writing the single
leading byte. Pass the initial values to the QByteArray constructor
directly.
Pick-to: 6.7
Change-Id: I67daf446bebb8c8c6b05d235746ee43604f42445
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt 5 streams cannot handle QBitArrays with more than INT_MAX bits,
even on 64-bit platforms, because of interface constraints (size_type
int).
Qt 6 can, so make sure to refuse serialization of oversized QBitArrays
to Qt-5-compatible streams.
[ChangeLog][QtCore][QBitArray] Now refuses to stream a QBitArray with
size() > INT_MAX to a Qt-5-compatible QDataStream.
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I263e27bd366757c8e0360dfd337948c44d00647a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The class has a user-defined destructor, so it mustn't be copied or
moved (which here is the same as copying).
Amends 3c93286f08a80b6e1821d7d63d361742b25c6578.
Pick-to: 6.7 6.6 6.5
Change-Id: I1b23588309654f34aedc0269e1d1c9511ddda2bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Use the work-around for CMake issue #19005 for Makefile generators
and Visual Studio projects.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-120317
Change-Id: I3d15f23937133a5dd4d1c2a88af0fc34d5608a77
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The call site may pass in a null-widget, so guard for that.
Pick-to: 6.7
Change-Id: I631cb2fc105bad69faf3daaeac4b893457d27cc1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Meaning a Vulkan implementation that is not 1.0, not 1.2, not 1.3,
but 1.1. This does not have the 1.2+ versioning mechanisms.
Change-Id: I9d9346d505162adc0e03aa04217930d41c72027f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Include the \since markers they need, plus changes in past versions.
Purge a stray blank line.
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I4edaa0ffaf59323e0af6412727f2a85866813ab8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QCOMPARE() can report enum values by name just fine, no need to
laboriously convert them to strings. While comparing all tags in one
go did allow a more comprehensive report, it's enough to know we
failed; this is testing cross-platform code, so a debugger can tell us
all those extra details if we get a failure.
Testing qHash() doesn't distinguish equal things is fairly low value;
at least avoid duplicating the construction of the reference value.
Replace a bunch of other QVERIFY()s with the new cousins of QCOMPARE()
for ordered and different comparisons.
In the process, mark some of the QLocale objects as const.
Change-Id: Ic93b8ed60c6f2cc846fbba428983778896d61291
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
They were expanding as simple blocks, so their uses didn't end in
semicolon, which looks wrong when reading the code.
Pick-to: 6.7 6.6 6.5
Change-Id: Ibea7b01ac165045604b6eb7a838765b2061c368a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(This turns out to be identical to v44, for our purposes.)
The CLDR license has been revised at v44 to "UNICODE LICENSE V3",
which is now included (as LICENSES/UNICODE-3.0.txt) in addition to the
old license (still in use, presumably, by UCD - at least until its
next update). Some new QLocale::Language entries are needed. There is
no change to the time-zone data.
Some tests needed changes:
* Various Arabic locales now use U+0623 (Arabic letter aleph with
hamza above) in exponent separator, replacing plain U+0627 (Arabic
letter aleph); it is still followed by U+0633 (Arabic letter seen).
* Where likely sub-tags used to fill in world, 001, as territory for a
language, they now (e.g. for Prussian and Yiddish) give specific
countries.
* Tamil locales now have something of a mix of inherited and localized
forms for AM/PM, which looks a lot like a mistake in CLDR.
* New likely sub-tag rules fix ctor(und_US) and ctor(und_GB), which
previously failed.
[ChangeLog][Third-Party Code] Updated QLocale's data extracted from
the Unicode Common Locale Data Repository (CLDR) to v44.1. The license
changed to Unicode License V3.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-121485
Task-number: QTBUG-121325
Change-Id: Ide1a68016129526d7a5aa3fc67f1a674858696bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The method takes a pointer, so the code shouldn't crash when passed a
nullptr.
QFileInfoGatherer::getInfo() still needs to generate a descriptive
string for the file, so we refactor QAbstractFileIconProvider::type()
to put the implementation into a reusable static function
QAbstractFileIconProviderPrivate::getFileType(const QFileInfo &info).
This unfortunately involves constructing a QMimeDatabase on the fly,
but the docs say that is fine.
Drive-by change: use nullptr instead of `0` for pointers.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-99178
Change-Id: Ia32ea0a26701d593e74fbecced7be8d9e0aa0f52
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The word "file" could be slightly misleading in this context, because it
refers to an entry on the file system, which could be a regular file, a
dir, a special character device. Clarify the meaning by using "file
system entry" instead of just "file".
Fixes: QTBUG-120688
Pick-to: 6.7 6.6 6.5
Change-Id: Ic2a91cc74336a6718c13ad1ffd9f2c4001e5d63f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
installEventFilter() prepends new objects to the eventList, so that
events that are posted while processing events are left to the next
round of event processing.
This is a baseline test to check that subsequent commits preserve the
current behavior.
QCOMPARE_GT is available since Qt6.4, so make the check backportable to
older releases too.
Pick-to: 6.7 6.6 6.5 6.2 5.15
Task-number: QTBUG-120779
Change-Id: I5ed5e9c2917a9be62de4af19c3b72889399b4fe6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Remove duplicate ones and regroup them.
Add a comment explaining why qthread(_p).h isn't guarded by an
`#if QT_CONFIG(thread)`; thanks to Fabian Kosmale for the explanation.
Pick-to: 6.7
Change-Id: I9b13fd62ab92fa6d2ffc4d004d77e95e95f5fb08
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Instead of filePath() then converting to QByteArray.
Change-Id: I6f656774979bedde5c657613303518750ab06855
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
CLDR does supply information on measurement system, which may be
richer than what we're currently working with, but
* I don't see any hint to which measurement system to use for each
locale by default;
* there is some support for selecting combinations of locale and
measurement system, suggesting it doesn't believe in such a default
in any case; and
* even if it were there, adding it to locale_data[] would take up more
memory than special-casing the few locales that use anything but SI.
Revise the comment to reflect this.
Change-Id: Idfa603fc9a5a55d0bd0da122ac66c76b0edf9f57
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The zone and Windows data tables are sorted on Windows ID and its key
(which are monotonic functions of one another) so we can use binary
chop to find the first matching entry in each, when searching on
these. Furthermore, the search for ID from key can be shortcut as the
keys should normally be consecutive integers starting with 1.
Change-Id: I53f7ff8c93fd6d3d9e48c7bb86060746b68fab3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The list is meant to be sorted in increasing order, requiring
"<anything> (Mexico)" to appear after "<anything>" but in two out of
four cases such pairs were in the wrong order. China sorts after
Chatham Island and lexical sorting of numbers doesn't match sorting by
numeric value.
Assert the expected ordering. (The more important check needs a
QBAV::compare(), which isn't constexpr, so we can't static_assert.)
Later commits shall use binary chop exploiting this ordering. The
assertion failed without the rest of this change.
Also improve the comments describing the data tables these searches
check and the types of their entries. Some were inaccurate, others
merely unclear. Likewise, comment the sorting expectations in the
python code that generates the tables.
Change-Id: I640a3cca8f820c5fd5939a2fe5feb96b04407335
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Various parts of QTimeZone's code were, for no immediately apparent
reason, conditioned on !defined(QT_NO_SYSTEMLOCALE). All are in any
case conditioned on feature timezone; and none had any obvious
relationship with QLocale::system(). Assume this is a fossil left over
from initial development of timezone support and purge.
[ChangeLog][QtCore][QTimeZone] Some features are now available
whenever feature timezone is enabled, that were previously dependent
on system locale support.
Change-Id: I7f2246e17ace22d2aecc9286295ae522ee2a0f5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Upgrading emscripten to 3.1.50 breaks this test, so we disable the time
for time being. After emscripten update this test is to be enabled
and fixed.
Change-Id: Ic48d81e2285ed8f7639bf20c6c29b2b9e402a591
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Use _qt_internal_qml_root_path when collecting the qml root paths using
_qt_internal_collect_qml_root_paths. The property is only applicable for
Android builds. This suppresses the QTP0002 warning for the cases when
android application has both QML executable and QML library modules.
Amends 575b8a7fa289a2e27984a6c322069f9e1b499024
Pick-to: 6.6 6.7
Change-Id: Iccadbe1f6ed697a94dba11af3dd054baec8daf9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The de-virtualization gotcha might result in client code not calling
QRasterWindow::resizeEvent, which we use for dirty state management
after e0eb2818face4ffb7dafd87464f355d4654b7be0.
In practice this wasn't an issue, because QPaintDeviceWindow handles
paint events by calling markWindowAsDirty first, but we should not
rely on this.
Instead plumb the resize event to QPaintDeviceWindowPrivate, which
QRasterWindow implements and can override the behavior of.
Pick-to: 6.5 6.6 6.7
Change-Id: I5c0747da10f0275b77f56be32690d796fa48cdb4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Change-Id: Ifd2832708e0c8e0bde1cad4004839fecffe44e3c
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
According to QUIP-18 [1], all .qdoc files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Change-Id: I4559af21fc9069efa9bf0cbd29c5e86cfdac9082
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Drag the common parts out of the if-else. This also means that
qsizetype size() is no longer truncated in the assignment to quint32
len, but that doesn't fix the problem that we create invalid Qt 5
streams when the QBitArray has more than INT_MAX bits in it. That is
for a follow-up patch (which is why the {} stay for now).
As a drive-by, replace verbose constData() with data() (the QByteArray
is already const).
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Iabf816e16f823bb3959469a635a21339242f36fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Unlike other containers, a QBitArray's size() is not limited by
storage, but, esp. on 32-bit platforms, its size_type: A INT_MAX
size() QBitArray only requires 256MiB of storage.
So we can't rely on "won't happen in practice" here and need to avoid
the potential UB (signed overflow) in the (d.size() * 8 - *d.data())
storage-to-logical-size calculation by using unsigned arithmetic.
Use the opportunity to Extract Method adjust_head_and_tail(),
centralizing the bit fiddling.
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I485eafdf3ce2087a81c683672ff98a43f97c9968
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As a result of using QWidget::setVisible to show the child widgets we
would end up also setting ExplicitShowHide. This is not in line with
the intent of ExplicitShowHide, which is to flag a widget as explicitly
shown/hidden by the developer, which in turn prevents Qt Widgets from
toggling WState_Hidden when the widget is reparented.
By using QWidgetPrivate::setVisible instead, we can show the child
without setting ExplicitShowHide.
As side effect of this is that we no longer reset WA_WState_Hidden
from QWidgetWindowPrivate::setVisible(). This is an issue when the
setVisible call comes as a result of destroying the QWidgetWindow,
as that is an implicit hide, and should not result in the widget
having WA_WState_Hidden. QWidget handles this case in hideChildren
by not calling QWidgetPrivate::setVisible -- instead doing its own
reset of WA_WState_Visible. We don't want to untangle this just yet,
so as a workaround we detect that the widget is already !isVisible(),
thanks to hideChildren having hidden it, and then skip the call
to QWidgetPrivate::setVisible that results from QWindow::destroy().
Task-number: QTBUG-121398
Pick-to: 6.7
Change-Id: Ib5b4d9c84f0569124c5f3ca2169cabff18934e2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The nativeHiddenChild is not used for anything, and shouldn't be
needed to trigger the failure condition.
That said, I was not able to reproduce the test failure on macOS
14 with the test neither pre or post patch, nor with any of the
test cases mentioned in 51300566ffe2ece2455e1d0479a556c5dbb3bb8e,
nor with 51300566ffe2ece2455e1d0479a556c5dbb3bb8e itself, so this
has seemingly been fixed or worked around some other way in the
meantime.
Task-number: QTBUG-121398
Pick-to: 6.7
Change-Id: I299e7f4b71ebdb17870348a3d5b0c49a93228c8b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This is cleaner as the test dirs/files are created in a QTemporaryDir
that is cleaned up automatically, so less manual cleanup in the
unittest.
This also fixes issues for build environments where the source dir is
read-only.
entrylist dir in the source dir is only needed for the construction of
the QResource in the CMakeLists.txt.
Task-number: QTBUG-117449
Change-Id: I3e6389ff730c3a617854e85318f80838e012f2c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't call the native function directly, call the Java function that
calls the native function.
Pick-to: 6.7
Change-Id: Icdcf250313a38f6e4bc2b90fb7b0adbfa5a890fb
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Since 6.7 we consider the BUILD_SHARED_LIBS when creating libraries
using Qt CMake API. This change may affect the user projects that rely
on the old strategy of selecting the default library type. To preserve
the old behavior this change introduces the QTP0003 policy that allows
user to control whether the BUILD_SHARED_LIBS should or shouldn't be
considered in library creation process.
The policy doesn't affect Qt repos, we assume that we want the NEW
behavior by default.
Fixes: QTBUG-121707
Pick-to: 6.7
Change-Id: I4bcfbd8966839731624e3f7ef9e0d6bb2782ac50
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This reverts commit ab6950acab5f799e5b3f097a87300e7c1dd1cf04.
Reason for revert: It breaks test_qml_app_deployment test in qtdeclarative for iOS and Xcode
Pick-to: 6.6 6.5
Fixes: QTBUG-121729
Task-number: QTBUG-120317
Change-Id: I356882a97f63534aa17133a4fbbb1db90295dfba
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 6aed870919feb565955d6d40e23337d98ff10e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes a documentation warning:
(qdoc) warning: Undocumented parameter 'other' in QFlags::operator=()
This warning is reported by the latest version of QDoc, but fixing
it causes another warning in the currently-provisioned QDoc.
Therefore, raise the warning limit temporarily to pass the
documentation check in CI.
Pick-to: 6.7
Change-Id: I14863baebf712cda6f4da6d989e3ab83ffea7f85
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Fixes the following documentation warnings:
(qdoc) warning: Undocumented parameter 'r' in QRgbaFloat::fromRgba64()
(qdoc) warning: No such parameter 'red' in QRgbaFloat::fromRgba64()
(Which repeat for green, blue, and alpha.)
Pick-to: 6.7
Change-Id: I22d281b716865eec649b9fb63f2113f982fdf8ea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
macOS 11 is at its end-of-life and no longer supported by Apple. It
should be dropped from dev (Qt 6.8).
Task-number: QTQAINFRA-6009
Change-Id: Ib5fc5adbc13eb08e4603b226b9d7748417765b15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>