Add custom targets with '_benchmark' suffixes to make run of
benchmarks using generators possible, e.g.:
$ ninja tst_bench_qudpsocket_benchmark
Extend '-[no]make' option to pass benchmark. Rework
'-[no]make' processing to unify these options processing.
Also looks like it doesn't make sense to enable benchmarks without
having test enabled. So '-DQT_BUILD_BENCHMARKS' enables test as own
dependency automatically.
Task-number: QTBUG-89076
Pick-to: 6.0
Change-Id: Ieee9eadaf6d75a1efec120242d6eb786ace1b071
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Dropped the RTEMS patch (upstream now uses posix_madvise).
Drop support for the TILE architecture (dropped by upstream).
[ChangeLog][Third-Party Code] PCRE2 has been updated to version
10.36.
Pick-to: 6.0 5.15
Change-Id: Idb4467bef0ff520605b8b5d9188b9d67d8e4d0f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Looking at grafana it rarely fails in dev so unblacklisting it.
Though it is a little more flaky after switching to http 2 by default
because then we only have one channel and more requests end up queued in
the same channel, which will get errored out when the server
disconnects.
Task-number: QTBUG-88943
Change-Id: If5d6335864ce6bbc35f519b2c6d7068e4181afd2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
headFromHttp hasn't been flaky since 5.14 times according to grafana,
does not fail locally.
Same situation with ioHttpRedirect as above.
ioHttpRedirectMultipartPost has not failed on Windows since october
2019, assumed stable now.
backgroundRequestInterruption no longer exists.
ioPostToHttpFromSocket would fail in debug MSVC builds but was
fixed in 710886fbdd.
Task-number: QTBUG-88943
Change-Id: Ida640179ef15a3452291745e4e94a71a385f57ae
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The intention was always that you can define properties that do
not require a changed signal. But having to explicitly pass
a nullptr as signal parameter into the macro is ugly, so
use the cool QT_OVERLOADED_MACRO to make it optional.
Pick-to: 6.0
Change-Id: I0ce366d043850f983c968d73c544d89933c48df9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The windows library user32 is no longer a known library for qmake; add
it explicitly.
Pick-to: 6.0
Change-Id: I61f44e8a2cbccbabbdc5d58bd2615b431097aafd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When a CMake release introduces a new policy that affects most Qt
modules, it may be appropriate to make each module aware of that newer
CMake version and use the NEW policy without raising the minimum CMake
version requirement. To reduce the churn associated with making that
change across all Qt modules individually, this change allows it to be
updated in a central place (qtbase), but in a way that allows a Qt
module to override it in its own .cmake.conf file if required (e.g. to
address the issues identified by policy warnings at a later time). The
policies are modified at the start of the call to
qt_build_repo_begin().
For commands defined by the qtbase module, qtbase needs to be in
control of the policy settings at the point where those commands are
defined. The above mechanism should not affect the policy settings for
these commands, so the various *Config.cmake.in files must not specify
policy ranges in a way that a Qt module's .cmake.conf file could
influence.
Starting with CMake 3.12, policies can be specified as a version range
with the cmake_minimum_required() and cmake_policy() commands. All
policies introduced in CMake versions up to the upper limit of that
range will be set to NEW. The actual version of CMake being used only
has to be at least the lower limit of the specified version range.
This change uses cmake_minimum_required() rather than cmake_policy()
due to the latter not halting further processing upon failure.
See the following:
https://gitlab.kitware.com/cmake/cmake/-/issues/21557
Task-number: QTBUG-88700
Pick-to: 6.0
Change-Id: I0a1f2611dd629f847a18186394f500d7f52753bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Both on Unix and Windows, _q_processDied() unconditionally releases all
resources associated with the terminated child process, resets QProcess
to the initial state, and emits finished() signal. Thus, we can omit
reporting success, which also eliminates the related checks from
callers.
Change-Id: I40e32d1a9ccc8d488be6badba934355d734a8abd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
One was only called once. For the other, one of the calls wasn't
necessary.
Pick-to: 5.15 6.0
Change-Id: I7b9b97ae9b32412abdc6fffd16454eec59d72b8a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Similar to the previous commit which applied to QCborStreamReader, don't
allocate too much data before checking that the stream actually has that
much.
Pick-to: 5.15 6.0
Fixes: QTBUG-88256
Change-Id: I7b9b97ae9b32412abdc6fffd16454b7568a063ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
By calling the internal readStringChunk() function with a QByteArray
pointer, QCborStreamReader::readByteArray() can now avoid allocating the
resulting buffer until the internals have confirmed that there is
sufficient data in the incoming buffer. As a result, we first detect the
EOF condition before we conclude the payload would have been too big for
QByteArray (validation()) test. Meanwhile, the hugeDeviceValidation()
test ends up with a few conditions where it would have copied 1 GB of
data, so limit that too.
We make a choice of reporting OOM vs DataTooLarge only if QByteArray
fails to allocate in the first place (QByteArray::resize() ->
Q_CHECK_PTR -> qBadAlloc, QtCore is always built with exceptions on).
The QCborValue unit test needed a temporary work around until we apply
the same allocation fix (see next commit).
Pick-to: 5.15 6.0
Fixes: QTBUG-88253
Change-Id: I7b9b97ae9b32412abdc6fffd164523eeae49cdfe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
And add a currently-unused QByteArray pointer parameter. This function
will resize the array as necessary as data comes in.
Pick-to: 5.15
Change-Id: I7b9b97ae9b32412abdc6fffd16451f5c6b280f3b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The QByteArray documentation is extended to align with QList and
QString regarding common wording and ideas:
- Extend general class description
- Revise description of several methods
- Wrap descriptions at 80 characters
Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: Ie9e8ef47a85d0867c2fa63889a60cafbe76ee47a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
So these two classes throw when trying to allocate silly sizes or in OOM
conditions.
We probably want to move these Q_CHECK_POINTER into QTypedArrayData but
I didn't want to do that in this commit.
Task-number: QTBUG-88256
Task-number: QTBUG-88253
Change-Id: Ifc61bb80b9bf48a386abfffd1648176111770174
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Wrap Qt tests to handle TESTRUNNER and TESTARGS environment variables.
Variables are handled according to qmake build procedure. All test
now are wrapped by generated CMake script.
Fixes: QTBUG-88053
Pick-to: 6.0
Change-Id: I339977ce6ce11ddd38a4bf0bd26eb8f2ae463ba3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Employ the same kind of optimization existing for removeAll/erase.
Change-Id: I0781cc02d4430ceab60e6e50a5ffe6fde87be9ce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The old link zstd.net is not working any more. Zstandard is now at
http://facebook.github.io/zstd/. To ease maintenance in the future,
those links now point to "Zstandard Site" which is maintained in
external-resources.qdoc.
Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ic8f067fd5d7ce1a088d0272797fca98fd506a26e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't want to (officially) expose customizations like this
to the user, now that high-DPI is always enabled and should
work.
Change-Id: I2f0bd7c625b565896b0766586f191ff5001eb60a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
At the same time I'll add a generic protection against being called in
unprotected mode in the schannel backend (openssl already has it in a
different form).
Pick-to: 5.15 6.0
Change-Id: I97c1be6239c27e306de0af7ad568fbcfde09da71
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We want to remove the Qt .pro files for projects, except examples,
because examples are still meant to build with qmake.
To not lose coverage on examples built with qmake, add instructions that
will build the qtrepo/examples folder with qmake when the CMake
configuration has -DQT_BUILD_EXAMPLES=ON.
This means that such configurations will build examples both with CMake
and qmake.
Aside from making sure that our examples will still build with qmake, it
will gives us some some coverage that a CMake-built qmake works
correctly.
Implementation-wise, add new instructions files that can call qmake and
make depending on configuration and target type.
Pick-to: 6.0
Fixes: QTBUG-85986
Change-Id: Ie8f4cbcda03c94da2aef455e32f48dad41a4bdb0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Previously a default constructor was required for the result type
of mappedReduced() and filteredReduced(), even if a default value
was provided.
This patch fixes the problem.
The issue was in the ResultReporter type, that was calling
QList::resize() to adjust the size of expected reported results.
A default-value parameter was added to the class, so that
a corresponding overload of QList::resize could be invoked.
Task-number: QTBUG-88452
Change-Id: I51113753e314d76aa74d201b5a7e327a6ca75f47
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
QColors were not premultiplied before being set.
Pick-to: 6.0 5.15 5.12
Change-Id: Id3765b6932a72374ddfd788fae4bb628a4edf0b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In registerAlias(), return true if this instance is already registered
with the given name.
Previously there was no way for a QCalendarBackend to tell whether its
primary name registration had succeeded, during instantiation (other
than by devious hackery using a QCalendar instance with the name and
some form of back-channel in the instance).
Use this in backendFromEnum() to catch cases in which (e.g. due to a
race condition) a new instance isn't the one that got registered.
Pick-to: 6.0 5.15
Change-Id: I468ac364a68bf3574cd7f8b8b1e672d8fd969111
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The URL for the PAC proxy that is passed needs to be preserved for the
main URL part and not entirely percent encoded, only the query part
typically needs to be encoded. So use toEncoded instead for a URL to
ensure they are not percent encoded. This amends
c163ec1dbf
Pick-to: 6.0 5.15
Change-Id: Ie41ab55f71be8e25c18775e61ce7b4d110c2ddbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When debugging a spurious failure it's extremely useful to
run the test repeadtly into a debugger until a failure appears.
When that happens, one wants to immediately start debugging.
In so far, this has only been possible by placing breakpoints
inside Qt itself (when a failure is logged). Add another way:
an env variable, similar to QT_FATAL_WARNINGS, that makes
any failure fatal (terminate() gets called. Bonus: you can
control the termination handler!)
[ChangeLog][QtTestLib][QtTest] When the QTEST_FATAL_FAIL
environment variable is set to a non-zero value, a test
immediately aborts its execution. This is useful to debug
intermittent failures.
Change-Id: If2395f964ea482c30b8c8feab98db7fdee701cd3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
With this we can avoid leaking the QInputDevice which is created when
the platform plugin does not provide any. The onwership is solved in a
similar way as in the plugins, except that here we have no parent which
really fits, so we use QCoreApplication::instance instead.
Pick-to: 6.0
Change-Id: I77a212fb592ba3d5a42b2ecd486763e3b4d3410e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The AES and SHA features were checking for the wrong TEST_subarch_foo
variables.
Pick-to: 6.0
Task-number: QTBUG-87376
Change-Id: I46cd14d98832529aebac22cfcb01180330c5e091
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The source permissions are transferred when using configure_file for
non-prefix builds. This allows running qt-cmake-standalone-test in
both non-prefix and prefix builds.
Change-Id: I38829901d0bd4dfc4b89c665169798052b218fb0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Just like it was done in the .pro file.
Pick-to: 6.0
Change-Id: I7def52127f4bab6f0ef490ac7eee2de2da479352
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Following a41c61fb2d QIODevice may try to
copy the QByteArray itself (rather than the data it points to). This can
lead referencing dangling data when the QByteArray is initialized with
raw data.
Pick-to: 6.0
Change-Id: I481695b33f251f750ef482d72b81636f0d4bf462
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a QBindable is created from a computed property, it is not possible
to actually set a value or a binding. If we try to do it anyway, we'd
get a crash. Thus we now check whether the function pointer is null
before invoking it.
Pick-to: 6.0
Task-number: QTBUG-87153
Change-Id: I5bedb9080ccf79d9b8166b80d5733d095ed76f8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since API 29 functions:
- getExternalStoragePublicDirectory
- getExternalStorageDirectory
are deprecated and no longer return directly accessible path.
This patch replaces calls to those with suggested call to
Context.getExternalFilesDir(String)
Task-number: QTBUG-87803
Pick-to: 5.15 5.12 6.0
Change-Id: I36bc5d5b72a80017996445af0d577aacf5e112d3
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Since Q_COMPILER_ATOMICS is defined for every supportied MSVC compiler
in qcompilerdetection.h, qatomic_msvc.h is not included anymore in
qbasicatomic.h and can be removed.
Change-Id: I6505da5d5e9f1c3f9a060ad30cabb4b652634aa3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The conversion operator from QPMI to QModelIndex should return by
value, to hide implementation details and so that we don't have to
rely on a static empty QModelIndex.
Change-Id: I92b3f8451422f2b69bf31f28b387a124fd24ec46
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0cd2935ed9d772f0eb06d03201baabd60764ec80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The hash and equality operators used need to be consistent with
each other. Unfortunately, QPMI::operator==() is not suitable to do
this. So specialize qHashEquals() for QPMI.
Fixes: QTBUG-88966
Change-Id: If5f19a722ae9fc4e78e93537e7ea15726f148768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 83e95956ed58e88b11e2cc3cb61c5beacb7985db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In some cases, the default equality operator for a class is not suitable
for using in hashing (for example because it uses fuzzy comparisons).
Add a qHashEquals() method that by default uses the equality operator, but
allows to tailor the operations that should be used when using the class
as a key in QHash.
Task-number: QTBUG-88966
Change-Id: I346cf0e6e923277a8b42a79e50342a1c2511fd80
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5d8b586e73e37070b0303bee24372550854637eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>