Certain platform-related variables, in this case UNIX, must be set in a
platform module, because they get cleared after the toolchain file is
loaded. Such platform modules live in upstream CMake, but there is none
yet for INTEGRITY. This manifests in an undefined UNIX variable and
"System is unknown to CMake" warnings for the project and every
configure test.
Add the CMake module "Platform/Integrity" in the cmake/platforms
directory. Add this directory to CMAKE_MODULE_PATH to let CMake load
Platform/Integrity when the toolchain file set CMAKE_SYSTEM_NAME to
"Integrity".
CMake's module directory takes precedence, when loading platform
modules. This is special for platform modules and different from the
documented behavior of CMAKE_MODULE_PATH and include().
In case the user wants to provide their own platform modules via
CMAKE_MODULE_PATH, they can instruct Qt to not add its path by setting
QT_AVOID_CUSTOM_PLATFORM_MODULES to ON.
Make sure that configure tests with project files also load the custom
platform module.
Pick-to: 6.2
Fixes: QTBUG-96998
Change-Id: I9855d620d24dc66353cec5e847a2675b464ace26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We were doing this for composeAndFlush already, which accesses the image
via graphicsBuffer().
Task-number: QTBUG-64504
Task-number: QTBUG-64414
Pick-to: 6.2
Change-Id: I51cc002db8a15991f8a8aa32e849c07318e6e74c
Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Use CMake external project to crosscompile android libraries for
mutliple android ABIs at the same time.
The idea behind is to use pre-compiled Qt for each android ABI in
external projects, compile libraries and then utilize results of
compilation in common androiddeployqt call.
By default multi-abi build uses the main ABI that qt toolchain file
belongs to. The list of the autodetected Qt for Android ABIs is stored
in QT_DEFAULT_ANDROID_ABIS cache variable. Users may change the set of
the Android ABIs project-wide using QT_ANDROID_ABIS CMake variable or
for the specific target by adding the ANDROID_ABIS argument when
calling qt6_add_executable. To enable build for the autodetected ABIs
user may set the QT_ANDROID_BUILD_ALL_ABIS option to TRUE.
By default build procedure is looking for the respective android_<abi>
folders to run per-abi build. If user's Qt for Android folder structure
is different then one is created by Qt installer, path to the each
Qt for Android might be overwritten using QT_PATH_ANDROID_ABI_<abi>
CMake variable.
Note: This only adds support for the multi-abi build of user's
applications.
TODO: This commit limits projects to not have in-tree library
dependencies. That means that executable targets may have
dependencies only from Qt directories or android sysroots.
See QTBUG-94714 for details.
[ChangeLog][Android][Platform Specific Changes] Added basic support
for multi-abi builds of user projects.
Task-number: QTBUG-88841
Change-Id: I3239ffe61e6b437e170c8decc5c36a9e774ed0fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Everywhere else in this code, it says
if (update_source_sort_column() && dynamic_sortfilter)
so, doing the same here.
This originally comes from commit 3ffcfc357d
but skelly isn't around anymore, and Milian (reviewer) had
no objection to this change either. Looking into the implementation,
calling it twice is a no-op anyway, create_mapping will early-return
with "already done".
On the other hand, now it has a chance of returning true, while before
it would always return false in the second call ("return true if the column was changed").
I couldn't write a unittest for that case though, it would require that
a source reset also changes the proxy->source column mapping somehow,
but I don't see how that can be done (the latter being the QSFPM setup).
Change-Id: Ie560facf1039a1afc02543e83bfdef0f8f2e09fc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- Those files were moved as part of Qt3D as its the sole
user of these
- Also removed associated unit tests
Pick-to: 6.2 5.15
Change-Id: I302bc219218a58071c86d2447cb4449601fca32c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Using individual booleans to track that the value had changed was not
necessary.
Change-Id: Ieb4712776339aa78bdc75d7608fd74f96d19bbae
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The client and server do in practice depend on each other.
So setting up things is a tad more complicated, and the use
case not big enough to warrant both to be highlighted.
Task-number: QTBUG-96575
Pick-to: 6.2
Change-Id: I0ed69f7a20ec490cc977bde7f1b09162153d0bd2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
operator-> was only defined if QWEAKPOINTER_ENABLE_ARROW is defined.
However, even in that case it would call QWeakPointer<T>::data, which
does not actually exist. Take this as an indicator that nobody actually
uses operator->, and remove the code completely.
Note that the QWEAKPOINTER_ENABLE_ARROW was not documented, and neither
was operator->.
Change-Id: I2f4aa961a64281542c8c1b248a993e83471c059d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Calling pipeWriter->checkForWrite() can indirectly close the socket
even if the bytesWritten() signal has not been sent. So, we need to
make sure the handle is valid before checking pipe state in the
reader.
There is no harm in calling PeekNamedPipe() with an invalid handle,
but the wrong call should be avoided.
This patch amends b2c3b3e8fe.
Change-Id: I5d2ecbbbe0af817aac68ad6f1173b0ed9b324e98
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This is done in preparation for storing the metadata without the magic
string in static plugins and in ELF notes.
Change-Id: I3eb1bd30e0124f89a052fffd16a820454dd56d3e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
GCC is right, the maximum memory allocation is half the VM size,
not the full VM size or multiple times that. QHashPrivate::Span
is big.
qhash.h:552:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a071ffb5d0c70f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Emscripten only supports
SSE1, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, and 128-bit AVX instruction
sets at this time.
https://emscripten.org/docs/porting/simd.html
Browsers might need to enable simd support in the advanced
configurations
about: config or chrome:flags
Enable by configuring Qt with -sse2
Pick-to: 6.2
Fixes: QTBUG-63924
Change-Id: Ifeafae20e199dee0d19689802ad20fd0bd424ca7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If __cpp_lib_hypot is undefined in macos you may observe the error:
error: '__cpp_lib_hypot' is not defined, evaluates to 0 [-Werror,-Wundef]
Adding the explicit check for definition suppresses the warning that
is treated as an error.
Change-Id: Ie4c185fefde2f5bab699d8fc79b6a170e64af393
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
This is the already-loaded counterpart to the file scanning code
Change-Id: I3eb1bd30e0124f89a052fffd16a81f518fa95f0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Those two scanners always return exact results, if the metadata is
present, so we don't need to re-scan (haven't needed since Qt
5.0). Especially since we scan from the end, we were spending cycles
doing unnecessary work.
Change-Id: I42eb903a916645db9900fffd16a4ccfdc7342278
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Both functions took a QString for the input file name, but while the ELF
parser had an optional QLibrary pointer (which was never null) where to
store the error string, the Mach-O parser received a pointer to a
QString. So make both of them take a single in/out QString pointer,
which has the file name on input and is cheap for us because of COW.
Drive-by fix the name of the static function in qmachparser.cpp from
"ns" (which stood for "not suitable") to "notfound".
Change-Id: I3eb1bd30e0124f89a052fffd16a8182f4f8541c3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When we created the functionality, the levels were not yet standardized.
Now they are and you can use -march=x86-64-v3 (for example) to get to
them. We're making a split between "v1" and "baseline" here for the
benefit of 32-bit, which is not included in the ISA levels.
Change-Id: I2de1b4dfacd443148279fffd16a397a700b9a15a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This will allow us to make changes in QtCore itself, without having to
worry about moc compatibility.
The output uses an #ifdef so this version of moc can still be used to
compile earlier versions of Qt (usually, in cross-compilation
environments). See discussion in the mailing list[1].
[1] https://lists.qt-project.org/pipermail/development/2021-September/041732.html
Change-Id: I2de1b4dfacd443148279fffd16a39784c80c5f3b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The reason it scanned backwards was valid, but unfortunately that
doesn't work if the metadata magic appears in the debug info that comes
after the metadata.
Task-number: QTBUG-67461
Change-Id: I2bbf422288924c198645fffd16a9276767ca2589
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The current CMake configuration sets QT_ANDROID_SDK_BUILD_TOOLS_REVISION
only internally, taking the latest build-tools found. A project might
still want to manually set specific build-tools version.
Pick-to: 6.2
Task-number: QTBUG-97002
Change-Id: I553563638160fdef7a27b9b334d1d9aae5d8b7e1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Previous code was getting the QFontEngine from the font+script instead of from
the QTextEngine.
The font+script is not enough information to know if a given character is
smallcaps or not, while the QTextEngine actually has access to the information
needed and returns a properly a scaled fontengine if character is small caps
Pick-to: 6.2
Fixes: QTBUG-13965
Change-Id: I9f95bd2f3c3bdff76c3acb94fa2edc99cdeb0a13
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It tried to sanity-check the correction being made to the time as a
result of converting zone to UTC, but handling also the case where the
correction avoided a gap. However, there are too many quirky cases to
permit a simple condition. The latest to trip it up is a case of a
zone leaving local solar mean time; a time in the gap that hits is
shunted by the width of the gap, which could be any old thing, and
won't show up on the data describing the zone before or after the
transition.
In any case, one branch of the check was doubling the zone's standard
time offset, which makes no sense. As that was checking for
double-DST, it would need to check standard offset plus twice the
usual DST offset; but the data it's looking at probably has its DST
offset set to the doubled one that needs to deal with. In general a
change in DST without going via standard time will have problems here,
and a change to standard time could also present problems.
Stop trying to shore up the assert and just trust the offset we got.
Change-Id: I4519f47e79dfb7595f4a12c259b80a338bc7033c
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
So far the pages were only 'rooted' in the separate qtcmake
documentation. Let them have a page per module too, so that
it's easy to navigate.
At the same time rename the cmake-macros-qtcore group to
cmake-commands-qtcore. This will require a fixup in qtdoc
repository.
Pick-to: 6.2
Change-Id: Ifc09b27a6c220b5feab64686ca47c60d3342e71a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The property is nowadays on QGuiApplication.
Pick-to: 6.2
Change-Id: I8759761b08b0cdcef786ca96a7fa6364331f157d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
For normal \page elements, \brief is just showing in the
\generatelist or \annotatedlist commands. Make sure the description
is also visible in the actual CMake command/variable/property
page by defining a \summary macro.
Pick-to: 6.2
Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This reverts commit 657525965b.
The change relied on reading the last value of the
CMAKE_MINIMUM_REQUIRED_VERSION variable before one of the Qt packages
is found to use it for the version check.
Even if a user project has a cmake_minimum_required() right at
the beginning of the project with a supported version specified,
the first project() call which loads a CMake toolchain file could
contain another cmake_minimum_required() call with a lower
(unsupported) version and that version would be used for the check,
failing the project configuration.
The Android NDK ships such a toolchain file, which requires version
'3.6'.
Thus, relying on the last value of CMAKE_MINIMUM_REQUIRED_VERSION is
not robust enough.
Pick-to: 6.2
Task-number: QTBUG-95018
Task-number: QTBUG-95832
Change-Id: Iff3cb0a46e6e878569dce9c5fe915a714a034904
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
androiddeployqt writes a list of architectures into the build.gradle
file. This list should only contain the architectures which are enabled.
This patch adapts the generation of this list accordingly.
Amends 07cfab07a2.
Change-Id: I5c7c1886c54cc3b9a7e42af6eefbaf2a067a67d5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since Qt6, QByteArray uses qsizetype as an integral type for offsets
and sizes. In order to support large blocks, we have to migrate to
that as well.
Change-Id: I2c2983129d6a2e0a1e8078cc41d446a26e27288c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch removes most of the checks that are made using C++20
__cpp_* macros for features available in C++17 and earlier.
Library feature check macros (__cpp_lib_*) are unaffected.
Change-Id: I557b2bd0d4ff09b13837555e9880eb28e0355f64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The comments are not needed, since we're adding a docs page
for the manifest, which include the information from these
comments and more. Keep the manifest clean.
Pick-to: 6.2
Task-number: QTBUG-95285
Change-Id: I1fd8bc695f5aab1bcc69f549cb3ddeeaac168b98
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The Gradle version in qt_attribution.json doesn't mention the actual
version that is currently used.
This amends 67c3f3f4ff.
Pick-to: 6.2
Fixes: QTBUG-71328
Change-Id: I50fbabd56beb44389f9453666822f9667bab7d61
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Given that we rely on C++17, it should be safe to mandate that level of
language support.
Change-Id: If07ccb36bea2a5113a8f5aacf635be7d2590baf7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.38.
Change-Id: Ib6ab544790747a94a00b8eb516314ff3c57e4c79
Pick-to: 6.2 5.15
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The modification to the existing constructor was necessary to avoid
ambiguous overloads from plain strings. They'd previously only match
QByteArray, but now they match QByteArrayView too.
The QByteArray constructor must stay even in Qt 7 because the pattern is
stored. The QByteArray indexIn also stays in because of ambiguous
overloads. Unless we want to remove the const char* overloads.
Change-Id: I2bbf422288924c198645fffd16a92859b67f3978
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We were to strict in what surface type we allowed scrolling for. The
RasterGLSurface type is an odd one, used by widgets to compose GL
and raster content, which means we still have a raster backingstore
we can scroll. It's just the flush that's different.
Pick-to: 6.2
Change-Id: Ia229c21c00ad38df9e87f4fc78e341e030ef228d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The --skip-benchlib option was misnamed: there are several benchlib
tests, of which it only skipped the callgrind one. As there is no
other test involving callgrind, rename to --skip-callgrind.
Change-Id: I0179fd35dd79c525f79e4a28a626e964323409bf
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The comment against the use of this claimed qvsnprintf() lacks 64-bit
support, which is probably untrue by now but certainly irrelevant as
the value being formatted is a qreal, not a 64-bit integral type.
Since %g wants a double, make the value passed explicitly double by
casting its denominator. Casting its numerator to qreal was
superfluous as that's its type already.
Change-Id: I5ff885fbeb9b638b2b0507061e0a19e3b8522143
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make the overloads taking a size private (they're only called by the
implementation of the others) and have them take qsizetype for the
size, rather than size_t. Make the still-public ones consistently
return 0 on failure and move the documentation to them.
Change some spurious checks (QTestCharBuffer::size() is necessarily
positive) to assertions, use '\0' for the nul character to make it
visually distinct from the integer 0. Use a do..while loop instead of
break-ing out of the tail of a for (;;) loop. Remove spurious extra
nul-termination - the function taking size alread did that, so the
wrapper to size-expand needn't. Minor style cleanups.
Change-Id: I7440f3d9be5e3b2dd88c2aad62bcd1af9fc02278
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The extern declaration for filter_unprintable() was nowhere used and
no such function is anywhere defined.
The for (;;) loop with lots of reasons to break; was better structured
as a do {...} while loop. A comment on -1 as return from qvsprintf()
was misplaced. The '\0'-termination after calling qvsprintf() was
redundant as vsprintf() reliably '\0'-terminates anyway. Turned a
static const into a constexpr. Assert size (a QTestCharBuffer
necessarily has size >= 512).
Change-Id: I5b7729b9bd66fea0ee7ce3e7cfdde6770f10b36c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QtNetwork project file excludes the dnslookup source files for Unix,
despite the dnslookup feature is always on. This inconsistency leads to
linker errors when building applications against QtNetwork:
(error #412) unresolved symbols: 1
QDnsLookupRunnable::query(int, const QByteArray &, const QHostAddress
&, QDnsLookupReply *) from libQt6Network.a(qdnslookup.cpp.o)
Turn the feature off for INTEGRITY and remove the condition from the
project file.
Pick-to: 6.2
Change-Id: If086da51ca343f598eb273236e7b6338f5da1e97
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This patch introduces support for the WinRT UI languages API.
We are using the Win32 API to get the list of preferred languages when
the system locale is used. However, this API returns an incomplete
list.
As Qt 6 supports Windows 10 and above, we can make use of the WinRT
API, if it's supported by the compiler. This API returns the full list,
as reported by the Windows system itself.
Note however, that this API can't be used with Clang and MinGW, so
we still have to fall back to Win32 API for these compilers. We also
do it if WinRT API returns an empty list of languages for some reason.
Fixes: QTBUG-94341
Pick-to: 6.2
Change-Id: I1d23c68d2ec298ae7835d0d18718876ff041aede
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We don't have any APSPI2 includes in our public headers and should
therefore not export the target that provides ATSPI2 include paths for
consumers.
Link against PkgConfig::ATSPI2 instead of the _nolink target.
The former will not be exported.
Pick-to: 6.2
Fixes: QTBUG-97023
Change-Id: I4b12e0c2230917feeb963c02565e6db24f757bd3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>