summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-02 16:45:17 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-09-03 10:23:04 +0200
commit04b391e135a30060ed6d74bf9d14ba3894b08519 (patch)
tree2118df029614ddf18dd8678caee0bfd6e2ef0024 /tests
parent207e94495ae8a4742ef13af24eb65a2562d34147 (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index ede60210a9..1472aadf99 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <QPainter>
#include <QPalette>
+#include <QWindowsStyle>
#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();