clang warns that: local variable 'big' will be copied despite being
returned by name [-Wreturn-std-move]
So force the intended move using std::move.
Change-Id: If5ff557c1b577789e6659783d8106295fafb3485
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since d385158d52 , schannel is built by default on Windows.
Pick-to: 6.2
Change-Id: I46cd437c9cbfae9ba74d1aebb5f1e8db3383ec2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Update the build.gradle for main Qt jar code, and add same files for
network and network information backend, so the code can be managed
from Android Studio.
This also adds .gitignore to ignore Android Studio build artefacts.
Pick-to: 6.2
Change-Id: Ic06e9d12708070fad112f17e58b8754608d184f3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
jcenter() is deprecated and will be shutdown by next year [1], thus
the replacement mavenCentral() could be used instead.
[1] https://blog.gradle.org/jcenter-shutdown
Pick-to: 6.2
Change-Id: Ic9d1c15d657f23712ee4c866d5c1a45706353429
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add startOnReservedThread that specifically releases a reserved thread
and uses it atomically for a given task. This can make a positive
number of reserved threads work.
Change-Id: I4bd1dced24bb46fcb365f12cbc9c7905dc66cdf1
Reviewed-by: David Faure <david.faure@kdab.com>
Given on most CI configurations we run tests only on debug builds, this
means that effectively we don't test JIT paths (JIT is kept disabled in
debug builds). To keep it enabled in a test, we have a few options:
* export a developer-build-only variable from QtCore, to force JIT
usage, and set it in the test. This is still suboptimal as many
configurations aren't using developer builds in the first place;
* use the already existing QT_REGEXP_USE_JIT environment variable,
setting it from CMake/CTest. The problem here is that although add_test
does support it, we don't expose it through our wrapper functions;
* just set that env variable from within the test itself. I went for
this option.
Change-Id: I73abfb7fc0d76ec77e881f24c5daf5be304ab948
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows to create EGL context without involving Xlib.
This extension was created a year ago and is present in Mesa since 21.0
Change-Id: Id9bcbffe8c46cb00d9cc0a9a425c1706d1b52b28
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
After calling close(), the socket can enter 'Closing' state, in which
we try to write buffered data before disconnecting. As the device is
already closed, we must disable any pipe reader activity and clear the
read buffer.
Change-Id: I8994df32bf324325d54dd36cbe1a1ee3f08022d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Although the Apple docs claim that Rosetta can translate apps that
contain just-in-time (JIT) compilers, it seems to have problems with
the PCRE JIT.
https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
To be on the safe side we disable the JIT explicitly when detecting that
we are running under Rosetta. It's already disabled when we're running
on macOS ARM natively (see 2f8df4d1a8).
Fixes: QTBUG-97085
Pick-to: 6.2
Change-Id: I0e133939f28087560d4bc8354b7e49013e94a9f9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Since 9e1875483c the logic of sending
QKeyEvent was changed to only happen when we explicitly decided to not
treat input as complex text, or when a selector for a command was not
found. This missed the case where we handle cancelOperation by falling
back to sending a regular key event. We now set m_sendKeyEvent to true
to trigger this logic.
Fixes: QTBUG-97119
Pick-to: 6.2
Change-Id: Ibb72f4b068cce735db8d76e5e0a1882aae115207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is not the correct script to update harfbuzz. The correct one is
src/3rdparty/harfbuzz-ng/import_from_tarball.sh
Change-Id: Ic9ed43cae591cd6957effb10f557166c43498ad9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The various macros that implement a test's main() call a test object
initMain() static function, except for QTEST_APPLESS_MAIN. Add it to it.
[ChangeLog][QtTest] initMain() is now also supported when using
QTEST_APPLESS_MAIN.
Change-Id: I46b1eae5ce3bb8c9a5aca525f193c9250e520c6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add a script that downloads UCD data for a given Unicode version,
unpacks it, and copies the used files to appropriate locations inside
the Qt source code.
Also update the README and use an HTTPS link for the UCD data file.
FTP links are no longer supported by some browsers.
Task-number: QTBUG-94359
Change-Id: I2aa70a588f675e411fa6b3ce5b4444a7c07ed707
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The brush transform was ignored for pattern/texture brushes. Since
fill patterns always have a transform in pdf anyway, we can just
multiply in the brush transform.
Fixes: QTBUG-96978
Pick-to: 6.2
Change-Id: I80357f61fb879dfb1226d4ef9469ae5c9a9c1147
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
- getgrgid/getpwuid are not supported
- the default constructor of "ObserverOrUninit" must be referenced for GHS compiler
Task-number: QTBUG-96176
Pick-to: 6.2
Change-Id: I24093da76e116aba4b87a8f5c5763b03d082a2cd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
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>