summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2019-02-04 15:58:48 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2019-02-08 09:35:51 +0000
commit0f98e93d8168835a1eb0617bd8ca3988d6d83daa (patch)
tree992351401eb487ff81b4f94f92741101bf260379 /examples
parent03419dc1506e095885d16e02ca95d1e1ebcfc88a (diff)
Replace deprecated QDesktopWidget::screenGeometry usage in simplebrowser
Task-number: QTBUG-62094 Change-Id: I6e95c5347df6b9a0d6559830b12da1e30fce23fb Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
index 4351dfe7..5d00cd19 100644
--- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp
+++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
@@ -62,6 +62,7 @@
#include <QMenuBar>
#include <QMessageBox>
#include <QProgressBar>
+#include <QScreen>
#include <QStatusBar>
#include <QToolBar>
#include <QVBoxLayout>
@@ -143,7 +144,7 @@ BrowserWindow::BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool
QSize BrowserWindow::sizeHint() const
{
- QRect desktopRect = QApplication::desktop()->screenGeometry();
+ QRect desktopRect = QApplication::primaryScreen()->geometry();
QSize size = desktopRect.size() * qreal(0.9);
return size;
}