The assumption when calling QStringRef::toString() on a null
QStringRef (i.e. when QStringRef::isNull() is true) is that
QStringRef::toString().isNull() will also return true. With the
current implementation we return a null QString() only when the
QStringRef references a nullptr QString. We need to do the same
also when QStringRef references a QString with null private data.
Change-Id: I4177a5ea187ae758d7c46fe76a9d0583140e90cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The concept was a nice idea to avoid accidental detach() calls
in implicitly shared containers, but it conflicts with a C++11
compatible API for them, with signatures for modifying methods
taking a const_iterator as argument and returning an iterator
(e.g. iterator erase(const_iterator)).
Change-Id: Ia33124bedbd260774a0a66f49aedd84e19c9971b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In qmake syntax there should be a colon or curly braces following a condition.
Change-Id: Ibd989662aef6320cec8093e7c6103bf8362b8255
Reviewed-by: Liang Qi <liang.qi@qt.io>
[ChangeLog][QtGui] Added QGuiShortcut and made the equivalent
existing classes in Qt Widgets derive from them. This provides
basic functionality for adding shortcut handling in QML.
Fixes: QTBUG-79638
Task-number: QTBUG-76493
Change-Id: I5bbd2c8f192660e93c4690b9f894643275090e4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use QT_REQUIRE_CONFIG in the headers of classes to be disabled.
Add headers/source files in the .pro file depending on the configure
feature in libraries and tests.
Add the necessary exclusions and use QT_CONFIG.
Only the widgets/kernel tests were made to compile since also
the buttons depend on the action feature and it would become too
involved.
Task-number: QTBUG-69478
Change-Id: Id5bf88bc108f2bbb14dce8625bfdcb7eb0deb8e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
OpenSSL 1.0.2 will stop receiving all support at the end
of 2019. Qt 5.15 is our next LTS thus makes sense remove
OpenSSL 1.0.2 support there. This also allows us quite
a significant cleanup of an old heavily if-defed code
and all 'pre11' suffixed source files.
[ChangeLog][QtNetwork][SSL] Removed OpenSSL 1.0.x support, now 1.1.x is required
Change-Id: I70c70c56cbd8aeff793afe793335696d1b1b7408
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Call adjustedFormat() as advised by the docs: "Applications are advised
to set this format on their QWindow in order to avoid potential BAD_MATCH
failures."
Task-number: QTBUG-79659
Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Simply moving QAction to QtGui was not deemed possible since
it operates on a set of controls of some kind. The approach to
extract a base class was taken instead, named QGuiAction
following the QGuiApplication scheme. QAction remains in
widgets, but changes base class.
For QActionGroup, the functions addAction(text/icon), which
create an action, cannot be implemented in QtGui, hence a base
class is needed, too (unless they are deprecated and removed).
- Extract base classes providing functionality not based on
QtWidgets, using virtuals in QGuiActionPrivate to provide
customization points
- Change QActionEvent to take QGuiAction, removing
the need to forward declare QAction in QtGui
[ChangeLog][QtGui] Added QGuiAction(Group) and made the equivalent
existing classes in Qt Widgets derive from them. This provides
basic functionality for implementing actions in QML.
Task-number: QTBUG-69478
Change-Id: Ic490a5e3470939ee8af612d46ff41d4c8c91fbdf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Had to teach the update program to accept category Lm as for
Joining_Transparent, for the sake of a new ArabicShaping.txt entry.
Added three new Unicode versions, several new scripts and a new
word-break class.
Updated UCD's test data for tst_QTextBoundaryFinder. This left 57
tests failing; I have commented out the data rows for those tests,
pending someone with more knowledge addressing this.
Task-number: QTBUG-79631
Task-number: QTBUG-79418
Change-Id: Ic33d3b3551195d47a84d98e84020f57a68f0b201
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The support for unsharable containers has been deprecated
since Qt 5.3.0, so let's finally remove support for them.
Change-Id: I9be31f55208ae4750e8020b10b6e4ad7e8fb3e0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In Qt6 QList is just a typedef to QVector. To keep Qt5 behavior
compatibility we need to register aliases, otherwise some type name
based operations would not work. The patch adds automatic
registration of QList metatype alias for every QVector.
The patch doesn't cover usage of already typedef'ed and aliased
QList and QVector, but that should be quite esoteric, especially
after introduction of automatic QList and QVector type registration.
Change-Id: I84672dda2b159d94e76cdc6034861e7d7ef52533
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This is almost 100% source compatible with Qt 5. Exceptions are
* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
in QVector
* The missing prepend optimization in QVector (that is still planned
to come for Qt 6)
Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Do this by templating the floating-point tests, which removes some
existing duplication as well as avoiding new duplication. Did some
renaming in the process. Added some tests of fuzzyCompare that come
closer to its boundary. Increased number of tests from 69 to 97. Use
std::numeric_limits to replace assorted hard-coded constants and old
C-library boundary-value macros.
It turns out MSVC's float conflates quiet and signaling NaN (although
MinGW's doesn't); and WebAssembly's old fastcomp compiler conflates
NaNs for both float and double; so XFAIL the test for distinct NaNs in
those cases.
Change-Id: I0a1c0d2f68f75d51b8cda9e3ddfe7fa9c190a3e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Binary JSON is said to become deprecated. Therefore, add support
for CBOR. Binary JSON is still supported for deserialization, so
all existing .qsb files will continue to work, as long as the
binaryjson feature is enabled in the Qt build.
Also makes QShaderDescription comparable. This is important for
tests in particular.
A nice side effect of using CBOR is that .qsb files become smaller.
For a typical Qt Quick material shader this can mean a reduction of
300 bytes or more.
Task-number: QTBUG-79576
Change-Id: I5547c0266e3e8128c9653e954e47487352267f71
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The macro is not documented, so can be considered private API.
Pre-C++11 compilers that don't support alignas will no longer be
supported with Qt 6.
The macro definition for the standard case of compilers supporting
the alignof keyword is left in place.
Task-number: QTBUG-76414
Change-Id: I7d722e4faf09ae998a972d3ed914de808ab316d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The macro is not documented, so not part of the public Qt API. It is
made obsolete by the alignof keyword in C++11.
Remove the usage of the macro across qtbase, in particular the
workarounds for compilers that didn't support alignof, and that will
not be supported in Qt 6.
The macro definition is left in place, no need to break existing
code.
Task-number: QTBUG-76414
Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When a window is closed, then it will cause the child windows to be
closed as well as a result. Therefore in order to ensure that they are
shown again as a result, we need to remove the WA_WState_ExplicitShowHide
attribute if the widget was not already hidden before. This enables us to
test for this attribute when calling showChildren(), so that if the
window has a windowHandle then we can make sure that this widget is shown
again.
Fixes: QTBUG-73021
Change-Id: I1186242b889899dfcd38d782a67567348e2055ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Cleanup QDataWidgetMapper/QFileIconProvider/ItemEditorFactory autotests:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: I1a36ea2da7de1cfa5d5d4e305ef508fda3a6c460
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
If a transfer timeout is set for QNetworkRequest, downloads
and uploads are aborted if the timeout expires and bytes
haven't been transmitted in either direction.
Task-number: QTBUG-3443
Change-Id: I702d223d673f0c6612343dc9d053815acfcb61b8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Move the feature to corelib so that the QMetaType enumeration
values can be properly excluded and there is no need for a
dummy class.
Use QT_REQUIRE_CONFIG in the headers of classes to be disabled.
Add headers/source files in the .pro file depending on the configure
feature in libraries and tests.
Add the necessary exclusions and use QT_CONFIG.
Task-number: QTBUG-76493
Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Released on October 4th.
Adds Windows names for two time zones, Qyzylorda and Volgograd.
Added languages Chickasaw (cic), Muscogee (mus) and Silesian (szl).
Norwegian number formatting has flipped back to using colon rather
than dot as time separator; it's flipped back and forth over the last
several CLDR releases. The dot form is present as a variant, the
colon form was long given as the normal pattern, then went away; but
now it's back as a contributed draft and that's what we pick up.
The MS-Win time-zone ID script was iterating a dict, causing random
reshuffling when new entries are added. Fixed that by doing the
critical iteration in sorted order.
Omitted locales ccp_BD and ccp_IN due to QTBUG-69324.
Task-number: QTBUG-79418
Change-Id: I43869ee1810ecc1fe876523947ddcbcddf4e550a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
While I was looking into a bug related to problems building the test
without GUI, I noticed a lot of spurious #include lines so tidied up a
bit. Split some long lines, while I was about it.
Change-Id: Id87eb6f612c6b174f8240dfe9c00e0929244fb6c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Thanks to Dmitriy Purgin for pointing out the serialization one.
Task-number: QTBUG-79353
Change-Id: Ia3d750b17ddd8fbb7a83a55df7e4546ca78c358b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The qmake config for tst_QString tried to impose QT_NO_CAST_TO_ASCII
on it, but the source file explicitly #undef-s this symbol and its
friends. Leave the define commented out in the .pro so that a comment
can explain why it's no good.
Change-Id: I7620f4e104f0cdab05fdc246b903c40026e63d76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Test QT_CONFIG(icu) in the code instead of testing qtConfig(icu) in
the profile and setting an extra define just to shadow what's already
defined. Also remove the matching define from qcollator.pro, whose
test code didn't use it.
Noticed while reviewing the conversions to CMake.
Change-Id: I19d3b1026b2a8f50ec424c450614e721500fd38a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
See the comment in the test for details.
Change-Id: Ie3d356e476ba0419d304bccd396fc18a831a30cd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When the first column is hidden or not visible in the current viewport,
it is not possible to deselect the current row.
Fix it by passing the correct column to
QItemSelectionModel::selectedRows() when testing if the current index is
selected.
Fixes: QTBUG-79092
Change-Id: I9d8082d2b29ad2f799156aee910c6ff6e3217771
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
stat() and friends expect a null-terminated C string. There is no way to
generate anything useful from a string that has null bytes in the
middle. It's important to catch this early, as otherwise, for example, a
QDir::exists() on such a path can return true, as the path is silently
truncated.
Extend the checks for empty file names to windows and add checks for null
bytes.
Change-Id: Ie9794c3a7c4fd57f9a66bdbbab8b45a08b6f9170
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
During the creation of a raster paint engine in QImage::paintEngine(),
the QImage will be detached. At least old gcc versions would get
confused so that the newly created paintengine would end up in the old
QImage copy insteads of the newly detached one. Work around by
dropping the temporary engine pointer.
Fixes: QTBUG-79383
Change-Id: I27b1f24312269bc2bcc641dc4334397a92e3bfbb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This is part of the migration of qtbase from QRexExp to
QRegularExpression.
Task-number: QTBUG-72587
Change-Id: I74ca824d5a2ee6c295c41cd577eab466326395f0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This is part of the migration of qtbase from QRexExp to
QRegularExpression.
Task-number: QTBUG-72587
Change-Id: I47a047e27432c874b47bd25581806e1bc156e94f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The default font on Windows ("Times" is not found) does not have
a ligature for "fi", so the test would not actually be testing
what it was supposed to on this platform, and would pass even
when the code was buggy.
To enable the test on Windows, we select a standard font which
has the ligature (Calibri).
Change-Id: Ic117cd8e549aa729a0cd68006d7c180c6c89c053
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Either by testing for platform name or window activation.
After this gets in, we can enable widget tests in the Wayland bot, which
hopefully will reduce the number of regressions in the Wayland plugin.
Fixes: QTBUG-62188
Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
For some scalings, setClipRect(QRect) would produce a clip one pixel
different from setClipRect(QRectF) because of different
rounding. Ditto for setClipRegion. Fix by making sure to transform
QRectFs instead of QRects.
Fixes: QTBUG-78962
Fixes: QTBUG-78963
Change-Id: I0be721133858c30769ec6d81e978962a3d6b70cf
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
CMake will complain that we have a duplicate test name otherwise.
Generally it makes a lot of sense to name the test binary the same as
the test itself.
Change-Id: I27c4b51e6a2869f025e1100f1a9dd6b54ebdaf55
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Morten Kristensen <me@mortens.dev>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Makes the tests pass on Wayland.
Task-number: QTBUG-62188
Change-Id: I5860c1ae6dd3d15632d827f4e357cb6c2cc9c5e3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This makes the test pass on Wayland.
Task-number: QTBUG-62188
Change-Id: Ib67cf8913055bbe753f71791095aff035342c18d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is part of the migration of qtbase from QRexExp to
QRegularExpression.
[ChangeLog][QtCore][QAbstractItemModel] The match() method now
supports the new Qt::RegularExpression match flag value. This
will allow users to use either a string or a fully configured
QRegularExpression when doing searches. In the second case,
the case sensitivity flag will be ignored if passed.
Task-number: QTBUG-72587
Change-Id: I07c8d72a661c48b7f4fcf13ef8e95980bcdcb998
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Remove some code which was commented out with 'NOT_READY_YET' since the
initial Qt5 import. Since the mentioned bug reports are no longer
available remove this code.
Change-Id: I98686e53d85619f01d16105d147eba79b557a104
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Prefer qWaitForWindowExposed over qWaitForWindowActive whenever possible, skip
in the other cases.
Makes the test pass on Wayland.
Task-number: QTBUG-62188
Change-Id: I60b4000c72c3727a2f33b79a5038469055b0fef2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Makes the test pass on Wayland.
Task-number: QTBUG-62188
Change-Id: I53011ad623e4bdb557d79c136f06ce7ac00a08ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Makes the test pass on Wayland.
Task-number: QTBUG-62188
Change-Id: I3900925e74d8d940a8c5af87ea64a6ec3c8c3293
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.
Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()
Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When a prepared statement is still alive after the database was removed
with QSqlDatabase::removeDatabase(), the cleanup routine is trying to
access the driver which is no longer alive which results in a crash.
Fixes: QTBUG-79019
Change-Id: I4630e3b947a12b23ed062f015abc373fc0e246c1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Add a RAII class for registry keys and use it throughout
the code base.
Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When calculating the header section size based on its contents when a
stylesheet is used, the size hints from the stylesheet are used. In case
if the stylesheet specifies only one of the sizes, the other is set to
-1. Because of this the actual content size is ignored.
The solution is to calculate the size based on the application style, in
case if it's not specified in the stylesheet.
Fixes: QTBUG-75615
Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Some windowing systems (i.e. Wayland) do not allow applications to steal window
focus.
Normally, we would just replace qWaitForWindowActive with
qWaitForWindowExposed, because that is usually the intent, in this test
however, there are many occurrences of both variants right after each other.
And, as described in the commit message of 153e8b49a, this may be because
window activation may cause repaints, and we want to wait for it to reduce
the chance of receiving an extra repaint later (possibly causing tests to be
racy).
Therefore, I took the conservative approach, and kept the qWaitForWindowActive
calls, except when the capability is not available. Hopefully this will not
cause flakiness in existing platforms, while also allowing tests to pass on
platforms where activation is not supported.
Task-number: QTBUG-62188
Change-Id: I15502baa28c464a808d585a5e6d67c9b745b17ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Replaced the usages of the following deprecated APIs:
* QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
* QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
* QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)
- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.
- Fixed the tests to build conditionally, only when these APIs are
enabled.
Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
MySql 5.0 was released 2005 so it's time to remove support for MySql 4.x
14 years later.
[ChangeLog][QtSql][QMYSQL] Removed support for MySql < 5.0 since 5.0 was
released 14 years ago.
Change-Id: I45005accdffefbd9338ac0e710512a4c7ea8e09e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Always try to create the runtime directory and never change
the permissions of an existing directory. Conform to the
XDG Base Directory Specification:
"If, when attempting to write a file, the destination directory
is non-existent an attempt should be made to create it with
permission 0700. If the destination directory exists already
the permissions should not be changed."
Fixes: QTBUG-68338
Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A previous fix has caused a performance degradation while adding a
check for avoiding adding duplicated rectangles to the update list.
This patch fixes it by using a std::set instead of a QList, avoiding
duplication while using an O(log N) operation, instead of the O(N)
used before.
Fixes: QTBUG-77952
Change-Id: Ifa9fbf110e0bad60ee02a42d91281981fd98ceab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.
This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.
Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The childEvent handler sets the enabled property of children as they are
added to the groupbox, but applications might later enable children and
check/uncheck the groupbox's checkbox in undefined order. In that case,
we would end up with enabled children inside a conceptually disabled
groupbox (the groupbox's checkbox represents the logical "disabled"
state), which breaks documented QWidget::enabled rules.
To make sure that all children are disabled as per the state of the
groupbox, we need to run that logic once the UI has been set up, and
before it becomes visible. This is what polishing is for, so listen
for that event in addition and handle it the same way as adding (which
duplicates things, but keeps existing code that might depend on things
being updated as they are added working).
Adds the case to the existing enabledChildPropagation test case.
[ChangeLog][QWidget][QGroupBox] Always disable children of a checkable,
unchecked group box before showing.
Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619
Fixes: QTBUG-25938
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Both the spline curves and (most of) the predefines curves are defined
as having start value 0.0 and end value 1.0. The spline and In/OutBack
functions would sometimes not produce that result precisely, so code
could not reliably depend on expressions like (easedValue < 1.0)
becoming false. Fix by explicitly handling endpoints.
Fixes: QTBUG-76781
Fixes: QTBUG-72630
Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
A default-constructed QDateTime is invalid, but compared equal to a
valid one referencing the start of 1970. This lead to date properties
in QML being initialized invalid but not getting an onChange if the
first value they're set to is the start of 1970.
Fixing that then lead to some tests failing. Indeed, the original
equality check involved using toMSecsSinceEpoch(), whose value is
undefined unless the datetime is valid, without a prior check on its
validity: so ensure all uses of toMSecsSinceEpoch() are guarded with
isValid() checks.
Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column
(previously unused, after separating from toTime_t(), which uses this
column for "out of time_t's range") for validity of the datetime.
[ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as
equal and less than all valid ones. They could previously be found
equal to valid datetimes.
Fixes: QTBUG-79006
Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cleanup QAbstractItemView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
- replaced QCoreApplication::processEvents with
QTRY_VERIFY/QTRY_COMPARE
Change-Id: Iba91811db6fb925364fc88ec36357e758b937329
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It seems like qmake is happy with the comment, followed by a
continuation and then another comment, but having the continuation at
the end of the line makes more sense.
This will make it easier to port to CMake.
Change-Id: I20c964e8c3b6fea4745095783503045b191b000b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QML1 is not supported anymore, remove the leftover hooks for it.
Change-Id: I2900726714c5faea3523b2ebe39bb393364b3bfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There is no onscreen support for WinRT in the D3D11 backend yet.
However, offscreen operations (rendering into a texture) should work.
One catch is that there is no D3DCompile available for deployed WinRT
apps. So ship the intermediate format (DXBC output from fxc) in the
.qsb files.
Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.
Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.
Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
...and make the Null backend able to deal with these, for RGBA8 textures
at least. Naturally it is all QImage and QPainter under the hood.
Also fix a bug in the OpenGL backend, as discovered by the autotest:
the size from the readback did not reflect the mip level.
Task-number: QTBUG-78971
Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This also marks the beginnings of significantly extending autotesting
of the resource and rendering functionality in QRhi.
Also involves fixing up the buffer operation lists like we did
for textures before. This is to ensure updates and reads on the
same batch execute in the correct order. So just have two lists:
one with buffer, one with texture operations.
Also simplify the struct layouts. No need for those inner structs
with many duplicate members. This reduces the size even, since using a
union was never an option here. Also switch to a VLA, the size is around
253 KB per batch.
The Null backend now keeps track of the QRhiBuffer data so it can return
valid results in readbacks.
Task-number: QTBUG-78984
Task-number: QTBUG-78986
Task-number: QTBUG-78971
Task-number: QTBUG-78883
Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Properly return an invalid frame when calling jumpToFrame()
with a non existent frame number.
Fixes: QTBUG-79029
Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QString::fromAscii() is deprecated since 5.0 but still tested.
So suppress deprecations for its code.
Change-Id: Ic048a843c43551021da39a16d94c3222201573dc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
And add a test for it so it can no longer happen in any current or
future implementation.
Change-Id: I3214aa90595e291b1e1c66befe185cfe1ea7bc6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The --output-json parameter will make moc produce a .json file next to
the regular output file. With --collect-json the .json files for a
module can be merged into a single one.
Task-number: QTBUG-68796
Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Cleanup QColumnView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: Iae94e9074b65cca1e4d9eb199ea2b13e0cfa2880
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Is't been deprecated since Mac OS X 10.5.
Task-number: QTBUG-74872
Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
People tend to "turn off debug and release builds" by just not building
one of the variants. For example, Qt's own rcc is built in release only,
however it is configured for debug_and_release with the same TARGET for
both.
Let qmake complain about conflicting TARGETs only we're about to build
all of those conflicting targets, i.e. if build_all is set.
Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
After commit b88acae7a8e773c307e44f84da037d01d19e60f7 in qt5, the
developer-build enabled qemu-arm tests were disabled and after that
changes were introduced in qtbase that would make tests fail (such as
qtextmarkdownwriter or tst_QSocks5SocketEngine). These tests would still
be run when another repository enables qemu-arm developer builds, such
as qtdeclarative. This patch removes that test coverage.
We can't really change the behavior of the CI to not run tests in
dependent repos when a repo adds test configurations (such as
qtdeclarative.yaml) as that in turn would remove the test coverage that
qt5.yaml adds over default.yaml.
Also amends d225f73c09
Change-Id: I05bdeac7fffbbfcc2be7904cb06067897958f30d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
It is conceivable that during the try-compare loop of processing
windowing system events we loose and regain the focus. That would
explain the occasional test failure where instead of the expected 3
focus in events, we have received four.
Task-number: QTBUG-77769
Change-Id: I2221440d09a74d4d18a72f7786232b4491cf45a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 56f084781e)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It is finite and normal; it classifies as a zero; and it should not be > qfloat16(0).
Added tests to match.
Change-Id: I7874fb54f622b4cdf28b0894050ad3e75cf5d77c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Its limits() test was rather large and had some overlap with an older
qNan() test, that needed some clean-up (it combined qfloat16 values
with double and float values in ways that caused qfloat16 to be
promoted to another type, so we weren't testing qfloat16).
Renamed the qNan() test to qNaN(), separated out the parts of it that
actually tested infinity. Moved various parts of limits() to these and
rationalised the result. Split out a properties() test from limits()
for the properties of the qfloat16 type that are supplied by its
numeric_limits. Split out a data-driven finite() test to cover some
repeated code that was in limits() and extended it to test more
values. Added more tests of isNormal().
Fixed my earlier UK-ish spelling of "optimise", in the process, and
identify the processor rather than the virtualization as the context
where the compiler errs.
Change-Id: I8133da6fb7995ee20e5802c6357d611c8c0cba73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test fails because the server (reasonably) sends a https redirect.
Let's not rely on external servers serving http indefinitely.
Fixes: QTBUG-71953
Change-Id: I20937b2c6f268519636349bae8c99c1afe64fcf9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It is conceivable that during the try-compare loop of processing
windowing system events we loose and regain the focus. That would
explain the occasional test failure where instead of the expected 3
focus in events, we have received four.
Task-number: QTBUG-77769
Change-Id: I2221440d09a74d4d18a72f7786232b4491cf45a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
One of our compilers for emscripten coerces all signaling NaNs to
quiet ones, so won't do any actual signaling. Anyone relying on them
to do so shall be disappointed, so it's better that they know about it
at compile-time - or, at least, have the ability to find it out.
Put the signaling NaN producers (and remaining (test) code using them)
under the control of a feature that's disabled when numeric_limits
claims double has no signaling NaN. Assume the bootstrap library
doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no
contexpr way to test that alleged signalling and quiet NaNs are
actually distinct.
Added some auto-tests for signaling NaN, including that it's distinct
from quiet NaN. Any platform on which the last fails should disable
this feature.
Task-number: QTBUG-77967
Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The test was found crashing with software rendering in Qt 5.7.
Removing the insignification revealed that there are failures
on WinRT as well, blacklist them for the moment.
Task-number: QTBUG-78802
Fixes: QTBUG-49630
Change-Id: Ib1a3efe69d7b63cdd98c6da364ab09e0e2dbdf62
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
failing random generation instruction, which always returns
0xffffffff, even when generation was "successful".
This code checks if hardware random generator generates four consecutive
equal numbers. If it does, then we probably have a failing one and
should disable it completely.
Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a
Fixes: QTBUG-69423
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Cleanup QItemView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: I46edc2dc5bbaa09fb11710fa34ef4c6639181f62
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The fix for QTBUG-35203 set the Alt+Right shortcut on the next
button, clobbering the Alt+N shortcut from parsing the text (similar
for other languages). Add a separate shortcut for Alt+Right since a
button may not have several shortcuts.
Amends 6714196f45.
Fixes: QTBUG-78604
Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
As it was superseded by HTTP/2. Bye, Speedy. Since it's Qt 6,
we also fix the attribute's enumerator to fit our coding
convention with HTTP2AllowedAttribute becoming Http2AllowedAttribute,
and the same for HTTP2WasUsedAttribute.
tst_qnetworkreply in 'benchmark' directory of qtbase/tests
was updated - we have the logic they tested in preConnectEncrypted
in tst_http2 now.
Manual qnetworkreply test was updated (instead of SPDY in NPN failure
we can use H2, the second test was deleted - again, auto-tested in
tst_http2).
Change-Id: I559c140c333ddf72664911c6e275b1d0d2b980a9
Task-number: QTBUG-78255
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Following the deprecation of add[Default]CaCertificate[s] let's update
the uses of it. While we're doing this, let's also use QSslConfiguration
more in some places where it makes sense.
Change-Id: I2c9e7c73fee8a405492410378f2babe67d3a3f25
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Cleanup QHeaderView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: I4df0b46c58ae9ae9dd4d9762390a2b14886aa68f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The error was due to a compiler optimization bug, which is fixed
in 16.3.0.
This reverts commit 305f2c3aa6.
Fixes: QTBUG-77239
Change-Id: Idfb86ad5c3ec026518f0713c41f7ad744ab4d5db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Due to their sandboxed nature, UWP applications do not have access to
system settings like time zone.
Fixes: QTBUG-71185
Change-Id: I567a255f8adc18838fff79b81210faa094674722
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Cleanup QTreeWidget autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: Ied5c0b12c0d3338469e50f3b30892557c9b4479d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Separate quiet NaN from infinity and expand the nan-with-payload test
to a general test that bits outside the exponent don't break qIsNan().
Generally test more thoroughly and systematically.
Tests for signalling NaN shall follow.
Change-Id: Ib35dabacc8ebcc9a0761df38f6f419f0398d0e20
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Testlib's signaldumper functionality would crash inside
testlib as it dereferenced the sender after it was deleted.
Change-Id: I6013b75b0a121e2768429d8a3cf0339a940314f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Cleanup QListView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
- replaced QCoreApplication::processEvents with
QTRY_VERIFY/QTRY_COMPARE
Change-Id: I38de7fb105cd70259e60e6b05de82944bee53a54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QSqlDriver::notifcation() signal is available in two versions since Qt4
times. They are both emitted in the corresponding places which is
useless.
Therefore deprecate the one-arg version.
[ChangeLog][QtSql][QSqlDriver] The one-arg version of
QSqlDriver::notifcation() is now deprecated.
Change-Id: Ie09aa0cc952f4d854c6fb617b37b9047a3194ee3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Cleanup QTreeView autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations / replace with QTRY_foo() calls
- use override
- use QStyledItemDelegate
Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Cleanup QTreeWidget autotest:
- use range-based for loops
- use nullptr
- use member initialization
- use new signal/slot syntax
- use static invocations
- use override
Change-Id: I2c07e95871d8725366cddd5cd098010709c8dc55
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The requirement to separate debug and release DLLs on Windows stems from
the Visual Studio C run-time library appearing in two different variants
(debug and release) and not mixing well. It's possible to perform builds
without optimzations and with debug symbols while linking against the
release version of the C run-time, but at the same time the debug
version of the run-time brings other developer visible advantages.
MinGW on the other hand does not have this distinction, does not ship
with separate DLLS and does also not require the VS C runtime library.
Therefore we do not need this separation for MinGW, which means that our
packages can be reduced in size and application developers wishing to
debug their applications do not have to use debug builds of the Qt
libraries or run into Qt internal debug code.
Task-number: QTBUG-78445
Change-Id: Idf588606091298dc44262c4c89e689df18d34747
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Those values must be scaled to device coordinates - otherwise borders,
margins etc. will be too small when rendered on high dpi devices
(printers etc.).
This change will add the scaling to those values.
QTextDocument::print applies 2cm margins to the root frame of a
unpaginated QTextDocument. Those margins were previously scaled to
device coordinates in order to give the correct result. But because
scaling is now done inside QTextDocumentLayout that scaling must be
removed and pixel values based on qt_defaultDpi are provided instead.
Fixes: QTBUG-78318
Change-Id: I6fe6dcc25f846341f6a2fe5df2f54baea473fdfd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
We presently only support the UTC-based offset timezones that are
listed in the CLDR; and it doesn't make sense to list more than these
in the list of available zones. However, if someone sets their TZ
environment variable to a conformant UTC-offset string, we should make
sense of it even if CLDR doesn't mention it. Only do so as final
fall-back, as backends may handle the givne name better (some such IDs
appear in the windows-compatibility list, for example).
Added tests for the new UTC-offset time-zone names.
Removed one test that relied on them not being supported.
[ChangeLog][QtCore][QTimeZone] The constructor can now handle general
UTC-offset zone names. The reported id() of such a zone shall be in
canonical form, so might not match the ID passed to the constructor.
Fixes: QTBUG-77738
Change-Id: I9a0aa68281a345c4717915c8a8fbc2978490d0aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In tst_QTimeZone::isTimeZoneIdAvailable(), a block of tests of
QTimeZonePrivate::isValidId() overlapped with what
tst_QTimeZone::isValidId_data() tests; so move out of the former and
adapt to use by the latter. At the same time, check that each
allegedly available zone *is* available enough that we can create it
and it's valid.
Change-Id: I3f7c8e2e3fbfb201747c7b769d691d7f17fc6b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the domain passed down is an actual TLD that's the subject of a *
rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and
concluding that it couldn't be the subject of a * rule.
Added a test for the specific .ck case and commented on where we could
get some canonical test data that I tripped over while researching
this. Cross-reference the cookie-jar test from the QUrl test, too.
Fixes: QTBUG-78097
Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The DefaultFontFallbacks.plist system file that we used for looking up
style fallbacks does not exists in macOS 10.15, nor did it ever exists
on iOS. Instead of relying on this file, we hard-code a set of default
families, that we then look up the fallbacks for.
The result of QFont::defaultFamily() on macOS is now:
QFont::Helvetica --> "Helvetica"
QFont::Times --> "Times New Roman"
QFont::Courier --> "American Typewriter"
QFont::OldEnglish --> ""
QFont::System --> "Lucida Grande"
QFont::AnyStyle --> "Lucida Grande"
QFont::Cursive --> "Apple Chancery"
QFont::Monospace --> "Menlo"
QFont::Fantasy --> "Zapfino"
And on iOS:
QFont::Helvetica --> "Helvetica"
QFont::Times --> "Times New Roman"
QFont::Courier --> "American Typewriter"
QFont::OldEnglish --> ""
QFont::System --> "Helvetica"
QFont::AnyStyle --> "Helvetica"
QFont::Cursive --> ""
QFont::Monospace --> "Menlo"
QFont::Fantasy --> "Zapfino"
Fixes: QTBUG-78240
Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Since 9c8d1ca18b, the test would fail
when High DPI scaling is enabled:
FAIL! : tst_QWidget::translucentWidget() Compared QImages differ in device pixel ratio.
Actual (actual): 2
Expected (expected): 1
.\tst_qwidget.cpp(8913) : failure location
Set the device pixel ratio on the expected pixmap to fix this.
Change-Id: I517495931c2c6b1f49125bb4b5836e304bdbf545
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Cleanup QTableView autotest:
- use range-based for loops where possible
- use nullptr
- use member initialization
- use new signal/slot syntax
- remove a lot of c-style casts
- use static invocations
- use override
- instantiate objects on stack instead heap to avoid memleaks
Change-Id: I52fee26697b1732afa9f965e600d4c59551370ce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use the standard testlib helpers for generating clicks and port the
remaining occurrences to the new versions of
QWindowSystemInterface::handleMouseEvent(). Similarly, fix
QWindowSystemInterface::handleTabletEvent().
Task-number: QTBUG-76491
Change-Id: I6a30957164891b56a018696606956c3cab56047f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
There is no year 0 in the proleptic Gregorian calendar, so QDate()
won't be happy if asked for a date in it. Tweak scanning of the data
we get from MS-Win so as to avoid a date calculation that could
otherwise happen in year 0 when constructing
QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")).
Added a test for this case, which Oliver Wolff has kindly verified
does reproduce the assertion failure. However, Coin is unable to
reproduce, as all its MS builds are configured with -release, so
Q_ASSERT() does nothing. (The relevant code then skips over year 0,
albeit for the wrong reasons, and gets the right results, albeit
inefficiently, leaving no other symptom by which to detect the
problem.)
Fixes: QTBUG-78051
Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Cleanup QTableWidget autotest:
- use range-based for loops where possible
- use nullptr
- use member initialization
- use new signal/slot syntax
- remove a lot of C-style casts
- use static invocations
- use override
- instantiate objects on stack instead of heap to avoid memleaks
Change-Id: I99ed144caab88d648d5ab987ce0963fbc6f1197d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The constructor taking a QWidget is needed for specifying the screen
where the splash screen should be displayed.
Add a new constructor for specifying the target screen for the splash screen
directly, instead of "extracting" the screen information from a widget.
This removes the need for using the deprecated QDesktopWidget.
Deprecate the constructor taking a QWidget.
Task-number: QTBUG-76491
Change-Id: I1dde242ff5f7b53e52af308bb685f492d6266d33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The test is not failing anymore on QEMU targets.
This partially reverts commit
71bd06d516.
Fixes: QTBUG-71915
Change-Id: I68593edf0ec245e14879833c8aa90661a3c2e227
Reviewed-by: Liang Qi <liang.qi@qt.io>
BT.2020 is an HDR color space and its luminance range doesn't match
that of the rest of the currently available color spaces. Without
support for white-point luminance in 5.14, there would be a behavior
change when luminance support is later introduced, so it is better to
remove it now, and reintroduce it when the necessary handling of
different luminance levels is available.
Change-Id: Ie29e4dd757faae3ac91d4252e1206acce42801dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QShortcut::event() did not call the base class implementation
QObject::event() which caused that e.g. QEvent::DeferredDelete was not
handled.
Fix it by calling QObject::event() when the event was not handled.
Fixes: QTBUG-66809
Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The enum OptimizationFlag::DontClipPainter is deprecated and not used in
the code since Qt4 times. Therefore also mark it as deprecated so it can
be removed with Qt6
Change-Id: I318a55cf42e7a233d13d4ec0144e1977251f5c92
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Fix warnings:
tst_qpdfwriter.cpp:223:58: warning: virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize)’ is deprecated: Use setPageSize(QPageSize(id)) instead [-Wdeprecated-declarations]
by using the QPageSize-based API. Streamline the code by using
QPageSizeId.
Task-number: QTBUG-76491
Change-Id: I409f0e27de64bc66502a60a9109c6115f36e527d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The minimum supported version is Windows 7. Remove
QOperatingSystemVersion::WindowsVista added by
b0cd007335 and replace with "true"
wherever it was used.
Change-Id: I08c0208467b655a921b6773f77d8bc099be69031
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Deprecate the constructors, add guards.
Use a QStandardItemModel in tst_QCompleter::setters() instead.
Task-number: QTBUG-69410
Change-Id: If77298982bb3d0b5321ae1271fab3f33b196101d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Words should not be abbreviated.
Split a long line and reflowed some comments in the process.
Fixes: QTBUG-78008
Change-Id: I52d75409f02e2cecbed3e94d424617ad594c275b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
I was observing rare crashes on my mac, where I was using SecureTransport.
This would imply both the client (the test) and the server were working
in h2c mode. But this is against the test's logic - the first request
will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2
requests instead.
Fixes: QTBUG-77476
Change-Id: I048ca242e2096ca36dd112277807d1fee530150c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We don't need a getter for the 'preset' of a color-space, as color
spaces can be compared to the presets directly. This allows us to
remove the Undefined and Unknown values from the presets.
Internally we still distinguish known presets from unknown or undefined
presets via the magic 0-value. The validity of a QColorSpace is not
based on this preset, but on its actual values.
Fixes: QTBUG-77963
Change-Id: I1e0a2a4be83021b8c82b3c778019f680fd46455b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Remove member m_testWidget; instantiate test widget on the
stack where needed
- Introduce nullptr
- Use range-based for
- Streamline some code
- Fix static invocation
- Fix class structure, add override
- Use initializer lists
- Fix some style issues
Task-number: QTBUG-76493
Change-Id: If339d51a16bb77565cf10404ad1266c8f63a68b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The test requires High DPI scaling to be disabled since it
manipulates the factors itself in a test.
Turn it off initially and introduce a member variable
containing a suitable size depending on the screen to make the
test pass on High DPI screens without violating minimum window
widths on Windows.
Task-number: QTBUG-76493
Change-Id: I7b908940413d6a35a4bee781b4df07a31069bb17
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QGraphicsItem::ItemMatrixChange has been deprecated since 5.14. Fixed
the usage in tests to compile condinionally, only when it is available.
Change-Id: I63e892a01a50fb9ac51bf38eb761cb26375bc194
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Stop using QExplicitlySharedDataPointer, makes it possible to inline
the move constructor and assign operator.
Also protect other methods from nullptr d_ptr, and change the default
constructed value to also have a null d_ptr, to match the result after
a move.
Change-Id: I40928feef90cc956ef84d0516a77b0ee0f8986c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In QPainter, there is a shortcut code path for the drawImage(point,
image) call, relative to the full drawImage(targetRect, img,
srcRect). The lance script interpreter would only use the latter, so
the former was not covered by the tests.
As a driveby, remove the pointless usage of non-default dithering
flags in drawImage(), since it is more important to test the default.
Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash
The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.
Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 1232205e32)
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash
The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.
Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The API is problematic for several reasons:
- the mixing of flags and enum in a single enum type
- the name "type" as somewhat overloaded
- the ease of misuse when comparing the result rather than testing
for a bit being set
In light of this, focus for 5.14 on the new isShortcut and
isSymbolicLink functions, thus migitating the problematic
isSymLink which conflates the two concepts.
Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This can, of course, only be done in private APIs - but comment on
public APIs to do the same at Qt 6.
Change-Id: I3c79951572be3c37b0b0c5b1b05bced051a40964
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
According to Windows docs, GetMessage() function retrieves the messages
from the input queue in defined order, where posted messages are
processed ahead of input messages, even if they were posted later.
Therefore, if the application produces a posted event permanently, as
a result of processing that event, user input messages may be blocked
due to hard CPU usage by the application.
It's not a problem, if an internal Qt event loop is running. By calling
sendPostedEvents() on the beginning of processEvents(), we are sending
posted events only once per iteration. However, during execution of
the foreign loop, we should artificially lower the priority of the
WM_QT_SENDPOSTEDEVENTS message in order to enable delivery of other
input messages.
To solve the problem, it is proposed to postpone the
WM_QT_SENDPOSTEDEVENTS message until the message queue becomes empty,
as it works for the internal loop.
Task-number: QTBUG-77464
Change-Id: I8dedb6837c6fc41aa6f497e67ab2352c2b4f3772
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QColorConstant is a C++11 version of Qt::GlobalColor, except that instead
of Qt::red being an enum, QColorConstants::red is an actual QColor instance,
a bit like in the Qt 3 days.
In addition, the SVG names that QColor understands are also available,
with the same values. Technically, when building a QColor from a color
name, QColor ignores casing and whitespaces; we stick to the SVG/CSS
official color names (which are lowercase), and prefix them with Svg
to clarify where they come from. For instance, note how SVG's gray
is not Qt::gray.
[ChangeLog][QtGui][[QColor] Added QColorConstants, a namespace
containing constexpr QColor instances.
Change-Id: Ic9fab26a9a537fcc43cc230da28f4c6314a32438
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The test requires High DPI scaling to be disabled since it
captures widgets.
Turn it off initially and introduce a member variable
containing a suitable size depending on the screen to make the
test pass on High DPI screens without violating minimum window
widths on Windows.
Change-Id: Ida9f306cff6abd48ee5de7001c7670a0da60c6c2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
- Fix includes
- Add window titles
- Introduce nullptr
- Remove unneeded C-style casts in QCOMPARE
- Replace remaining C-style casts
- Use range-based for
- Fix static invocation
- Fix class structure, add override, use member initialization
- Fix top level widget leaks and add a check
- Silence debug output by using a logging category
- Use Qt 5 connection syntax
Task-number: QTBUG-76497
Change-Id: I77532a517353d04d1da43ce844988ee0ac2ffc7d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Is pretty common on some architectures so we can avoid swizzling by
supporting it.
Fixes: QTBUG-45671
Change-Id: Ic7a21b5bfb374bf7496fd2b2b1252c2f1ed47705
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
For tst_QFrame and tst_QOpenGLWidget, force scaling off
since they do screen captures which would fail with
scaling activated due to different device pixel ratios.
For tst_QGraphicsItem and tst_QHeaderView, force
scaling on for Windows since some tests otherwise fail
due to violation of the minimum size constraints of
framed windows on Windows.
The tests will then pass regardless of any environment
setting of the scaling variables on a developer
machine.
Change-Id: Iefa4e84b433f7e51dce4e416546a9eda8ee6d0f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The test contained outdated baseline images for
1) Windows Vista: They were only used for OS version Vista
and do not match any more.
2) macOS: They were apparently were not in use any more
Remove the testing and image comparison code.
Task-number: QTBUG-76493
Change-Id: I91cec5113db8d1845b43f97ad2987e63d9f86ac7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
And send it in our 'SETTINGS' frame. Add an auto-test
for this and (as a bonus) - fix a bug accidentally
introduced by the previous change.
Task-number: QTBUG-77412
Change-Id: I4277ff47e8d8d3b6b8666fbcd7dc73c827f349c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Otherwise, we get a warning:
QWARN : tst_NoQtEventLoop::consumeSocketEvents() QWindowsContext::windowsProc: No Qt Window found for event 0x2a3 (WM_MOUSELEAVE), hwnd=0x0x9b80646.
in the event loop which is running by another test. So, add missing
'delete' call.
Change-Id: Ib9b24155bdd6e78062a5234c317c9f878906e413
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This has its own locale data, extracted from CLDR. This data may
potentially be shared with other variants on the Islamic calendar, so
is handled by a separate base-class, QHijriCalendar, on which such
variants may base their implementations.
[ChangeLog][QtCore][QCalendar] Added support for the Islamic Civil
calendar, controlled by feature islamiccivilcalendar, with locale data
that can be shared with other implementations, controlled by feature
hijricalendar.
Fixes: QTBUG-56675
Change-Id: Idf32d3da7034baa8ec5e66ef847e59a8a2f31cbd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
These functions tighten the integration of QMargins(F) with the rest
of the geometry classes by providing a way to apply margins to sizes
(and later, rects).
Apply them in a few obvious cases across QtWidgets.
[ChangeLog][QtCore][QSize/QSizeF] Added grownBy(QMargin(F))/shrunkBy(QMargin(F)).
Change-Id: I8a549436824cdb7fb6125a8cde89d5bf02826934
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Base it on QWidgetPrivate::associatedScreen(), but make a larger
effort to find a screen in case the widget is not shown yet.
Rename QDesktopScreenWidget::screen() to something else to avoid
clashes.
Task-number: QTBUG-62094
Task-number: QTBUG-53022
Change-Id: I36ba5ef5f0645a4ac89da0b38a391f7057b2f49c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This has its own locale data, extracted from CLDR.
[ChangeLog][QtCore][QCalendar] Added support for the Jalali (Persian
or Solar Hijri) calendar, controlled by feature jalalicalendar.
Fixes: QTBUG-58404
Change-Id: Id5c56a10db05a4fd612aafc01615273db81ec743
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
These share their locale data with the Gregorian calendar, making them
virtually free to add. Still leave them out of the boot-strap build,
though.
[ChangeLog][QtCore][QCalendar] Added support for Julian and Milankovic
calendars. These are enabled by default, except in bootstrap builds.
Change-Id: I585045ed9e78c1e959957f6772b3e144093b701c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.
Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
That way the image formats with color space supports all have both read
and write support.
Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Add QCalendarBackend as a base class for calendar implementations and
QCalendar as a facade via which to access it.
QDate's implicit implementation of the Gregorian calendar becomes
QGregorianCalendar and QDate methods now support choice of calendar.
Convert QLocale's CLDR data for month names to a locale-data component
of each supported calendar and relevant QLocale methods now support
choice of calendar. Adapt Python scripts for locale data generation to
extract month name data from CLDR (keeping on version v35.1) into the
new calendar-locale files. The locale data for the Gregorian calendar
is held in a Roman calendar base, for sharing with other calendars.
Add tests for basic uses of the new API.
[ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse
calendars, supported by implementing QCalendarBackend.
[ChangeLog][QtCore][QDate] Allow choice of calendar in various
operations, with Gregorian remaining the default.
Done-with: Lars Knoll <lars.knoll@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Fixes: QTBUG-17110
Fixes: QTBUG-950
Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Quoting a blog from 2009, "this class is responsible for figuring out which parts
of the window surface needs to be updated prior to showing it to screen, so it's
really a repaint manager."
https://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/
What better time to do the rename than 10 years later!
Change-Id: Ibf3c3bc8c7df64ac03d72e1f71d296b62d832fee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Similar to TLS configuration that we can use on QNetworkRequest,
we can configure different options in our HTTP/2 handling by
providing QNetworkAccessManager with h2 configuration. Previously,
it was only possible internally in our auto-test - a hack with
QObject's properties and a private class. Now it's time to provide
a public API for this.
[ChangeLog][QtNetwork][QNetworkRequest] Add an ability to configure HTTP/2 protocol
Change-Id: I80266a74f6dcdfabb7fc05ed1dce17897bcda886
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat
dubious use-case. The Symbian code is since long gone (ae30d7141), so the
remaining pieces are just adding complexity to the already intricate workings
of the QtWidgets backingstore/painting logic.
Task-number: QTBUG-8697
Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 2e0b0be2ce)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Supported style attributes:
<table>
style: supports "border-collapse: collapse" and "border-color".
border: width of the outer border
bordercolor: basic color for all borders
<tr>
style: not supported
<td>/</th>
style: supports the "border", "border-[top|left|bottom|right]]"
shorthand styles and the "border-width", "border-color"
and "border-style" (and the top/left/bottom/right variants)
attributes
<table border=1 style="border-collapse: collapse"> will render
a simple 1px table grid.
Notes:
The QTextDocument table model is much simpler than the HTML table model.
It basically only has <table> and <td> support. So the HTML parser is
forced to map markup and styling to the QTextDocument model which
is not without loss.
In other words: While QTextDocument -> HTML -> QTextDocument should
preserve the QTextDocument structure, HTML -> QTextDocument -> HTML
does not preserve the HTML DOM at all.
So for now the HTML importer and writer only support border styles on
the <td> and <th> nodes. In future updates, the HTML parser might be
enhanced to map <tr> and <table> CSS styles to the cells.
Change-Id: If9e7312fa6cbf270cf8f7b3c72ba1fa094107517
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Replace foreach with range-based for loop, replace some int values with
the correct Qt flag enum as drive-by.
Change-Id: I41c52f6ae6c537fa9ad4f9e169485533936952d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This patch was generated with tooling from patchset 31 of
https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive
mode. General platform names were chosen if greater than 60% of the
currently active platforms of a given type in COIN recently failed.
Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat
dubious use-case. The Symbian code is since long gone (ae30d7141), so the
remaining pieces are just adding complexity to the already intricate workings
of the QtWidgets backingstore/painting logic.
Task-number: QTBUG-8697
Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Qt has traditionally considered Windows shortcut files equivalent to
symlinks on Unix file systems. Because of NTFS symlinks, the
interpretation of shotcut files as symlinks is confusing.
In this change, QFileInfo treats shortcut (.lnk) files as regular files
but can follow the pointed object.
In addition, QFileInfo introduces a more comprehensive file type. So
that applications can make well-informed decisions about how to treat a
file system entry.
Based on the implementation of QFileInfo::type(), two inline helper
functions are introduced to QFileInfo.
1. isSymbolicLink, returns true if it points to a symbolic link.
2. isShortcut, returns true if it points to a shortcut.
[ChangeLog][QtCore][QFileInfo] Introduce QFileInfo::type() to replace
the isSymLink method.
Task-number: QTBUG-75869
Change-Id: Icc0dd52f9ad0ea50b0265d77ee0d0a3d25054e39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Qt for QNX is, by default, built without the clipboard feature.
Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
Add support for astc format files as an experimental feature.
To enable, configure with "-feature-texture_format_astc_experimental"
(Backported from commit 5a4db421bd94acd12a4ac1f77031996b95f85dbf)
Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
...with a failing test case for QTBUG-77299.
Task-number: QTBUG-77299
Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When running Qt autotests on a developer machine with a high
resolution, failures occur due to either some widget becoming too
small, some rounding fuzz appearing when Qt High DPI scaling is active,
or some test taking screenshots failing to deal with device pixel
ratios != 1 in the obtained pixmaps.
It is not feasible to adapt all tests to pass on high resolution
monitors in both modes (Qt High DPI scaling enabled/disabled). It
should be possible to specify the High DPI setting per test.
Previously, it was not possible to set the Qt High DPI scaling
attributes since they must be applied before QApplication
instantiation.
Enable this by checking for the presence of a static void initMain()
function on the test object and invoking it before QApplication
instantiation.
Prototypically use it in tst_qtimer and to turn off High DPI scaling for
tst_QGL.
[ChangeLog][QtTestLib] It is now possible to perform static
initialization before QApplication instantiation by implementing a
initMain() function in the test class.
Change-Id: Idec0134b189710a14c41a451fa8445bc0c5b1cf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QTreeView allowed to set the sort column to -1 which shows the data in
it's natural order (when the model supports it). This functionality was
removed during the porting away from the deprecated sortByColumn(int)
functionality done in d0f909f8db
Readd the functionality and also allow it for QTableView.
Fixes: QTBUG-77419
Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
This functionality is especially convenient if meta-object system is
heavily used in a test. For example, if you need to test a bunch of
signals based on their names and/or argument types.
Change-Id: I09a4ecbbd3d0859b5fd466d9dde7679804eb7614
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
After comparing colorspaces was remove from QImage equality, the test
was no longer testing what it was supposed to.
Change-Id: Ie7ee8ac2f488ea4254086cbb91a2662dc729e80b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
... in case of a test failure. QAutoPointer is private API, but here we can use it.
Change-Id: I45b734385cd13fdea95d0100f2d8152f969612f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Windows resource files support a subset of C preprocessor directives.
Among others they can have #include directives.
Use QMake's own scanner to retrieve the files that are included by a
Windows resource file and add them to its dependencies.
For the test case the TestCompiler class had to be extended:
runCommand is now public, and commandOutput is less peculiar.
Fixes: QTBUG-3859
Change-Id: I138703352c37c98297c0574a9a440510c1c494b8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This happened to work by chance, as QList::insert() would
gracefully handle out of bounds insertions.
Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d
Reviewed-by: David Faure <david.faure@kdab.com>
This commit adds transitive dependencies to the plugins, so that a
sane set of default plugins get auto-imported when linking against a
module. It also provides a new function, qt5_import_plugins(), which
allows you to override the set of plugins that get imported. The decision
of whether or not to import a specific plugin is based on several custom
target properties and a very clever generator expression.
Note that this change only imports plugins on static Qt builds. It
does nothing on shared Qt builds, as the shared libraries already have
their own plugin import mechanism.
[ChangeLog][CMake] Added ability to auto-import non-qml plugins on
CMake builds
Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>