| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
In some cases a style's drawComplexControl won't exercise the entire
range of subControlRects, or won't do so for each widget if multiple
instances of the same widget are drawn, so we opt to resolve the
sub control rects manually for calls to drawComplexControl. As part
of that we make sure to map the subcontrol rect to the rect of the
control.
Change-Id: Iaca1dcee1a0141e6dc8c81a6b8a4d3ed9be195e6
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
| |
|
|
|
|
|
| |
When reporting and disambiguating results.
Change-Id: I1ea0d38b36deb5cb610a9b0da4c17e9b987375dc
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
| |
It has a dedicated metadata field now.
Change-Id: Ia48b5114f33bfb96a3eae909af07656e979a3941
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: I941ef122fbba19e3dc111bcb2541f89a804e27a5
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: I58e5db11eacd4eddcb56f3e8944da9619ef718f3
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new paint command drawAlignedText which allows you
to draw text inside a rectangle and provide the text flags.
In addition, it adds a test for mnemonics in text to demonstrate
the issue this introduces with Arabic ligatures.
Pick-to: 6.10
Task-number: QTBUG-93371
Change-Id: Ic3f094f9aa9cdcbecf871a947c71b8e31a97bf44
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
| |
Makes it easier to debug tests by visually inspecting during run.
Change-Id: I7824c72686422cdc9bb4098c2afadf9594a698b9
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
| |
Change-Id: I2858baccb09ebf336ab7c2cde7efeb09aca6ef53
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I79d4b50025a7360b4aab5982cd431f85289feaf4
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
The baseline server generates client side code that allows toggling
the various debug rects on and off, and draws them with a cosmetic
pen regardless of the zoom level.
Change-Id: I44fcb212cdb95e3c72f884466316f797e44554e2
Reviewed-by: Eirik Aavitsland <[email protected]>
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
We stream it to the baseline server via the `misc` field, which was
not used for client/server communication, and only used on the server
side to add additional data to ImageItems and plumb it though its own
APIs.
Change-Id: Ic85544d4257b785e4a8bfc949c6a819be5d602f2
Reviewed-by: Eirik Aavitsland <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
And always use primary screen. The user can choose to use
QT_SCALE_FACTOR to override.
Change-Id: Icad8163d576691645bd90c23156d5c34158a37c6
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
| |
Helps to not have to think in octal when looking at pixel differences.
Change-Id: Iea1d560ec03dd7e4b060b528669b1005f156fe37
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
| |
|
|
|
|
|
|
| |
It will trigger git installation on macOS if not installed, and
is not useful these days anyways according to Eirik :)
Change-Id: I53b0c265ac977d7e2a1560a20d5cfe1e437c0e74
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
We QVERIFY and QCOMPARE deep in the helper method machinery,
so let's throw to fail, instead of checking for failure at
each call site.
Change-Id: I279b07d0edace775afe34ac497dcbd75e96766c3
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: I46261b784ca0fc7a47903dbcb15765ff1d9696ba
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: I49a6dacc59eb5e7abe0f4faae6257f1edbcec54c
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: Ia4cbd3cb9271510aa658a48bd2badc1f3164dba4
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
| |
For good measure.
Change-Id: Icc94d0b4fd5b7ac9846a95e171e63ef0bec63324
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of waiting 250ms between each snapshot, to account for
animations in the styles, let's use the new hook in QUnifiedTimer
to speed up animations.
Brings the tst_Widgets baseline test down from ~200s to ~30s.
The window delay in takeScreenSnapshot has been left alone for now.
Change-Id: I83d4f25d8d6f198c2f00f31af1dbde0f3de5ded0
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And separate it from the background by making the background a
checkerboard pattern.
Avoids issues with rounded window frames contributing to the
results. Also, by making the window frameless we will not get
a default window background color on macOS, which means that
any issues with transparent rendering will be visible when
running the tests locally, as the checkerboard background
will shine though.
Change-Id: Icd501eeb149d2dbfb184c91e8eac3a531d09408d
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
| |
The drop shadow may overlap with the test window, if the activation
stealing window is too close, depending on the shadow size.
Change-Id: I39bf271d0f1852febd1920e2e7a9fe615ff6594e
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Going via QWidget::grab() will render to a QPixmap, which on most
platforms is going to be QRasterPlatformPixmap. The format of the
underlying QImage in that case is resolved from the primary screen,
which most platforms report as QImage::Format_RGB32.
This means we will not be able to detect the difference between
black and fully transparent areas in the rendered result, which
has been observed to be a problem for widget styles that wrongly
render their controls using source composition.
To solve this we render via QWidget::render() instead, to an image
with an alpha format.
Change-Id: I078f062b662590598c3597797abc2bfa78eaf86a
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Move the windows to a screen with a 1.0 DPR, if the primary screen has a
different ratio. This makes sure that we get reproducible runs also
locally, no matter where e.g. the mouse pointer is (which on macOS
defines which screen the window opens up).
Change-Id: Iab7708c4abc0c97486f00a44a4b0a4c2b9406a62
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The Vista style uses a dynamic property on each objects to control
animations; respect that dynamic property on the style itself as well
to make it possible to turn off animations.
Do so in the baseline test framework to get rid of some flakiness when
using the Windows Vista style.
Change-Id: I2bad329786f38e37d99f947f121e5cd44f5741c1
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Wladimir Leuschner <[email protected]>
|
| |
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I4379b4b982b869ca8d502d2f102ddc3b3858b5c8
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Also adds a helper function QBaselineTest::finalizeAndDisconnect()
that calls the finalize command, prints the optional report URL
and disconnects to the server.
Pick-to: 6.8
Change-Id: Iabdba77f9eebad3e3f3fa67ab8977d1e49c49fb4
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1) Add a QBASELINETEST_MAIN macro as a replacement for QTEST_MAIN,
relieving the clients of reproducing the kludgy workaround
2) Add a -server command line option to baseline tests, as an
alternative to specifying the server in an environment variable
3) Fix command line parsing so that it exits on syntax errors.
Change-Id: I36f38267143a308e971e2e7b2fdbe4be44370043
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Now developer build tests compile, but some are not working.
Functional fix will come later via separate tasks.
Task-number: QTBUG-122999
Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310
Reviewed-by: Alexey Edelev <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set focus on the test window so that the tested widget doesn't have it.
Remove the "PublicWidget" hack, we have public QWidget APIs to find the
next widget in the focus chain that we can use to transfer focus
reliably. Use TabFocusReason to maintain existing behavior, and to
test that widgets that handle that specifically appear correctly. Clear
the focus on the test widget by setting it back to the window after
taking the "focused" snapshot.
Add QCOMPARE and QVERIFY to assert that the test is in the right state
before taking screenshots.
Pick-to: 6.7
Change-Id: Icef6ce1bb1c63c9f6cde7d0ddca82e693cace420
Reviewed-by: Axel Spoerl <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests are flaky on macOS because the background desktop shows
through the rounded corner of the test window. We cannot reliably
control this on each platform, so instead make the test window a
secondary window with a second, fullscreen and frameless window as the
transient parent. This way, we have full control over the background
pixels that might show through (semi-)transparent parts of the test
window.
Pick-to: 6.7
Change-Id: I44b7e834797b46fa8b44d776f6b91c99536a6cc9
Reviewed-by: Axel Spoerl <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a CMYK 8bpp format to QImage. The idea is to enable the
transport of CMYK images inside Qt, for instance to be loaded/saved from
files or painted on CMYK capable paint devices (e.g. PDF).
Also, rasterization support *from* a CMYK image is added (on top of a
RGB surface), as well as CMYK image scaling/conversion.
Conversion and rasterization between CMYK and RGB isn't particularly
optimized nor it honors any colorspaces yet. The overall idea is to
match 1:1 the existing behavior of CMYK QColor (which get naively
changed to RGB; there isn't colorspace support in QPainter yet).
There are no plans to add rasterization *towards* CMYK.
Image save/load in native CMYK formats will be added in future commits.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
[ChangeLog][QtGui] Support for 8-bit CMYK images has been added.
Change-Id: I4b024cd4c15119c669b6ddd450418a9e425587f8
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Blacklisting items on the baseline server would avoid any mismatch
failures for such items. However, they would still be rendered. That
is undesirable if the rendering itself has unwanted side effects for
such items, e.g. crashing the test executable.
Fix by adding new functionality in the baseline testing framework to
allow checking blacklisting status ahead of time, and add a new macro
QBASELINE_SKIP_IF_BLACKLISTED to do just that.
Add usage of that macro to the QPainter baseline test.
Pick-to: 6.7 6.5 6.2
Change-Id: I35f6df8cff2c6cb985c25ab5470cd42b53d44940
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
If a commit adds new baseline test items, they would not be reported
to the server when doing a LanceBot test on that commit, and so not be
visible in the report either. This commit fixes the client side of
that issue; the server is already updated.
Change-Id: I60c2958def5e7b54ddc2789cf5727edcbb1a90e1
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Reviewed-by: Jonas Karlsson <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8
Reviewed-by: Christian Ehrlicher <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of these fall into the trivial category: loops over (readily made)
const local containers. As such, they cannot possibly depend on the
safety copy that Q_FOREACH performs, so are safe to port as-is to
ranged for loops.
There may be more where these came from, but these were the ones that
stood out as immediately obvious when scanning the 100s of uses in
qtbase, so I preferred to directly fix them over white-listing their
files with QT_NO_FOREACH (which still may be necessary for some files,
as this patch may not port all uses in that file).
Pick-to: 6.6 6.5
Task-nubmber: QTBUG-115839
Change-Id: I7b7893bec8254f902660dac24167113aca855029
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
Reviewed-by: Ivan Solovev <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
The recorded images frequently show traces of a fading-out command
prompt window that is opened by the test execution. We evidently have
to wait longer for all window-level effects are finished.
Pick-to: 6.5
Change-Id: I50db54ff33bf4bb1ef7c480a4aede1d5de1618c3
Reviewed-by: Santhosh Kumar <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the other overloads are implemented using the new one.
Windows change relies on the pre-check in the code review making sure it
compiles.
[ChangeLog][QtCore][QThread] Added sleep(std::chrono::nanoseconds)
overload.
Task-number: QTBUG-110059
Change-Id: I9a4f4bf09041788ec9275093b6b8d0386521e286
Reviewed-by: Thiago Macieira <[email protected]>
|
| |
|
|
|
|
|
|
| |
Caused crashes because of uninitialized variable
Pick-to: 6.5
Change-Id: I18f96e47b766415ad49e6a8515bbaa372b122cd3
Reviewed-by: Laszlo Agocs <[email protected]>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-111416
Pick-to: 6.5
Change-Id: Ife91bbc0bf09e3fcc5c4d8dc06e352eadee1b810
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Added baseline test case for menu (popup), combobox, command link and
lcd number.
New API takeScreenSnapshot() has been added for screen capture and
it serves to capture pop up windows
Change-Id: I5c1e46df270d94faf5c53431cddbd07532c256ee
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
| |
Change-Id: I02e51868f762292b0a6b57d38a5bd25335b19621
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:
const std::string o = "object";
auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };
auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
auto exprOfDeclaredType = [&](auto decl) {
return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
};
return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
};
auto renameMethod = [&] (ArrayRef<StringRef> classes,
StringRef from, StringRef to) {
return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
changeTo(cat(access(o, cat(to)), "()")),
cat("use '", to, "' instead of '", from, "'"));
};
renameMethod(<classes>, "count", "size");
renameMethod(<classes>, "length", "size");
except that the on() matcher has been replaced by one that doesn't
ignoreParens().
a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.
Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache,
to avoid porting calls that explicitly test count().
Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22
Reviewed-by: Ivan Solovev <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is semantic patch using ClangTidyTransformator:
auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.
<classes> are:
// sequential:
"QByteArray",
"QList",
"QQueue",
"QStack",
"QString",
"QVarLengthArray",
"QVector",
// associative:
"QHash",
"QMultiHash",
"QMap",
"QMultiMap",
"QSet",
// Qt has no QMultiSet
Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Found by codespell
Pick-to: 6.4
Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb
Reviewed-by: Nicholas Bennett <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtGui][QPainter] In Qt 5, the predefined brush patterns
would always be transformed along with the object being painted. In Qt
6.0 onwards, they would or would not, depending on the
SmoothPixmapTransformation render hint. Instead of this somewhat
surprising behavior, make the default be untransformed
(i.e. cosmetic), which makes sense when it comes to dpr scaling. For
the cases where one wants scaling, a new render hint is introduced to
enable that: NonCosmeticPatternBrushes.
Change-Id: I2208c7a28af9056d7ab97a529b66bf2d502c3c4f
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
Reviewed-by: Jörg Bornemann <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Override the default cursor blink time so that we don't get mismatches
from line edits. We need to set the time to > 0 so that QStyleHints does
not fall back to the platform integration.
Pick-to: 6.3
Change-Id: Ib1d04f7450c01c352c13098886aee032dcb14c72
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Widgets and styles might use fade effects or other asynchronous mechanisms
as part of hovering. This results in mismatches when the snapshot is
taken before those effects are completed.
Since we can't control all such animations from the outside, process
events for some milliseconds before taking the snapshot.
Pick-to: 6.3
Change-Id: I771658300628238552bddcd14a6751c3f6c0c63d
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
|