summaryrefslogtreecommitdiffstats
path: root/tests/manual/dialogs/printdialogpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/dialogs/printdialogpanel.cpp')
-rw-r--r--tests/manual/dialogs/printdialogpanel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp
index 8d64d2f6a6..b7447e3d64 100644
--- a/tests/manual/dialogs/printdialogpanel.cpp
+++ b/tests/manual/dialogs/printdialogpanel.cpp
@@ -710,8 +710,7 @@ void PrintDialogPanel::showPreviewDialog()
applySettings(m_printer.data());
PrintPreviewDialog dialog(m_printer.data(), this);
#if QT_VERSION >= 0x050000
- const int screenNumber = QApplication::desktop()->screenNumber(this);
- const QSize availableSize = QGuiApplication::screens().at(screenNumber)->availableSize();
+ const QSize availableSize = screen()->availableSize();
#else
const QSize availableSize = QApplication::desktop()->availableGeometry().size();
#endif