diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-09-09 16:11:48 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-10-15 20:09:29 +0200 |
commit | 9cc040a806fd2e6f1458e801a99311168d594c77 (patch) | |
tree | 828ca4008a50f44b7b98f7e50f67d01951b4d9ba /tests/manual/dialogs | |
parent | 92b9dcfe2ba602fc396a4806597b9440ed63bded (diff) | |
download | qtbase-9cc040a806fd2e6f1458e801a99311168d594c77.tar.gz |
Prepare for deprecating the QDesktopWidget
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.
Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()
Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/manual/dialogs')
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.cpp | 3 |
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 |