diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-03-24 21:03:00 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-05-28 17:22:59 +0000 |
commit | 2843c58e5f0447e553d0f29614177b3b1d1884dc (patch) | |
tree | 8d1e74a0ee99b10a23366bedf3098481448e4f9a /tests/auto/widgets/widgets/qmainwindow | |
parent | be45ada0359c0a33b97a2672af6b4c1f5dfe78a1 (diff) |
Tests: replace deprecated QDesktopWidget::screenGeometry()
QDesktopWidget::screenGeometry() and similar was deprecated in 5.11
and replaced by QScreen::geometry()
Change-Id: Ic630d022bc6461af78f49684c8ac9d1836d738bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qmainwindow')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 4 |
1 files changed, 2 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..038c468035 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())); |