diff options
Diffstat (limited to 'tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index ae71663036..1acf07301c 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -43,7 +43,7 @@ #include <qlabel.h> #include <qtextedit.h> #include <qstylehints.h> -#include <qdesktopwidget.h> +#include <qscreen.h> #include <private/qmainwindowlayout_p.h> #include <private/qdockarealayout_p.h> @@ -768,7 +768,7 @@ void tst_QMainWindow::contentsMargins() QFETCH(int, contentsMargin); QMainWindow mw; - const QRect availGeometry = QApplication::desktop()->availableGeometry(); + const QRect availGeometry = QGuiApplication::primaryScreen()->availableGeometry(); mw.menuBar()->addMenu("File"); mw.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QLatin1Char(' ') + QLatin1String(QTest::currentDataTag())); @@ -1782,6 +1782,9 @@ void tst_QMainWindow::centralWidgetSize() mainWindow.setCentralWidget(&widget); mainWindow.show(); +#ifdef Q_OS_WINRT + QEXPECT_FAIL("", "Widgets are maximized by default on WinRT - QTBUG-68297", Abort); +#endif QTRY_COMPARE(widget.size(), widget.sizeHint()); } @@ -1826,6 +1829,9 @@ void tst_QMainWindow::fixedSizeCentralWidget() // finally verify that we get the space back when we resize to the old size mainWindow.resize(mwSize); +#ifdef Q_OS_WINRT + QEXPECT_FAIL("", "QMainWindow::resize does not work on WinRT", Continue); +#endif QTRY_COMPARE(child->height(), childHeight); } |