diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp index fb273a0166..b60adfcdfd 100644 --- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp +++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp @@ -44,30 +44,37 @@ #include #include #include - -#if QT_VERSION < 0x050000 // Fixme Qt 5 - -#include #include #include - - #include "../../shared/util.h" +#if QT_VERSION < 0x050000 +#include +#endif + class tst_QWindowSurface : public QObject { Q_OBJECT -public: - tst_QWindowSurface() {} - ~tst_QWindowSurface() {} - +#if QT_VERSION >= 0x050000 +public slots: + void initTestCase(); +#else private slots: void getSetWindowSurface(); void flushOutsidePaintEvent(); void grabWidget(); +#endif }; +#if QT_VERSION >= 0x050000 +void tst_QWindowSurface::initTestCase() +{ + QSKIP("This test is temporarily skipped until it is fixed for Qt5", SkipAll); +} + +#else + class MyWindowSurface : public QWindowSurface { public: @@ -281,13 +288,7 @@ void tst_QWindowSurface::grabWidget() QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white)); } -QTEST_MAIN(tst_QWindowSurface) - -#else - -// Temporarily skip the entire test until it is fixed for Qt5 -QTEST_NOOP_MAIN - #endif +QTEST_MAIN(tst_QWindowSurface) #include "tst_qwindowsurface.moc"