diff options
author | Mitch Curtis <[email protected]> | 2024-07-11 09:03:09 +0800 |
---|---|---|
committer | Mitch Curtis <[email protected]> | 2024-09-04 10:56:35 +0800 |
commit | f7dffe0ae8a97dd3d7bbcf753d122b2066639fc3 (patch) | |
tree | c1631d007410f767ce396b9b8f797e26a990c4c6 /tests/auto/quick/qquicktext/tst_qquicktext.cpp | |
parent | edf8751bb67cac521bf511b17f31e36754c778ad (diff) |
Move duplicate window grab checks into a skip macro
Similar to 8d454b26263e5333d8475bbab91d7b3d1d5e04d8.
According to b1d0136192b7451788dee79c865dede02438f96e, the offscreen
platform now supports window grabs, so remove that from the check.
Change-Id: I84b6056f9c96c2fbbda117b18cdef6f8063205ac
Reviewed-by: Shawn Rutledge <[email protected]>
Diffstat (limited to 'tests/auto/quick/qquicktext/tst_qquicktext.cpp')
-rw-r--r-- | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 0007680962..9498a3833e 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -24,6 +24,7 @@ #include <QtQuickTestUtils/private/qmlutils_p.h> #include <QtQuickTestUtils/private/testhttpserver_p.h> #include <QtQuickTestUtils/private/viewtestutils_p.h> +#include <QtQuickTestUtils/private/visualtestutils_p.h> DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) @@ -1033,6 +1034,8 @@ static inline QByteArray msgNotLessThan(int n1, int n2) void tst_qquicktext::hAlignImplicitWidth() { + SKIP_IF_NO_WINDOW_GRAB + QQuickView view(testFileUrl("hAlignImplicitWidth.qml")); view.setFlags(view.flags() | Qt::WindowStaysOnTopHint); // Prevent being obscured by other windows. view.show(); @@ -1056,9 +1059,6 @@ void tst_qquicktext::hAlignImplicitWidth() const int centeredSection3End = centeredSection3 + sectionWidth; { - if (QGuiApplication::platformName() == QLatin1String("minimal")) - QSKIP("Skipping due to grabWindow not functional on minimal platforms"); - // Left Align QImage image = view.grabWindow(); const int left = numberOfNonWhitePixels(centeredSection1, centeredSection2, image); @@ -4830,8 +4830,7 @@ void tst_qquicktext::verticallyAlignedImageInTable() void tst_qquicktext::transparentBackground() { - if (QGuiApplication::platformName() == QLatin1String("minimal")) - QSKIP("Skipping due to grabWindow not functional on minimal platforms"); + SKIP_IF_NO_WINDOW_GRAB QScopedPointer<QQuickView> window(new QQuickView); window->setSource(testFileUrl("transparentBackground.qml")); @@ -4850,8 +4849,7 @@ void tst_qquicktext::transparentBackground() void tst_qquicktext::displaySuperscriptedTag() { - if (QGuiApplication::platformName() == QLatin1String("minimal")) - QSKIP("Skipping due to grabWindow not functional on minimal platforms"); + SKIP_IF_NO_WINDOW_GRAB QScopedPointer<QQuickView> window(new QQuickView); window->setSource(testFileUrl("displaySuperscriptedTag.qml")); |