This saves repetition of the call in the midst of query strings.
This incidentally makes it possible to give informative names.
In the process, build those query strings using QLatin1String::arg(),
instead of implicitly converting ASCII strings to QString in order to
then do arithmetic with them, at least when the arithmetic involves
more than one addition. In one instance, where two branches did the
same thing with different format strings, limit the branching to
selecting which string to use, then do the common thing once.
Change-Id: I60fd7457a727bcc3872d3052d8fd638ebaf36ac2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Use initializer lists rather than << entries.
Use arrays where we don't need the lists at all.
Make them const when they can be.
Replace foreach with ranged-for.
Use auto rather than naming iterator types and save end() at the start
of the iteration to save re-requesting it each time round the loop.
Reverse arguments to a QCOMPARE() as actual should come first and
expected after, not the other way round. Change some casts from
C-style to type-as-function-style, use QString literals rather than
C-string literals that would need conversion at compile time and
QLatin1String::arg in preference to arithmetic where the same format
is duplicated.
In the process, reworked one test to put its two iterations, one over
good query strings, one over bad ones, into separate blocks using
separate const arrays, instead of reusing a list with an uninformative
name.
Change-Id: I4a272be3eb58e9dca136238277b92379d6ca076d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The loop used an int counter that was initialized from a size_t,
provoking a warning from MSVC. Since the indexing is irrelevant in any
case, use a ranged-for loop. Since the loop was formerly in decreasing
index order, reverse the table being iterated so that entries remain
in their prior order.
Change-Id: I79b93c5a3f39a502b0cae83215b8e3665d0e17f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
[ChangeLog][QtGui][QDesktopServices] URL handlers that have been passed
to setUrlHandler() must now be removed by calling unsetUrlHandler()
before they are destroyed. Relying on the handler's destructor to
implicitly unset it is now deprecated, because it may already be in use
by concurrent openUrl() calls. Support for implicit unsetting will be
removed in 6.6 and, until then, a qWarning() is raised if it is
exercised.
Fixes: QTBUG-100775
Fixes: QTBUG-100779
Pick-to: 6.3 6.2 5.15
Change-Id: I0c4f91b78f847b135fdeb38766babc892bdc1379
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
tst_qcoreapplication.cpp is used both in tst_qcoreapplication and
tst_qguiapplication. To distinguish these two compilations,
the define QT_GUI_LIB was used. This led to an error on Android,
where Qt::Gui is always linked, because the Qt Android Platform
Plugin needs it.
This patch introduces the preprocessor define QT_QGUIAPPLICATIONTEST
which is to be used only in the compilation of tst_qguiapplication.
This is then used instead of QT_GUI_LIB.
Change-Id: Ifa5bfacb197d68365288c1da85573106515fc6c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If adding a QLineEdit to a QGraphicsScene as a QGraphicsProxyWidget, the popup
completion of that QLineEdit is drawn in the wrong location. When the completer
getting the rect of screen, it gets the rect of the QGraphicsScene where
QLineEdit is located rather than the rect of the screen, resulting in an error
in the following calculation.
Note that as long as the completer popup is a toplevel widget not parented
to the target widget, it will not be automatically embedded into the graphics
view via QGraphicsProxyWidget. So with multiple views for a scene, or in views
that use transformations, the geometry will still be off.
Pick-to: 6.3
Task-number: QTBUG-20531
Change-Id: If5d8a707ca35a9e4709117b077978145c6143e46
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
tst_QFutureWatcher was deactivated for Android. This patch activates it.
Fixes: QTBUG-88136
Change-Id: Iead82e22d73eb15c9ecd2756eb33925910bbffc0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
- current INTEGRITY development pack don't support denormals for float and double.
All values are rounded to 0.
Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: Iaaacdc4210c7ac2ec3ec337c61164a1ade0efb01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... which implements or assumes something about the
broken^Wnon-STL-compliant insertion behavior.
Once this has integrated into all module dependencies, we can
re-implement these APIs using STL-compatible semantics.
Task-number: QTBUG-100092
Change-Id: I54f4f5ce7addd9543866d2c399f48aff50983b88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Even QtCore alone cannot be built without the properties feature since
Qt 5.5. While fixing this is easy, other modules like dbus,
networking are also using QObject::property() and friends liberally.
All in all I doubt that anybody will miss the feature (otherwise it
would have been fixed in the last decade).
Change-Id: Iaf3cc20bda54ee2ff3b809fac8fa82b94ecc88c0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The macOS standard library doesn't have std::contiguous_iterator yet, and
it doesn't seem like libc++ has it either.
Checking __cpp_lib_concepts for the C++20 official version appears to work.
Pick-to: 6.3 6.2
Change-Id: I8c31cd64de24c03b3a3f37cb393bb2f9b55a834d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Remove Integrity and Android specific code that explicitly adds
test data to the resource files. qt_internal_add_test functions
implicitly adds test data to resources for Android and Integrity
platforms by default.
Change-Id: Ia1d58755b47442e1953462e38606f70fec262368
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Multiple tests use qt_internal_add_resource that copies the
functionality that is already implemented inside the
qt_internal_add_test function. Simplify these test by replacing
the qt_internal_add_resource call with the new BUILTIN_TESTDATA
option.
Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Size a QMdiSubWindow is no real toplevel widget, QLayout::activate() did
not properly set the minimum size based on it's children. Fix this by
treating a QMdiSubWindow as a toplevel widget during the calculation.
Fixes: QTBUG-100494
Change-Id: Ia2e6c519c7214c36383facd244711bd932231d40
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If one calls setPlainText("") before setting a placeholder text,
the placeholder visibility is not updated, and the placeholder is not
visible. Fix it by updating placeholderVisible properly.
Fixes: QTBUG-96212
Pick-to: 5.15 6.2 6.3
Change-Id: I1bd3f0cb4c59973a847bcf3787e35d7c17b6d673
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In one case, cast an int to qsizetype rather than the other way round,
in order to compare them.
Change-Id: Id8dffe61f9565040f1a5ee24867956397f814a55
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Some of the else if lines exceeded 100 characters, so should have been
split; and some lines already were split. So each whole chain should
have had braces on its bodies. Instead make it a switch, as this makes
it more evident what's going on in any case. Furthermore, as each
branch did the same thing with dbType-specific strings, change to just
setting QLatin1String variables, so that the rest of the code needn't
be duplicated in each branch; it can simply be done once after the
switch, using the string's .arg() to embed fragments. In the process
break up the SQL query strings more gracefully, purge spaces just
inside C++ parentheses.
Change-Id: Ie26166e098ad74720bb6d7c4d9fe47718c33a13c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Telling us the condition tested should have been true is what
QVERIFY() does anyway, so don't go to the whole trouble of saying the
same thing - and wrapping it in in a QString() merely in order to then
qPrintable() it back out again, pointlessly converting a C-string to
unicode and back again.
At the same time, skip one other qPrintable(QString("...")) without
.arg() formatting; and change the check it's the message for to use
QL1S::arg() instead of QString::arg().
Change-Id: Ie71a79da8017916d301a38b69fc422e55a5a3649
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Expected warnings are clutter for anyone reding the output, so
suppress them when they're correct behavior.
Change-Id: Idf47ba4fab8069237067d9b20afef3041e0c2f8c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Doing the tidy-up after the last check has the problem that it gets
skipped if any check fails, as the premature return skips the tidy-up.
In the process, added the missing tidy-up to prematureExec().
Repackage the code for one tidy-up as a named lambda so that the
duplicate can share it with the scope guard. Made some existing scope
guards const, while I was about it, so that the one that isn't -
because it gets dismiss()ed - stand out.
Change-Id: I96d6834d5d7675f15018169a7093b0211db6f8a9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Raster pipeline is not supported on webOS OSE: trying to use it causes
an exit(1).
Fixes: QTBUG-100654
Pick-to: 6.3
Change-Id: I00325fc1330a2d0d4abfdee054343ecfac767309
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
[ChangeLog][Potentially Source-Incompatible Changes] The qtextstream
header no longer includes <QString>, <QStringEncoder> and
<QStringDecoder>. Code which relied on the implicit inclusion of those
classes might now need to include the headers explicitly.
Task-number: QTBUG-97601
Change-Id: Ifb8c8452026195a772c0588dbbbc53fb51cac548
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use custom script to copy big Android artifacts on Windows platforms.
The script uses 'copy' but not 'copy_if_different' when source file
size is bigger than 2GB. 'cmake -E copy_if_different' only compares
first 2GB of files because of cmake issue, so this step only
workaround the problem.
Pick-to: 6.2 6.3
Task-number: QTBUG-99491
Change-Id: Id076734700e334dfc3330da412462c2b53829b33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It only stores one layer of state, and pausing twice in a row will just
overwrite the previous state. This doesn't happen often but can happen,
especially on Windows if a certificate needs to be looked up in the system
certificate stores (socket gets paused) and then a recoverable error
occurs in QNAM (socket gets paused again).
Fixes: QTBUG-100362
Fixes: QTBUG-63196
Fixes: QTBUG-98476
Pick-to: 6.3 6.2 5.15
Change-Id: Ie524c48e11b6fa8010b78cc1bf3931efe2ce3351
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
No need for a virtual do-nothing destructor in a class that isn't
inherited from. Defining an empty init merely makes QTest go to the
trouble of calling it, which it could just as well skip.
Change-Id: Ifd44c473c05fdeaaa7923d2ccdd0a13c8921b6bd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The offset fields for tst_QTimeZone::specificTransition() had a
comment claiming they are in minutes; they are in fact in seconds, so
fix that. At the same time, Moscow hasn't had a time-zone change since
2017, so the end-date for one of the test intervals can be nudged a
little closer to the present without harm.
Change-Id: I66822cb758f7e00d6added801466a6745be3e31a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Unless "." (or the empty string) is in $PATH, we're not supposed to find
executables in the current directory. This is how the Unix shells behave
and we match their behavior. It's also the behavior Qt had prior to 5.9
(commit 28666d167a). On Windows, searching
the current directory is the norm, so we keep that behavior.
This commit does not add an explicit check for an empty return from
QStandardPaths::findExecutable(). Instead, we allow that empty string to
go all the way to execve(2), which will fail with ENOENT. We could catch
it early, before fork(2), but why add code for the error case?
See https://kde.org/info/security/advisory-20220131-1.txt
[ChangeLog][Important Behavior Changes] When passed a simple program
name with no slashes, QProcess on Unix systems will now only search the
current directory if "." is one of the entries in the PATH environment
variable. This bug fix restores the behavior QProcess had before Qt 5.9.
If launching an executable in the directory set by setWorkingDirectory()
or inherited from the parent is intended, pass a program name starting
with "./". For more information and best practices about finding an
executable, see QProcess' documentation.
Pick-to: 5.15 6.2 6.3
Change-Id: I54f205f6b7314351b078fffd16cf7013c97ee9fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In C++20, any given relational operator is also considered in its
reversed form, so e.g.
given op==(X, Y)
and X x, Y y, then y == x will compile, by using the reversed op(X, Y)
This, unfortunately, makes some existing asymmetric operator overload
sets ambiguous, and instead of applying tie-breaker rules, at least
Clang is warning about these.
For us, this means we need to make our overload set non-ambiguous. The
QJsonValue{,Ref} classes failed this, because they only provide the
following member-operators:
- QJsonValue::op==(const QJsonValue&) const
- QJsonValueRef::op==(const QJsonValue &) const
For member functions, there are no implicit conversions on the LHS. So
in C++17, we have a nice dichotomous overload set:
- LHS is QJsonValue -> use QJsonValue::op==(QJsonValue)
- LHS is QJsonValueRef -> use QJsonValueRef::op==(QJsonValue)
In both of these, it the RHS is a QJsonValueRef, it's implicitly
converted to QJsonValue for the call.
Enter C++20, and the reversed signatures are suddenly available, too,
which is a problem for QJsonValueRef <> QJsonValueRef, which could be
resolved, as in C++17, using
lhs.QJVR::op==(QJV(rhs))
or it could now be
rhs.QJVR::op==(QJV(lhs)); // reversed
Says Clang 10:
tst_qtjson.cpp:990:5: warning: ISO C++20 considers use of overloaded operator '==' (with operand types 'QJsonValueRef' and 'QJsonValueRef') to be ambiguous despite there being a unique best viable function [-Wambiguous-reversed-operator]
CHECK(r0, a0, r1);
^ ~~ ~~
qjsonvalue.h:189:17: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
inline bool operator==(const QJsonValue &other) const { return toValue() == other; }
^
A similar argument makes op!= ambiguous.
Says Clang 10:
tst_qtjson.cpp:988:5: error: use of overloaded operator '!=' is ambiguous (with operand types 'QJsonValueRef' and 'QJsonValueRef')
CHECK(r0, r0, r1);
^ ~~ ~~
qjsonvalue.h:190:17: note: candidate function
inline bool operator!=(const QJsonValue &other) const { return toValue() != other; }
^
qjsonvalue.h:189:17: note: candidate function
inline bool operator==(const QJsonValue &other) const { return toValue() == other; }
^
qjsonvalue.h:189:17: note: candidate function (with reversed parameter order)
To fix, provide the missing operators as free inline functions (so Qt
6.2 and 5.15 don't get new symbols added) so there's always exactly
one best match.
This is a fix for 6.2 and 5.15. At the time of writing, 6.3 isn't
released, yet, so there, we could QT_REMOVED_SINCE the pre-existing
member operators in favor of hidden friends (as per QTBUG-87973).
Use C++17'isms to prevent an automatic merge to 5.15, which requires
contains(QT_CONFIG,c++2a):CONFIG += c++2a
added to tst_qtjson.pro.
[ChangeLog][QtCore][QJsonValue] Fixed relational operators to not
cause warnings/ambiguities when compiling in C++20.
Pick-to: 6.3 6.2 5.15
Change-Id: Ic70f3cad9987c87f7346d426c29cc2079d85ad13
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Amends d42cfeb84f, which would result in
infinite recursion when the Edit menu was populated and added to the
menubar after the menubar has been shown.
Add a macOS-only test case that reproduces the crash without the fix.
Fixes: QTBUG-100441
Pick-to: 6.3
Change-Id: I018a7aa7f01558a3b9732b4d6d96a911dc7fbd19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add baseline tests for QListView, QTableView, QTreeView
Add const to reflect number of available standard icons
Add baseline test for QLineEdit
Task-number: QTBUG-99677
Change-Id: I1abaae7f90c9b05c3b3467dc85c5652bc9d0f53b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The value of __cplusplus has nothing to do with whether the library
implements wg21.link/P1115 (libstdc++ even before C++20) or not
(libc++, even in C++20).
Use the idiomatic check (#if defined(foo) && foo >= x) instead,
fixing the Android build.
Pick-to: 6.3 6.2
Change-Id: I11bcefe455a1f13865c15d4beecbd3fe32115328
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
moc, qmake, rcc, and uic tests execute corresponding tools inside
the test executables. This adds dependencies explicitly, to execute
tests using _check targets, without the need to manually build
dependencies.
Pick-to: 6.3 6.2
Fixes: QTBUG-98576
Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
To clarify its purpose and separate it from the others
Pick-to: 6.3
Change-Id: Id9efcf474ac0cd8777393380bb85c83780454005
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
CI tests for QNX are run in QEMU which does not have enough RAM
to run this test successfully.
Pick-to: 6.2 6.3
Change-Id: Idab3e8b6a1e0ae3eddf5aedb82e6784a74ae9a3a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
There is a TODO for this in Qt Quick from the 6.0 times. To decide
upfront if Metal can be expected to function, or if a fallback to
OpenGL needs to be triggered (especially important with macOS virtual
machines, where, unlike any real macOS system, Metal may not be
present at all), the scenegraph calls create() and then drops the
result. The idea to make this less wasteful was back then to add a
dedicated probing function which can, possibly, perform the checks in
a more lightweight manner than full initialization. Implement this
now, focusing on Metal.
Brought to attention by QTBUG-100441: printing warnings about not
having an MTLDevice is confusing in a Metal-less macOS VM, because it
is not an actual error, only part of the probing at scenegraph
initialization. We can now avoid printing confusing warnings there.
Change-Id: Ie52c36af9224bedc3f5e4c23edb486d961c9f216
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The auto-repeat timer of QScrollBar kicks in after 50ms, so if the test
takes too long and the timer fires during the qWait call or during event
delivery, then we might get multiple valueChanged emissions.
Detect that scenario and allow the test to XFAIL if things take
a significant time (more than 40ms vs the expected 1ms).
Pick-to: 6.3 6.2
Change-Id: Ie90aadc62372397db695fd2b34fe1f5252ce8d37
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Create QAbstractSpinBox test
Update test for QSpinBox
Add tests for QDoubleSpinBox, QDateEdit, QTimeEdit
Add test for QDateTimeEdit incl. calendar popup
Task-number: QTBUG-99677
Change-Id: Ia74686f47a1520ab4c7e878b19fc774e00db88dd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As with QHoverEvent, it's better to require globalPos rather than
"initialized to QCursor::pos(), which may not be appropriate" as the
docs have pointed out for many years now. This removes the remaining
calls to QCursor::pos() in event constructors.
Task-number: QTBUG-52430
Task-number: QTBUG-69433
Task-number: QTBUG-100324
Change-Id: I076dae56f37abaad7085cc95dddee453a80a45f3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use alternative method for finding searchPath since
QT_TESTCASE_SOURCEDIR did not point to a correct location on webOS
QEMU test environment.
Fixes: QTBUG-99954
Pick-to: 6.3
Change-Id: I05f95b4aa02027976036d0842ca564a602e01d0e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
When QCborValue referred to an empty array or map, toArray() and toMap()
would respectively return the default value instead of the empty object,
as expected.
Pick-to: 6.2 6.3
Change-Id: I5e52dc5b093c43a3b678fffd16b60456d0037ad7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Switched to use runtime path instead of compile time path for the
helper executable. Some tests cases were failing on webOS because of
wrong path.
Fixes: QTBUG-99846
Pick-to: 6.3
Change-Id: I566bc04bdb96ac6e7dd0a875eadb50685aef8282
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It leaves the system in a state that breaks at least one later test,
so put it last. (This was first seen when picking back to 6.2, but I
am now able to reproduce it on dev.)
Amends commit 78eac57f3d
Pick-to: 6.3
Change-Id: I918cf43cdfc27357329a175518d6f9755747bae5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QSinglePointEvent ctor assumes that the given globalPos is correct,
so it was wrong that the QHoverEvent ctor passed along a local position
as global. It's better to require globalPos as an argument; and in fact
it seems that everywhere we construct a QHoverEvent, global position is
available, or possible to get by transformation (which is better than
resorting to QCursor::pos()).
Also, don't convert to QPoint: pointer events have qreal resolution and
there's no reason to truncate them.
Fixes: QTBUG-100324
Change-Id: I919455da36265988d3d149eb97563c9ed0d2c660
Pick-to: 6.3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
On X11 we already had to wait as window managers might scroll windows
in. On macOS we also waited - albeit a bit shorter - also because
screens scroll in slowly.
We didn't wait on Windows, and on Windows the test is quite flaky.
Attempting to make it run stably by waiting for long enough so that all
paint events are flushed to the screen.
As a drive-by, break some overly long lines.
Task-number: QTBUG-100412
Pick-to: 6.3
Change-Id: I49b1e447aced2fe1af3c5d30b514f8df3cc1813c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A default-constructed QPluginLoader erroneously reports that the
load hints are empty. However, setting a filename would then
automatically set the PreventUnload hint, surprising the user.
Return the correct flags instead.
Amends 494376f980
Change-Id: I7a95964cb680afd3adf2f71ed73d2f93023238f2
Fixes: QTBUG-100416
Pick-to: 5.15 6.2 6.3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When running a test under increased verbosity levels, QTestLib would
print "failure location" for every QTest function (QVERIFY, QCOMPARE,
...), even if there's no failure at all.
Keep the code centralized, but split the formatting of failures and
non-failures (other messages).
Task-number: QTBUG-96844
Change-Id: I3c508653176b68579dc0eb0cffcc153a52da2e2c
Pick-to: 5.15 6.2 6.3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
While investigating an assertion failure I noticed that the existing
tests didn't even exercise these methods for local time or zone time.
Of course, we can't robustly test these time-specs, due to vagueries
of offset details and zone availability, but we can at least verify
that they return date-times on the specified date. Add a test-case for
the start of 1900, on which the assertions were first seen; it is the
earliest moment representable with tm_year >= 0, after all.
One of these tests fails on 6.2 but the fix for that (as opposed to
the the assertion) requires 6.3's improvements to the handling of
time_t's fuller range - too risky a change to pick back to 6.2.
Pick-to: 6.3
Task-number: QTBUG-99747
Change-Id: I98f5d7850a701972b2d8ea2ce203a2b3e7071354
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qt_internal_undefine_global_definition disables an internal global
definition that is defined by the qt_internal_add_global_definition
function for a specific target.
Remove the ability to set the custom "undefine" flag for the
definitions since it's hard to control it using the introduced
function.
Pick-to: 6.2 6.3
Task-number: QTBUG-100334
Change-Id: Ic1637d97aa51bbdd06c5b191c57a941aa208d4dc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Not MSVC, but pretends to be.
Pick-to: 6.3 6.2
Change-Id: I5c201dd917e79a22d6ef15715bf1d3a7010d123e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In 63eea5e5c69434871eaef9d9dc7184d7e54d7276, the
Qt::ItemNeverHasChildren flag was introduced. QFileSystemModel
was modified to use this flag for items which are not directories,
but only if the QFileSystemModel is not read-only and
the directory is writable.
This patch modifies QFileSystemModel to use the ItemNeverHasChildren
flags also if the model is read-only and if the item
is read-only.
Amends 63eea5e5c69434871eaef9d9dc7184d7e54d7276
Change-Id: Ie7f7d58ecf7baade93f9f03d120da84d3c005d42
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Amends e3b2b12a91, which made the
style sheet calculate the font-dependent text size, but didn't
add the space needed for the close button or a tab icon.
QTabBar's layout code already adds the space needed for icons
and margins to the size; so instead of overwriting that size,
subtract the size needed by the normal font, and then add the
size needed for the font form the style rule, considering both
vertical and horizontal tab bars.
Fix the test case to style only one tab rather than the entire
tab bar, otherwise the font is applied to the entire tab bar,
and not just to a specific tab, which is the style sheet style
code in question.
Pick-to: 6.2 6.3
Task-number: QTBUG-6905
Change-Id: Ieed0ba146a32e81229419adecaf41f467cfd5959
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Task-number: QTBUG-100362
Change-Id: Ib09aec5ea03867163d476a2c92562bc949fc1b1a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The code was trying to avoid a detach in the case no element needed to
be removed, by first running find_if() on const_iterators, and then,
after converting its result to (mutable) iterators, start the
remove_if() algorithm where find_if() left off.
But this applies the predicate to the element found by find_if() (if
any) _twice_: first just before we exit the first find_if() and then
just as we enter remove_if(), which will start by running find_if()
again, with the result of the initial find_if as 'first'.
Apart from being needlessly inefficient, this violates the
specification of Uniform Erasure, which defines sequential erase_if()
as being equivalent to remove_if() + container erase(), with the
former being specified to apply the predicate exactly once per
element.
Fix by writing the remove_if() part by hand.
Instead of doing the dance with the loop invariant documentation
twice, simply implement erase() via erase_if() (complicated a bit by
the weird passing of predicates by lvalue reference instead of by
value, as would be idiomatic). This exposes users to:
[ChangeLog][QtCore][Potentially Source-Incompatible Changes] A fix in
the implementation of the erase-like algorithms of sequential Qt
container may re-enable signed/unsigned comparison warnings previously
suppressed by having occurred in std library code. To fix, cast the
value to look for such that it has the same signedness as the
container's elements.
... but the issue would be the same had we inlined std::remove()
instead of passing a lambda to sequential_erase_if(), so it's nothing
we can, nor should, work around.
[ChangeLog][QtCore][Containers] Fixed a bug in the implementation of
most sequential Qt container's erase-like algorithms (member
removeAll()/removeIf() and free erase()/erase_if()) where the equality
operator or the predicate, respectively, was applied to the first
matching element twice. Each element is now tested exactly once.
Pick-to: 6.3 6.2
Change-Id: Ib6d24b01b40866c125406f1cd6042d4cd083ea0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Some calling code did this beforehand, other didn't. Now, the function
itself checks for an existing handler before doing anything else.
Change-Id: I8fc43fb8788c9dfe825b15ffa2fa69ee43915cd6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
.. but this will only be supported on Vulkan, OpenGL 3.2+, and Open GL
ES 3.2+ for the time being.
The situation is:
- Vulkan is working. qsb accepts .geom files already, and QShader has
existing geometry shader support.
- OpenGL 3.2 and OpenGL ES 3.2 are working.
- D3D11 is not working. D3D11 supports geometry shaders, but SPIRV-
Cross does not support translating geometry shaders to HLSL.
- Metal is not working. Metal does not directly support geometry
shaders.
Change-Id: Ieb7c44c58b8be5f2e2197bf5133cf6847e6c132d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Support for Polygon Mode (Triangle Fill Mode in Metal, Fill Mode in D3D)
in the RHI graphics pipeline.
Options are Fill and Line
Status:
OpenGL - ok
Vulkan - ok
Metal - ok
D3D11 - ok
OpenGL ES - does not support glPolygonMode.
Change-Id: I20b7ef416624700c3dc8d1cbe6474f4ca3889db8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Restore the 'QT_NO_JAVA_STYLE_ITERATORS' and
'QT_NO_NARROWING_CONVERSIONS_IN_CONNECT' definitions for Qt
targets.
Add the function that adds global definitions for Qt targets according
to the provided scope and the target property-based switch to disable
the definition for a specific target.
Pick-to: 6.2 6.3
Task-number: QTBUG-100295
Change-Id: I28697e81f9aabc45c48d79aae1e5caea141e04e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If the signal passed to QtFuture::connect() takes multiple arguments,
we need to wrap the arguments in a std::tuple when reporting the result.
To detect this case we were checking if the result type of a QFuture
returned by QtFuture::connect() is a std::tuple, but this was not
correct: the result type could be a std::tuple also if the passed
signal takes a single std::tuple argument. Instead, check if the signal
takes more than one argument.
As a drive-by modified the tst_QFuture::signalConnect to use const
values for tuples used in multiple test-cases, to avoid repetition.
Fixes: QTBUG-100071
Pick-to: 6.2 6.3
Change-Id: I1ce39cf87028f36ef94a9d1a4423b0c51473afd4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The test was already blacklisted for Windows 10 and Windows 7. Now it
is flaky on Windows 11 as well.
Blacklist it for all windows platforms.
Task-number: QTBUG-98478
Pick-to: 6.2 6.3 5.15
Change-Id: I870fb6ce80cfe244a76d08bf40677fdb6becab97
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
The IGNORE directive was likely removed as an oversight
in the linked change.
This fixes the test to pass when bumping the Qt version.
Amends 9836dbd6ee
Change-Id: I497325d6d8b8b67cce7b0840bfb9bfa70d85fe73
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
From the API review.
Pick-to: 6.3
Change-Id: Ic05737db79327e7811fcd974a70914b837e06601
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The test also fails on Windows 11
Pick-to: 6.2 6.3
Task-number: QTBUG-98475
Change-Id: Iab079587d743500d222f2272d1145424e079b4a3
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Update Catch2 header to latest released version. Needed
to build correctly with glibc 2.34.
Two patches applied on top of the upstream release. Previously
used Qt specific change extracted to a separate patch file.
Fixes: QTBUG-95842
Pick-to: 6.3 6.2
Change-Id: I67e442bbe756ff00c96a45eabf593f7aecddd628
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add a level of indirection via void_t such that
struct is_transparent {};
works, and not just
using is_transparent = <unspecified>;
Pick-to: 6.3
Change-Id: I3ca2af6a07e6989dc95abc10fb2d0078a5269e5b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The test has been XPASS'ing recently on Android.
Reverts 67e209f59f.
Fixes: QTBUG-69216
Change-Id: Ic629cc28936e0ef27277c243717e97226bf01b1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
- It should not be built for systems without process feature.
Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If id == 0, then we should grab the specified rect from the screen.
To do that, find all windows intersecting with the screen geometry, and
compose their backing store images into a screen-size pixmap.
Otherwise, find the respective backing store and grab only that.
Remove the old code respecting the desktop widget, which is no longer a
thing in Qt 6. The code was also wrongly grabbing only the first
containing - not intersecting - window's backing store into the screen
pixmap.
Enable the QScreen::grabImage test for the offscreen platform, where it
now passes.
Task-number: QTBUG-99962
Change-Id: I16eca7b082d65095a62c73624f86a4423e997a7a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QSqlQuery::exec() took for granted that it can dereference driver(),
which should be true for all sane usage; however, it should not crash
if used misguidedly. Added regression test, based on bug report's
reproducer, which crashes without the fix.
Fixes: QTBUG-100037
Pick-to: 6.3 6.2 5.15 5.12
Change-Id: I94600bc60f89e82a1121b418144006a683921a38
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
577d698b8e changed QString::isUpper /
isLower behaviors to match Unicode semantics: a string is uppercase
if it's identical to its own toLower/toUpper folding. These semantics
come from Unicode so they're not up for debate.
That commit however left QByteArray untouched. Generally speaking, we
want to move away from QByteArray as "text storage" -- this has
partially happened between Qt 5 and Qt 6, where QByteArray went from
Latin-1 semantics to ASCII semantics. Still, QByteArray offers
toUpper/toLower and isUpper/isLower and all this family of functions
should be consistent in behavior.
Apply the same fix that was applied to QString.
[ChangeLog][Important Behavior Changes] The semantics of
QByteArray::isLower() and QByteArray::isUpper() have been changed. Now
lowercase (resp. uppercase) byte arrays are allowed to contain any
character; a byte array is considered lowercase (resp. uppercase) if
it's equal to its own toLower() (resp. toUpper()) folding. For instance,
the "abc123" byte array is now considered to be lowercase.
Previously, the isLower() (resp. isUpper()) functions checked whether
the byte array only contained ASCII lowercase (resp. uppercase)
characters, and was at least 1 character long. This had the side effect
that byte array containing ASCII non-letters (e.g. numbers, symbols,
etc.) were not lowercase nor uppercase.
[ChangeLog][QtCore][QByteArray] QByteArray::isLower() and
QByteArray::isUpper() now work correctly with empty byte arrays. The
semantics of these functions have been changed.
Pick-to: 6.3 6.2
Fixes: QTBUG-100107
Change-Id: Id56a42f01b2d1af5387bf0e6ccff0f824f757155
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is an issue for QQuickWindow in practice, although it is not hit
by our current tests.
Pick-to: 6.3
Change-Id: Ia73704c1af6a82b2689ce7b844d3b0eb9a17ec18
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
QThreadPool automatically deletes the runnable after it finishes running
the task. In case QThreadPool is nullptr, we should delete the runnable
manually. This amends 87b93c29be.
Pick-to: 6.3 6.2 5.15
Change-Id: Id7e4ed3d4d6de05990edf62e4099852983debc64
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Take the argument by value instead of rvalue ref. In C++17, this is as
efficient, and enables the
return big;
to use the QByteArray move constructor, avoiding the need for a manual
std::move(), which always looks suspicious on a return statement,
because more often than not, it's a pessimization that breaks NRVO.
This code doesn't seem to exist in Qt 6.2, so only
Pick-to: 6.3
Change-Id: I8bf678102f5df1870cfc61090d12f327478d74d1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Clang 10 warns about unused results of relational operators, which is
where this is coming from.
Fix by adding the usual prefix
[[maybe_unused]] auto r = ~~~;
to silence the warning. Do this elsewhere, too, since [[nodiscard]] is
slowly being rolled out across all our APIs. This is not a complete
sweep, though.
Not picking to 5.15, because this pattern doesn't work there and I
don't want to introduce a new one.
Pick-to: 6.3 6.2
Change-Id: I40dd8ad07496b686979dce533e044cbb486e30f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The timeToTest constant doesn't need to be captured, claims Clang.
Since I don't recall seeing this warning on GCC, be pragmatic and fix
by letting the compiler choose what to capture: [&]. timeToTest is
const, so it doesn't matter whether we capture by reference or value,
the lambda cannot change it either way.
This code doesn't seem to exist in 5.15, so merely
Pick-to: 6.3 6.2
Change-Id: I48d42ab13ed22ac5eb512dc61235b72a19636ea3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The function name suggests that the *= operator is to be benchmarked,
not simple multiplication.
Use the correct operator.
Pick-to: 6.3 6.2 5.15
Change-Id: I6718e8aea640a153083858b39963199e7bab26e9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The class is not intended for inheriting from it (see also
e502906305), so we can mark it as final
to explicitly forbid this. The tests were still using it as a base
class to clean the results during destruction, so fix them accordingly.
Task-number: QTBUG-99883
Pick-to: 6.3
Change-Id: I4a7ee3e2b462bd704e4b5a95ed733144805d6e5b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Unlike QString and QStringView, QByteArrayView and QByteArray don't
overload well.
Solve the overload issue the usual way: by making the QByteArray one a
Q_WEAK_OVERLOAD. This is trivial for QStaticByteArrayMatcher, which
isn't exported, but require QT_REMOVED_SINCE magic for
QByteArrayMatcher, which is.
The additional const char* overload has shielded us from the worst
fall-out so far, it seems, but it makes for a truly horrible overload
set:
matcher.indexIn(str, 3);
Q: Is the 3 here the length of the haystack or the value of the from
parameter?
A: It depends on decltype(str)!
If the (const char*, qsizetype, qsizetype=0) overload is the better
match, then 3 limits the haystack's length.
If, otoh, the (QByteArray(View), qsizetype) overload is the better
match, then it's the value of the from parameter.
As if this wasn't bad enough, QByteArray implcitly converts to const
char* by default!
A follow-up patch will therefore deprecate the (ptr, size) overloads,
so we de-inline the QByteArrayView ones to avoid having to touch the
implementation once more.
Found during 6.3 API review.
Pick-to: 6.3
Change-Id: I9640e0bdd298d651511adebcc85f314db9221d34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Add a test (same techniques as for the 4+GiB check in
tst_qcryptographichash).
Takes ~1s to build the 4GiB test data here, and skips
when RAM is too low:
$ qtbase/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher haystacksWithMoreThan4GiBWork
[...]
QDEBUG : tst_QByteArrayMatcher::haystacksWithMoreThan4GiBWork() created dataset in 891 ms
[...]
$ (ulimit -v 2000000; qtbase/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher haystacksWithMoreThan4GiBWork)
********* Start testing of tst_QByteArrayMatcher *********
[...]
SKIP : tst_QByteArrayMatcher::haystacksWithMoreThan4GiBWork() Could not allocate 4GiB plus a couple hundred bytes of RAM.
Loc: [/home/marc/Qt/qt5/qtbase/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp(242)]
[...]
Found during 6.3 API review.
[ChangeLog][QtCore][QStaticByteArrayMatcher] Fixed searching in
strings with size > 2GiB (on 64-bit platforms).
Fixes: QTBUG-100118
Pick-to: 6.3
Change-Id: I1df420965673b5555fef2b75e785954cc50b654f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When int is 32-bit, 0x80000000L is int-min, and (consequently)
negating it makes no difference, so MSVC warns about this. Instead of
using an L suffix, wrap the constant in Q_INT64_C(). Do the same for
similar large constants in the same block.
Pick-to: 6.2 6.3
Change-Id: Ib371b932792f170ab7db2e472a4283df3a205af3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The animateClick method is a QAbstractButton member, and neither
QCommandLinkButton nor QPushButton override it. The method is tested in
the QAbstractButton test, and 3a9b7d1f18648d7236664d3adfc65c009b01e668
made that test more robust. The previous, flaky version of the test was
almost duplicated here. They add no additional code coverage, so remove
them.
Pick-to: 6.2 6.3
Change-Id: I1fa988c1eabd5054193acb1f5fa1c81d29b3878d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
It was missing #if-ery on feature regularexpression for one test that
depends on it. One of its comments had a long line. Added some
annotations to make clear what's going on in messier tests.
Change-Id: I06d8748a134591f93b36029713e52ffd826a24dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Continuations were using QFutureInterface to create and return the
associated future to the user. Attaching a continuation to the returned
future could cause memory leaks (described in an earlier commit). Use a
QPromise when saving the continuation, to make sure that the attached
continuation is cleaned in the destructor of the associated QPromise, so
that it doesn't keep any ref-counted copies to the shared data, thus
preventing it from being deleted.
Task-number: QTBUG-99534
Pick-to: 6.3 6.2
Change-Id: I52d5501292095d41d1e060b7dd140c8e5d01335c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Capturing a QFuture in the continuations attached to it results in
memory leaks. QFuture's ref-counted data can only be deleted when the
last copy referencing the data gets deleted. The saved continuation
that keeps a copy of the future (as in case of the lambda capture) will
prevent the data from being deleted. So we need to manually clean the
continuation after it is run. But this doesn't solve the problem if the
continuation isn't run. In that case, clean the continuation in the
destructor of the associated QPromise.
To avoid similar leaks, internally we should always create futures via
QPromise, instead of the ref-counted QFutureInterface, so that the
continuation is always cleaned in the destructor. Currently QFuture
continuations and QtFuture::when* methods use QFutureInterface directly,
which will be fixed by the follow-up commits.
Fixes: QTBUG-99534
Pick-to: 6.3 6.2
Change-Id: Ic13e7dffd8cb25bd6b87e5416fe4d1a97af74c9b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Avoid some unnecessary comparisons and add more tests.
Task-number: QTBUG-99799
Change-Id: I3aee9f0b62461d38dadbe8e969444e1cd1f94e68
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This is added specifically for the QPA platform and theme plugins, to
honor the QT_QPA_PLATFORM_PLUGIN_PATH environment variable and the
(inadvisable) -platformpluginpath command-line argument.
This removes the last QFactoryLoader used with an empty path (also the
only two that could be reached), which were causing a scan of the
application's binary directory whenever the platform plugin path was
set. In case of applications installed to /usr/bin, the entire /usr/bin
was scanned, which can be qualified as "not good".
Fixes: QTBUG-97950
Pick-to: 6.3
Change-Id: Ice04365c72984d07a64dfffd16b47fe1d22f26d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The test is timing sensitive; if it takes more than 100ms
to process events, then the timer that clicks the button might
have fired. So only verify that the button is still down if 100ms have
not yet passed, and verify that at least 100ms have passed when the
click is complete.
Also use QSignalSpy to test the signal emissions.
Pick-to: 6.2 6.3
Change-Id: I95f99e204a17c6709f8e2913eefe4b487e949123
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It's used by the lancebench and the lance tool, and it will probably be
useful for writing some high-dpi related unit and baseline test cases,
so move it to the shared folder.
Change-Id: I969bab51c9504be13b4c192b4f29f69cd9102868
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The current behavior for handling the angle delta of a wheel event
changes index the instant there is a change in angle delta. This works
fine for mouse wheels that send events with 120 angle delta units and
there is also already behavior defined for devices with pixel deltas,
but there is nothing good for handling events from high resolution mouse
wheels that don't have pixel deltas.
This patch makes it so that the current index doesn't change until the
accumulated angle delta for the X or Y axis reaches 120.
[ChangeLog][QtWidgets][QTabBar] Scrolling with a high resolution mouse
wheel changes the current index at a rate more like a normal mouse
wheel.
Task-number: QTBUG-97844
Pick-to: 6.3
Change-Id: I2e7fd88984a253f6ef8a0008deb7233e4cb4d84a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Commit 289f909621 ("Test conversion of
ulonglong variant to JSON") was trying to ensure the result becomes a
double. So there's no reason to make a test in the _data() function.
Drive-by fix the UB condition on Windows (ulong is 32-bit, so 1ul << 63
is UB).
Change-Id: I0e5f6bec596a4a78bd3bfffd16ca4f8f5219f785
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
It was Linux-only and now even Linux is complaining:
tst_qmetatype.cpp:421:26: warning: ‘int pthread_yield()’ is deprecated: pthread_yield is deprecated, use sched_yield instead [-Wdeprecated-declarations]
Change-Id: I0e5f6bec596a4a78bd3bfffd16cb1eadfa301f16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
All primitive types are initialized and have been since at least commit
33cd680ddb ("New QMetaType
representation").
Change-Id: I0e5f6bec596a4a78bd3bfffd16cb1fe22dc5c8f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When some test function fails (even as expected), it can leave the
event dispatcher in an inconsistent state where the posted events
queue might not be empty. As a result, this may break the internal
logic of the next test function that is run.
So, calling eventDispatcher->processEvents() after each completed
function resets the event dispatcher to its initial state, which
fixes the problem.
Pick-to: 6.2 6.3
Change-Id: I5a54f892d09a6eca73c8fc82875ce3b9ce4a3242
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We set the wakeUps atomic to prevent multiple WM_QT_SENDPOSTEDEVENTS from
being posted. However, this might happen right after the event processing
thread cleared the atomic, but before it processed the previous
WM_QT_SENDPOSTEDEVENTS message. In that case, we end up with a set
atomic and an empty event queue, resulting in the event loop to block
even though there are posted QEvents.
To prevent that, always reset the atomic when we handle the
WM_QT_SENDPOSTEDEVENTS message. In that case, we either call
sendPostedEvents, or startPostedEventsTimer. The former already resets
wakeUps; reset it in the latter as well.
Fixes: QTBUG-99323
Pick-to: 6.2 6.3 5.15
Change-Id: I931c02be9c42b02e8ca20daba5059cd8185f0a37
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Add two tests for some problematic scenarios where the behavior is not
consistent across platforms and depending on which event dispatcher is
used:
1) reliably waking up the dispatcher when posting events from a worker
thread.
That test fails 100% of the time on Windows no matter what type of
application is created. It passes reliably on Linux and macOS for both
core and gui applications.
2) waking up the dispatcher when we post an event from within an
event handler.
That test fails 100% of the time on Windows, both with core
and GUI event dispatchers. On macOS, the test fails 100% of the time
with the core dispatcher, and passes 100% of the time with the GUI
dispatcher. On Linux, it passes only if a Glib based event dispatcher
is used; the default Unix event dispatcher (which is also the one
used on macOS for core applications) fails.
Task-number: QTBUG-99323
Pick-to: 6.2 6.3 5.15
Change-Id: I2489533b9f0032488707777be0512bb933669a7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
The compiler generated special functions are just fine.
Pick-to: 6.3 6.2
Change-Id: I64fba1fac59f55d2a82ab18e32c1a2b854df72f0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The 'misc' data field was not copied in the assignment operator.
That field is normally not used, so this bug went undiscovered for a
long time. But in certain cases, the bug would cause an image size
mismatch to be reported as just a normal mismatch.
Fix the source of the problem by following the rule of zero - the
compiler generated special functions are just fine for this value
type.
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Pick-to: 6.3 6.2
Change-Id: I8fc8d32d1b83b78cd4ef3f4ec9a8f22661b0e025
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Get rid of the function-static main window, which would be destroyed
after QApplication if the test is run with a subset of test row (that
does not include the TestEnd state test).
Make the MainWindow a class member of the test class instead, and rename
it from "mainW" to "mainWindow" to avoid shadowing by "mainW" widgets in
other test functions.
Amends 55928821d1.
Task-number: QTBUG-99630
Pick-to: 6.2 6.3
Change-Id: I83efce5b54afc3a0027a7c0e63efee6a235af585
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Bug introduced in 6.0. This is the only unprotected d_ptr I could find.
[ChangeLog][QtCore][QMetaType] Fixed a bug that would cause
QMetaType::compare() and QVariant::compare() to crash on invalid meta
types and variants.
Pick-to: 6.2 6.3
Fixes: QTBUG-99960
Change-Id: I0e5f6bec596a4a78bd3bfffd16cb1f7b2d146688
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Previously, if you had multiple entries with the same name in an object,
and some of them were again objects or arrays, parsing the JSON document
would leak memory.
Also, we use std::stable_sort instead of std::sort now, so that we don't
accidentally randomize the order of elements with equal keys.
[ChangeLog][QtCore][JSON] A memory leak in the JSON parser when reading
objects with duplicate keys was fixed.
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-99799
Change-Id: Ic2065f2e490c2d3506a356745542148ad9c24262
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We can handle the UTF-8 case by reinterpreting it as Latin-1.
This way, the suffixIndex stays valid as a return value.
As a drive-by, optimize away toLatin1() calls by using a QVLA.
We really need a better way of converting UTF-16 -> L1 than
qt_to_latin1()...
[ChangeLog][QtCore][QVersionNumber] fromString() now takes
QAnyStringView (was: QString, QStringView, QLatin1String)
and a qsizetype pointer (was: int pointer).
Change-Id: I86abaadba2792658fbf93ccd1e0b86e3302c697c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This completes the update to qsizetype in this class, adding a couple of
methods that need to be removed in Qt 7. They're only required where int
is not qsizetype (i.e., 64-bit platforms).
Change-Id: I0e5f6bec596a4a78bd3bfffd16c9de29bec4c637
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
qstrncmp() would stop at the first null character, which isn't correct.
The tests that had been disabled in tst_qstring.cpp (with an inaccurate
comment) were actually passing. I've added one more to ensure that the
terminating null is compared where needed.
[ChangeLog][QtCore][QLatin1String and QUtf8StringView] Fixed a
couple of bugs where two QLatin1Strings or two QUtf8StringViews
would stop their comparisons at the first embedded null
character, instead of comparing the full string. This issue
affected both classes' relational operators (less than, greater
than, etc.) and QUtf8StringView's operator== and operator!=.
Pick-to: 5.15 6.2 6.3
Change-Id: I0e5f6bec596a4a78bd3bfffd16c90ecea71ea68e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QNetworkHeadersPrivate::toHttpDate() used a custom format to output a
date-time; the format supplied GMT as suffix, but neglected to convert
the date-time to UTC, so local-time was formatted as if it were UTC,
regardless of its actual offset from it. Fixing this (by the obvious
toUTC() call) broke formatting when the supplied header value was a
QDate, since it's packaged as a QVariant and QVariant's conversion of
QDate to QDateTime uses local time's (not UTC's) start of day. So fix
headerValue() to separate QDate and QDateTime cases and use
startOfDay(Qt::UTC) to get the right start of the day. Added tests for
non-UTC date-times appearing correctly in HTTP headers.
Fixes: QTBUG-80666
Pick-to: 6.3 6.2 6.2.3 5.15
Change-Id: I2792bce14a07be025cf551b0594630260c112269
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Very simplistic initial test, inspired by the fix in 'fusion' style,
but not style-specific.
Pick-to: 6.3
Change-Id: I55ceca7ad214c86cb11032c5342bdae2a83852f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Force takeStandardSnapshots() to take and log all snapshots before
launching QFAIL. Macros QBASELINE_CHECK_DEFERRED and
QBASELINE_CHECK_DEFERRED_SUM have been added in qbaselinetest.h
Task-number: QTBUG-99790
Pick-to: 6.3
Change-Id: Ia015de808f354e842ac4029c5c84be18c4a4e209
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Files that are not meant to be executed should not have the execute
permission bit set.
Task-number: QTBUG-81503
Pick-to: 6.3 6.2 5.15
Change-Id: I10666bd958adfc5c425216bcff7456facd1fe5f3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Some lines in tests had to be updated because they lost the implicit
conversion from char* to QString.
Change-Id: I95af5859ced95b9ca974205398e38c0bd4395652
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is heavily inspired by the patch written by Inho Lee
<inho.lee@qt.io>, which says "There is a precision problem in the
previous algorithm when checking pitch value. (In the case that the
rotation on the X-axis makes Gimbal lock.)"
In order to work around the precision problem, this patch does:
1. switch to the algorithm described in the inline comment to make
the story simple.
2. forcibly normalize the {x, y, z, w} components to eliminate
fractional errors.
3. set threshold to avoid hidden division by cos(pitch) =~ 0.
From my testing which compares dot product of the original quaternion
and the one recreated from Euler angles, calculation within float range
seems okay. (abs(normalize(q_orig) * normalize(q_roundtrip)) >= 0.99999)
Many thanks to Inho Lee for the original patch and discussion about
rounding errors.
Fixes: QTBUG-72103
Pick-to: 6.3 6.2 5.15
Change-Id: I8995e4affe603111ff2303a0dfcbdb0b1ae03f10
Reviewed-by: Yuya Nishihara <yuya@tcha.org>
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In Qt 5 style sheets, objects could be selected by an enum-type property
using the integer value of the enum value, e.g
QToolButton[popupMode="1"] { ... }
In Qt 6, the the new meta type system and QVariant implementation enabled
QVariant::toString to return the string representation of the enum value
instead for a property containing an enum. Since QStyleSheetStyle's
attribute matching is string based, this breaks the Qt 5 style selector,
and QCSS code instead needs to use e.g.
QToolButton[popupMode=MenuButtonPopup] { ... }
While the new syntax is arguably preferable, this is an unintentional
change that silently breaks style sheet code (no error or warning at
compile- or run-time).
To support Qt 5-style selectors, we have to change the StyleSelector
interface of the QCssParser API so that we can pass through what type
of value the attribute extractor should return; if an integer string "1"
is provided, then we need to compare the enum integer value; if the
string provided does not represent a number, then we need to compare the
name of the enum value.
Since the pure virtual attribute() method that needs to be implemented
to extract the attribute value of the node is implemented in modules
outside qtbase, add a second virtual method that takes the entire
QCss::AttributeSelector, which includes the value to match. Extractor
implementations can use it to evaluate which type of data to return for
an exact match. The default implementation calls the old attribute()
method so that existing StyleSelector implementations continue to work.
Make the respective change in the QStyleSheetStyleSelector, and simplify
the surrounding code. Adjust other StyleSelector implemnentations in
qtbase. As a drive-by, remove the superfluous virtual declaration from
those overrides.
Once submodules are adjusted to override this virtual function instead
of the (now no longer pure) virtual attribute() method, that method can
be removed.
Pick-to: 6.3 6.2
Fixes: QTBUG-99642
Change-Id: I9a2b3498f77bf7cab5e90980b7dab2f621d3d859
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This code didn't actually use QMutableEventPoint::from(), so didn't
run into the UB that from() depended on, but it's in the way of making
QMutableEventPoint a befriendable namespace instead of a public
subclass of QEventPoint.
Replaced the QMutableEventPoint ctor that takes a timestamp, and
therefore isn't compatible with the ctors on QEventPoint, with a
static function that returns QEventPoint instead.
Port QList initialization to braced-initialization as a drive-by.
Task-number: QTBUG-99615
Pick-to: 6.3
Change-Id: If5a1dbea21cc31cdefdb640716793421c8ec0af4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
In Qt 5, such selectors have to use the integer value of the enum
value. Using the enum value name does not work.
In Qt 6, such selectors must use the enum value by name, using
the integer does not work.
It's not clear yet what changed, possible a side effect of the
changes and improvements in the meta object system and QVariant in
Qt 6. So for now, document the difference in behavior in a test.
Pick-to: 6.2 6.3 5.15
Task-number: QTBUG-99642
Change-Id: I96e0280b191b8ca06b16a97ab3ed367e9a8f43a0
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The header no longer uses QMutableEventPoint.
Fix TUs that relied on the transitive include.
Task-number: QTBUG-99615
Pick-to: 6.3
Change-Id: Iae4ff34ea708304fcd365fd763875dd4a97a1cf8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The test is impacted by the position of the mouse cursor, and fails if
the mouse enters the test window when it gets shown. Try to move the
cursor away from the window.
As a drive-by, const'ify some of the local variables.
Revert 7b4b5115dd by removing the
blacklisting of the test on macOS in CI.
Pick-to: 6.3 6.2
Change-Id: Ia0c554fdf161fd4eb4aa3965e937c7db8ceeef8f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The test uses a static MainWindow so that we can execute a series of key
simulations on the same window. The window is then destroyed when we
reach the final test row.
If some of the tests fail, then the window is left in an unknown state,
resulting in cascading failures for the other tests. Fix this by always
trying to show and activate the window, and always destroying the static
window if we have reached the last test data row.
Fixes: QTBUG-99630
Pick-to: 6.2 6.3
Change-Id: I466669f387e8b199e9e719a7ebbe3ae670658b7e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QDateTimeData &d it's passed is a copy that's about to be
modified; before we do so, we haven't detached so its internals have a
ref-count of two, contradicting an assertion in the non-const
Data::operator->(); so just directly access d.d->m_timezone, since we
know that spec == TimeZone implies !isShort().
Added test that triggered the assertion and now doesn't.
Fixes: QTBUG-99668
Pick-to: 6.3 6.2 6.2.3 5.15
Change-Id: I07321ad91be5adce524be18e4ab82eee7110dc6a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Do not try to test writing of image formats which are not supported on
the platform under testing. This test was failing for .ico files on
webOS.
Fixes: QTQAINFRA-4722
Pick-to: 6.3
Change-Id: Ic7d40d9751e0f921d9721c01492cca28d798e141
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Added tests for repeated skips and failures (from within void lambdas,
to simulate skips and failures from within event handlers). These
exhibit yet more ways to count more than one outcome for a test. The
new QTest::failOnWarning() can also provoke more than one failure from
a single test, and several existing selftests exhibited various ways
for the Totals line's counts to add up to more than the number of
actual tests run.
Fixed counting so that only the first decisive incident is counted.
Tests can still report later failure or skipping, but only the first
is counted.
Added a currentTestState in qtestlog.cpp, by which it keeps track of
whether the test has resolved to a result, and clearCurrentTestState()
by which other code can reset that at the end of each test. This
brought to light various places where test-end clean-up was not being
handled - due to failure or skipping in a *_data() method or init, or
a skip in cleanup.
Fixes: QTBUG-95661
Change-Id: I5d24a37a53d3db225fa602649d8aad8f5ed6c1ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Adds a function for setting the baseline Project name, which selects
the top level server directory and hence config settings.
Also adds a function that lets the client override the server config
setting for the project image keys (ItemPathKeys). This is the list of
properties that will be used to determine which clients are "the
same", i.e. which baseline to compare against. Overriding that is
handy since it allows experimentation and customization of clients
without involving changes in the project config on the baseline
server.
Pick-to: 6.3 6.2
Change-Id: Id3998356494a9a2cb71c009b43593d3dc1b6963a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
A derived gadget has an is-a relationship with its base type. It
should be convertible. In fact, canConvert() already tells us it is.
Change-Id: I71a5ac9afd78e88adb23b4d0e757f34077f63207
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Moved tst_QImageReader::readText() and tst_QImageReader::preserveTexts()
behind QT_NO_IMAGEIO_TEXT_LOADING flag. The tests were failing on
webOS.
Fixes: QTBUG-99717
Pick-to: 6.3
Change-Id: Ib23decbaffe8d87c07fd68c41a28a3f7ca969cb1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
...but this will only be supported with Vulkan and OpenGL 4.0+ and
OpenGL ES 3.2+ for the time being.
Taking the Vulkan model as our standard, the situation is the
following:
- Vulkan is ok, qsb secretly accepts .tesc and .tese files as input
already (plus QShader already has the necessary plumbing when it
comes to enums and such) To switch the tessellation domain origin to
bottom left we require Vulkan 1.1 (don't bother with
VK_KHR_maintenance2 on top of 1.0 at this point since 1.1 or 1.2
implementations should be common by now). The change is essential to
allow the same evaluation shader to work with both OpenGL and
Vulkan: this way we can use the same shader source, declaring the
tessellation winding order as CCW, with both APIs.
- OpenGL 4.0 and OpenGL ES 3.2 (or ES 3.1 with the Android extension
pack, but we won't bother with checking that for now) can be made
working without much complications, though we need to be careful
when it comes to gathering and setting uniforms so that we do not
leave the new tessellation stages out. We will stick to the Vulkan
model in the sense that the inner and outer tessellation levels must
be specified from the control shader, and cannot be specified from
the host side, even though OpenGL would allow this. (basically the
same story as with point size in vertex shaders)
- D3D11 would be no problem API-wise, and we could likely implement
the support for hull and domain shader stages in the backend, but
SPIRV-Cross does not support translating tessellation shaders to
HLSL. Attempting to feed in a .tesc or .tese file to qsb with
--hlsl specified will always fail. One issue here is how hull
shaders are structured, with the patchconstantfunc attribute
specifying a separate function computing the patch constant
data. With GLSL there is a single entry point in the tessellation
control shader, which then performs both the calculations on the
control points as well as the constant data (such as, the inner and
outer tessellation factors). One option here is to inject
handwritten HLSL shaders in the .qsb files using qsb's replace (-r)
mode, but this is not exactly a viable universal solution.
- Metal uses a different tessellation pipeline involving compute
shaders. This needs more investigation but probably not something we
can prioritize in practice. SPIRV-Cross does support this,
generating a compute shader for control and a (post-)vertex shader
for evaluation, presumably in order to enable MoltenVK to function
when it comes to tessellation, but it is not clear yet how usable
this is for us.
Change-Id: Ic953c63850bda5bc912c7ac354425041b43157ef
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
We want to preserve nullness where possible. Test that various ctors
do the right thing when presented with null input.
Pick-to: 6.3
Change-Id: Ia1a1d4fb3c919b4fed2d9b87827815a1b5072c54
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Any of these timers must be stopped before the corresponding test
function completes. Otherwise, functors will operate on dangling
pointers, which can lead to failures or unreliability of other tests.
Fix this by setting a correct context in the QTimer::singleShot()
call.
Pick-to: 6.2 6.3
Change-Id: Icd23f6d9a2c6e7f33495d6badc4080a1b10c19f8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Since Qt 6.0, QImageIOHandlers by default take care of this themselves
by not allocating more than 128 MiB for an image.
This change will not significantly reduce code coverage of the fuzzer
because QImage::loadFromData() calls QImageReader::read() which does
everything QImageReader::size() does except for returning the read size
in the end. On the other hand, it will speed up the execution because
the same image will not be read twice by different QImageReaders anymore.
Change-Id: Iab63d9e5ec02fbe5765fbf7ccb0b82896ec37692
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
By GHS the only C locale is supported.
Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I3d89f1b2d9eb7f77b75e13a5ca65cebc24538890
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
At some point we decided to support a custom set of ciphersuites specified
by QSslConfiguration (which if you ask me was never a good idea). The law
of unforseen consequiences bit us again: since we now give a set of ciphesuites
to QSslConfiguration and set ciphesuites from the configuration a socket has,
we are limited by the ciphersuites we know about at the moment of 'coding'.
Meaning if an SDK was updated and CipherSuite.h later adds more ciphersuites,
we miss them and 'don't support them', while we ... actually do.
This patch tries to add some more ciphersuites introduced in TLS 1.3 (interesting,
SecureTransport does not support TLS 1.3, but TLS 1.3 suites can be used in TLS
1.2 session).
Pick-to: 6.2 6.3 5.15
Task-number: QTBUG-99368
Change-Id: I439b63845c4893e5621cffaf3bcaf62e2b643c74
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Mainly because we do have legacy code in the Qt 5 graphical effects that
tries to dynamically determine the max number of varyings. Make it
easier to port such code.
Change-Id: I846cab2c2fe7b4cd473b5ced0146ca36f1c8169b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>