summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2023-01-10 15:31:43 +0000
committerAxel Spoerl <axel.spoerl@qt.io>2023-01-10 23:03:30 +0000
commitcccdd89ac8c7a9d48accefba5c69d246087aec84 (patch)
treebd12ea9cb1a5000eebc4d1db4083b2b9748ff259 /tests/auto/widgets
parenta071bd674acd24f0d853f0d58e8d5652cb102553 (diff)
Revert "Fix tst_QWidgetRepaintManager on XCB"
This reverts commit 4096667d6601dcbc5e713e6b0fd5b5218453c4cb. Reason for revert: <Screen shot workaround is flaky.> Change-Id: I6e01cc584c094d0d0b8c1544b9daf72d648dd002 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/kernel/qwidgetrepaintmanager/BLACKLIST11
-rw-r--r--tests/auto/widgets/kernel/qwidgetrepaintmanager/tst_qwidgetrepaintmanager.cpp38
2 files changed, 12 insertions, 37 deletions
diff --git a/tests/auto/widgets/kernel/qwidgetrepaintmanager/BLACKLIST b/tests/auto/widgets/kernel/qwidgetrepaintmanager/BLACKLIST
new file mode 100644
index 0000000000..94692ee20a
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidgetrepaintmanager/BLACKLIST
@@ -0,0 +1,11 @@
+# Temporary for QTBUG-109036
+[fastMove]
+opensuse-leap
+
+# Temporary for QTBUG-109036
+[moveAccross]
+opensuse-leap
+
+# Temporary for QTBUG-109036
+[moveInOutOverlapped]
+opensuse-leap
diff --git a/tests/auto/widgets/kernel/qwidgetrepaintmanager/tst_qwidgetrepaintmanager.cpp b/tests/auto/widgets/kernel/qwidgetrepaintmanager/tst_qwidgetrepaintmanager.cpp
index feb8a99131..f53d5aeb05 100644
--- a/tests/auto/widgets/kernel/qwidgetrepaintmanager/tst_qwidgetrepaintmanager.cpp
+++ b/tests/auto/widgets/kernel/qwidgetrepaintmanager/tst_qwidgetrepaintmanager.cpp
@@ -262,8 +262,6 @@ private slots:
void moveInOutOverlapped();
protected:
- bool m_xcb = false;
-
/*
This helper compares the widget as rendered into the backingstore with the widget
as rendered via QWidget::grab. The latter always produces a fully rendered image,
@@ -281,44 +279,14 @@ protected:
}
QImage backingstoreContent = platformBackingStore->toImage();
-
- // QXcbBackingStore::toImage() is not reliable. Take a screenshot instead.
- // X11 draws the screen in a thread, which is not a QThread.
- // The first screenshot is therefore unlikely to contain the correct image.
- // It is taken just to obtain size and format.
- QWidget *window = nullptr;
- if (m_xcb) {
-
- // Widget must be shown to be caught on a screen shot
- if (!w->isWindow()) {
- qWarning() << "Hidden widget" << w << "cannot be compared on XCB";
- return false;
- }
-
- window = w->window();
- Q_ASSERT(window);
-
- backingstoreContent = window->screen()->grabWindow(window->winId()).toImage();
- }
-
if (!w->isWindow()) {
const qreal dpr = w->devicePixelRatioF();
const QPointF offset = w->mapTo(w->window(), QPointF(0, 0)) * dpr;
backingstoreContent = backingstoreContent.copy(offset.x(), offset.y(), w->width() * dpr, w->height() * dpr);
}
-
const QImage widgetRender = w->grab().toImage().convertToFormat(backingstoreContent.format());
- // XCB: Process events, until screenshot equals widgetRender or timeout kicks in.
- if (m_xcb) {
- // Unuse result to hit MANUAL_DEBUG code path
- Q_UNUSED(QTest::qWaitFor([&](){
- backingstoreContent = window->screen()->grabWindow(window->winId()).toImage();
- return widgetRender == backingstoreContent;
- }));
- }
-
- const bool result = widgetRender == backingstoreContent;
+ const bool result = backingstoreContent == widgetRender;
#ifdef MANUAL_DEBUG
if (!result) {
@@ -366,10 +334,6 @@ void tst_QWidgetRepaintManager::initTestCase()
m_implementsScroll = widget.backingStore()->handle()->scroll(QRegion(widget.rect()), 1, 1);
qInfo() << QGuiApplication::platformName() << "QPA backend implements scroll:" << m_implementsScroll;
-
-#if defined(QT_BUILD_INTERNAL)
- m_xcb = QGuiApplication::platformName().contains("xcb", Qt::CaseInsensitive);
-#endif
}
void tst_QWidgetRepaintManager::cleanup()