From 04b391e135a30060ed6d74bf9d14ba3894b08519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 2 Sep 2009 16:45:17 +0200 Subject: Fixed autotest failure in qwindowsurface on X11 with Oxygen style. Oxygen draws a fancy background gradient etc so it's not suitable for this kind of pixel testing. Since we're testing the window surface and not the style just use the simple QWindowsStyle here. Reviewed-by: Gunnar Sletta --- tests/auto/qwindowsurface/tst_qwindowsurface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp index ede6021..1472aad 100644 --- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp +++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #ifndef Q_WS_MAC @@ -145,6 +146,8 @@ void tst_QWindowSurface::flushOutsidePaintEvent() #endif ColorWidget w(0, Qt::red); w.setGeometry(10, 100, 50, 50); + // prevent custom styles from messing up the background + w.setStyle(new QWindowsStyle); w.show(); QApplication::processEvents(); @@ -215,6 +218,9 @@ void tst_QWindowSurface::grabWidget() pal.setColor(QPalette::Window, QColor(Qt::red)); babyWidget.setPalette(pal); + // prevent custom styles from messing up the background + parentWidget.setStyle(new QWindowsStyle); + babyWidget.show(); childWidget.show(); parentWidget.show(); -- cgit v0.12