summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-02 14:45:17 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-09-03 08:23:04 (GMT)
commit04b391e135a30060ed6d74bf9d14ba3894b08519 (patch)
tree2118df029614ddf18dd8678caee0bfd6e2ef0024 /tests/auto/qwindowsurface
parent207e94495ae8a4742ef13af24eb65a2562d34147 (diff)
downloadQt-04b391e135a30060ed6d74bf9d14ba3894b08519.zip
Qt-04b391e135a30060ed6d74bf9d14ba3894b08519.tar.gz
Qt-04b391e135a30060ed6d74bf9d14ba3894b08519.tar.bz2
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/auto/qwindowsurface')
-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 ede6021..1472aad 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();