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 /examples/xml/streambookmarks | |
parent | 92b9dcfe2ba602fc396a4806597b9440ed63bded (diff) |
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 'examples/xml/streambookmarks')
-rw-r--r-- | examples/xml/streambookmarks/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp index c9a18fa3c4..d0e7bf30c9 100644 --- a/examples/xml/streambookmarks/mainwindow.cpp +++ b/examples/xml/streambookmarks/mainwindow.cpp @@ -75,7 +75,7 @@ MainWindow::MainWindow() statusBar()->showMessage(tr("Ready")); setWindowTitle(tr("QXmlStream Bookmarks")); - const QSize availableSize = QApplication::desktop()->availableGeometry(this).size(); + const QSize availableSize = screen()->availableGeometry().size(); resize(availableSize.width() / 2, availableSize.height() / 3); } //! [0] |