- Use QT_ANDROID_EXTRA_PLUGINS to specify a correct plugins directory
- Update plugin names on Android to match the expected format
- Add explicit dependency on the plugins, so that they always get built
and included in the APK
- Update the test code to respect the fact that plugins are packed
differently on Android.
All these steps allow to enable this test for Android in CMakeLists.txt
Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: I09e389c761688cea216d8922b94ea3a2600f7a67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
- Use QT_ANDROID_EXTRA_LIBS to correctly deploy libraries on Android.
- Update the test code to use the application libraries directory
instead of resources on Android.
This allows to enable the test for Android in CMakeLists.txt
Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: I2f6d2d4f3ab3872cf7d7fad1668b5c2c3eef3aad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The test will never pass on Android because it's missing permissions
to read root filesystem.
Skip the test instead of blacklisting it.
Fixes: QTBUG-87427
Pick-to: 6.3 6.2
Change-Id: Ib57a49b1d2bc4204f8aa2c3028c7220d23ff2a91
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Skip a test that uses QProcess instead of blacklisting it.
Re-enable this test in CMakeLists.txt, so that it can be checked
in the CI.
Fixes: QTBUG-87431
Pick-to: 6.3 6.2
Change-Id: If8a4acd60735f355dffa60c28b8d07695ee33ec8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
For x86_32 the alignment of QBasicAtomicInteger<8 bytes> is not
equal to the alignment of TypeInStruct<8 bytes>, so do not perform
the check.
Fixes: QTBUG-87422
Pick-to: 6.3 6.2
Change-Id: I6e6c6cb7b2b7195e430d6a6991004bcfce16d4cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It relied on the set(QT_REPO_MODULE_VERSION ...) line being the first
thing in the file. It no longer is, and the variable is referenced in
an earlier condition.
Change-Id: I2bd2abd2a5680782ddd61f4bf4a4a3265b444d52
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Copying lot of testdata over NFS to qemu image start failing with
errors of "No space left on device" even there is enough space left.
Pick-to: 6.2 6.3
Change-Id: I2a417ed5b8c131e0a1f68c37b1fc2446ea013304
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The zone name was reported if isValid() failed, but not if
isTimeZoneIdAvailable(), where it also proved useful in uncovering
ICU's use of over-long zone name components.
Change-Id: I4b3b65b1a4a338b638c01fc7ad47294118ee0efc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The exception was previously limited to Android, but I now find that
ICU has the same over-long names; it seems likely that's where Android
gets them. Also update the link to the theory page from the TZ DB, as
it now has an official home on www.iana.org.
Task-number: QTBUG-99747
Pick-to: 6.3 6.2
Change-Id: I9af67426d15609dfaf5f335405ceb1218fcf40ff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
If the active QWidget gets destroyed, then QWidgetWindow::focusObject
will return nullptr. If then no other object takes focus, then we'd
never emit change signals, and QGuiApplication's _q_updateFocusObject
(which then informs the input context and emits signals) didn't get
called. This left the input context with a dangling focus object
pointer, which resulted in crashes.
If the QWidget clears its focus, but the corresponding window doesn't
know that it had focus, then fall back to the widget's focus widget
to see if we have a change in focus, so that signals get emitted.
Add a test case that shows that we didn't call _q_updateFocusObject
by counting emissions of the QGuiApplication::focusObjectChanged
signal, which we emit in this function. The signal is emitted more
than once both when showing a widget, and now also when destroying
a widget that has a focus child. The former is a previous issue,
the latter is an improvement to not emitting the signal at all.
Pick-to: 6.3 6.2
Fixes: QTBUG-101423
Fixes: QTBUG-101321
Change-Id: Ib96a397211d442f52ce795a3eebd055a0ef51b0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If the QPromise is being destroyed, we should signal the associated
futures to stop waiting. No matter in which state the promise is, if
it's not finished, we should always cancel to avoid infinite waits.
This is also what docs state:
"The promise implicitly transitions to a canceled state on destruction
unless finish() is called beforehand by the user."
Fixes: QTBUG-101284
Pick-to: 6.3 6.2
Change-Id: I65ebfefe03b79b41afacda78a4f49938c54d8b37
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Currently test relies solely for external test server. This makes it
not possible to run test successfully with environment where docker is
used.
Pick-to: 6.2 6.3
Change-Id: Idf7e99c19ab630065b651f2f6d957311f45f0db7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Currently test relies solely for external test server. This makes it
not possible to run test successfully with environment where docker is
used.
Pick-to: 6.2 6.3
Change-Id: If716921ce6ceea1ced2d0d7025c6e9768b4ed7a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Only (straightforwardly) implementable with modern APIs, and
only really exists to handle special platform cases, such as
when a video framework gives us a D3D texture array with
D3D11_BIND_DECODER | D3D11_BIND_SHADER_RESOURCE
which is only possible to use as a shader resource if the SRV
selects a single array layer.
Has no effect on the normal usage of texture arrays, where all
array layers are exposed, and it is the shader that selects the
layer when sampling or loading via the sampler2DArray. That
continues to be the standard way to work with texture arrays.
Change-Id: I0a656b605da21f50239b38abb83067e0208c1dbe
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Don't mix unsigned and signed types in comparisons.
Pick-to: 6.3
Change-Id: Ia4ba9c114177425a21cadc8cafe8179928315a5d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
After cbf1b4bc60bca3994b8f8685ee922e53a6b4eed2 the selected item got
deselected on Ctrl+Press, which made Ctrl+dragging a selected item
impossible.
Only deselect on Ctrl+Release. Add scenario to existing test case,
and update the documentation to clarify the properties involved, and
to point out that the event parameter might be nullptr.
Fixes: QTBUG-101647
Pick-to: 6.3 6.2
Change-Id: I749b1cb1a0a311f5c1d4c333984716f05f2c90b5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Enderlein <volker.enderlein@ifm-chemnitz.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
To enable using `ninja tst_qlocalsocket_check` and have the
helper (re)built as part of the dependencies.
Pick-to: 6.3 6.2
Change-Id: I8703c4202a97606991d1cffe0d0f8e909a51f12f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Skip some of the obviously failing QCompleter-related tests instead of
blacklisting them.
Skip a test that causes a crash.
This allows to re-enable this test in CMakeLists.txt for Android.
Task-number: QTBUG-87417
Pick-to: 6.3 6.2
Change-Id: Ie7ee708df8ceddf117689e8ac749850ba86e8816
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This test doesn't fail on Android anymore, so don't use QEXPECT_FAIL.
Pick-to: 6.2 6.3
Task-number: QTBUG-100470
Fixes: QTBUG-69242
Change-Id: I5a96566728a486c701656aede1818e7ab7f019be
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The test is very flaky on Windows 11. Make sure that we have a secondary
window to close before proceeding, and wait for fade effects to finish,
otherwise we might never get the leave event from the windowing system.
Also replace a QVERIFY(qWaitFor) construct with a simple QTRY_VERIFY.
With these changes, a local run of 20 repeats of this test on a stressed
VM improves from 75% to 100%.
Pick-to: 6.3 6.2
Fixes: QTBUG-98477
Change-Id: Iedcc175b336e3cab23817b954aba1736d02f1b9d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When a B?Fail's description doesn't match the QVERIFY/QCOMPARE
regexes, it got output as a comment in the YAML block after the test
line had already reported it as a TODO comment. An empty description
would also have lead to an empty comment in the YAML block. Condition
this fallback output case on there being a description that hasn't yet
been reported in the test line.
Task-number: QTBUG-96844
Change-Id: Id7fe81d26ddb01da3d8003ada8fa590a5e1a166f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In all places but one they were treated the same; fix that last one to
match the rest. This removes one line from the YAML block for each
blacklisted XFail test; in each case, this message duplicates the one
on its "not ok ... # TODO..." test line.
Change-Id: Iff2028afccd979db7f2c84e85d1b78541900008e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Network autotests cannot connect to services on docker containers from
QNX qemu without all ports explicitly defined (both host and container)
side.
Pick-to: 6.2 6.3
Task-number: QTQAINFRA-4684
Change-Id: Iba44cfa17d42d43ecec3e29985e404f75d5fc232
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
In some situation we want to notify even if the value didn't change.
Task-number: QTBUG-101771
Pick-to: 6.2 6.3
Change-Id: I7d82a9f6e0f7d5eb48065e3f428b814939181ea8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Don't use deprecated methods in tests, and don't refer to them in
documentation.
Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This has performance benefits when doing comparisons.
The check is only performed at compile time.
Task-number: QTBUG-101014
Change-Id: I55694b045fe5e75d9671d0a3a70c80d998cf98c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adapt to changes in QWidget::addAction API from 08e4d2db08.
Pick-to: 6.3
Change-Id: If6e05b47de88cf55070238f08b96586b855cc5c1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This was lost when QtCore, QtGui and QtWidgets were split up. Restored
now via a virtual function on QObjectPrivate.
Chose to return std::string instead of QString or QByteArray because
its SSO is usually sufficient to hold these flag strings.
[ChangeLog][QtCore][QObject] Restored printing of Qt3-style
information from dumpObjectTree().
[ChangeLog][QtWidgets][QWidget] Restored printing of Qt3-style
information from QWidget::dumpObjectTree().
Fixes: QTBUG-101732
Change-Id: I39ff5728ea5f5abbdbf81b5d7e13b8d16b6ee8b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
... in preparation for replacing the QString keys in the public API
with QAnyStringView ones.
This removes the "important optimization" that avoids a detach in the
common case where the input is the same as the output of
normalization. But that optimization is beside the point, because it
trades a memory allocation avoided in the library for O(N) allocations
inserted into user code for each call to QSettings::value(), the vast
majority of which are calls with string literals.
With the public interface ported to QAnyStringView in the follow-up
patch, we can then internally optimize memory allocations _in a central
place_ (e.g. by returning std::u16string or QVarLengthArray<QChar> from
normalizeKey() instead of QString). But first we need to get rid of all
the unwarranted allocations in user code.
Change-Id: I45fc83d972c552a220c9c29508001d3f172e1162
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Selection change handlers of the items might call a method that
implicitly recreates the selectedItems QSet, which then invalidates
the iterators of the ranged for loop, resulting in crashes.
Iterate over a copy of the set instead.
Add a test case that crashen without the fix.
Fixes: QTBUG-101651
Pick-to: 6.3 6.2
Change-Id: I6da6f4043fe1906b0186931a37283f635cb5a404
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Add move constructor and move assignment operator.
To allow for the the change to be implemented QTemporaryDir, the
internal d_ptr was modified from a QScopedPointer, which is not movable,
to a raw pointer.
Add member + free swap implementations.
Add tests.
[ChangeLog][QtCore][QTemporaryDir] Enabled move semantics.
Change-Id: I9f196a77c70b4ca0b7f0c06505d00fdd87a9785c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
ClipboardManager didn't have any APIs to clear clipboard data before
API level 28.
As a workaround an empty Intent with MIMETYPE_UNKNOWN is created and
inserted into the clipboard for lower API levels.
This makes the QApplication::clipboard()->clear() method work more or
less as expected.
This allows to unblacklist tst_QPlainTextEdit::copyAvailable().
Task-number: QTBUG-87423
Task-number: QTBUG-89402
Pick-to: 6.3 6.2
Change-Id: I454376199cf3b8eed0fa2ecf2f85b87f40892280
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Because setObjectName() now takes a QAnyStringView, passing C string
literals is much more efficient than using QString::fromUtf8().
This patch only deals with setObjectName() as a known property,
probably from a name attribute. If the objectName property is set by a
<property> element (or so I assume), we still emit a
QString::fromUtf8(). Detecting objectName there would be too much
magic.
Besides, I haven't been able to find why sometimes there's a second
setObjectName call right after the first, when in the XML it seems all
kosher (name attribute and objectName <property> agreeing on the
content).
Change-Id: Icf07bad841ac735a9c744bbd955428ba15758089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Parent window in sizeLessWindow test was using software pipeline at
least on webOS, causing a QCRITICAL() exit when the test was executed.
Fixes: QTBUG-101869
Pick-to: 6.3
Change-Id: Ie8cc0ea0b6a09729475389be44197e01a45b217f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
There is no reason to allow relock() on a locked locker, or unlock()
or an unlocked one, just like we don't allow that on a plain mutex
to begin with. The docs already said that e.g. relock() locks an
_unlocked_ locker.
[ChangeLog][QtCore][QMutexLocker] QMutexLocker allowed relock() and
unlock() on an already closed (resp. open) locker object. These
semantics have always been undocumented and are now unsupported
(in both cases they yield undefined behavior.)
Change-Id: Id5f67beb5dc30d6435dae88a3085fba93ec7d96e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Percent-decoding was previously only present as a static method taking
a QBA parameter; it might as well be an instance method of that
parameter. Change most QBA tests to use it rather the static method.
[ChangeLog][QtCore][QByteArray] percentDecoded() is now available as
an instance method of the byte array to be decoded, equivalent to the
static QByteArray::fromPercentEncoding().
Change-Id: I982101c44bdac5cc4041e85598d52ac101d38fa1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The class is similar to unique_lock in that it allows for unlocking
and relocking. Since the locked state is tracked by QMutexLocker itself,
it's trivial to make it movable.
[ChangeLog][QtCore][QMutexLocker] The class is now movable.
Change-Id: I534044f8024575e996c12efb2236761d493798a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Connecting to nullptr, or connecting to a non-signal PMF, would result
in a QFuture which would never finish. Catch these cases and handle
them.
Windows+MSVC for some reason fails the test. I can't entirely understand
why, so I've marked it as XFAIL, with QTBUG-101761 to track it.
Change-Id: I314980e7e9b7156d8cddd3b33d5cbf1d0bcd6116
Pick-to: 6.2 6.3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Use VERBATIM option to prepare the correct command line for the
add_custom_command. This especially sensitive when using build
directories with names containing special symbols, that cannot be
handled by shell correctly.
Change-Id: I51d7041cb806411135fd59bf6273c04a3c695443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QString already has a localeAwareCompare(QStringView, QStringView)
static method. Use it in QStringView::localeAwareCompare(QStringView).
[ChangeLog][QtCore][QStringView] Added
QStringView::localeAwareCompare().
Task-number: QTBUG-98431
Change-Id: Iec3865a5439d9fb653cc1150da21042186bdee98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>