diff widgets/LayerTreeDialog.cpp @ 1478:d39db4673676 by-id

Fix a number of Qt deprecation warnings
author Chris Cannam
date Wed, 03 Jul 2019 08:55:02 +0100
parents bf9ef624aadf
children
line wrap: on
line diff
--- a/widgets/LayerTreeDialog.cpp	Tue Jul 02 19:05:45 2019 +0100
+++ b/widgets/LayerTreeDialog.cpp	Wed Jul 03 08:55:02 2019 +0100
@@ -25,7 +25,7 @@
 #include <QDialogButtonBox>
 #include <QHeaderView>
 #include <QApplication>
-#include <QDesktopWidget>
+#include <QScreen>
 
 LayerTreeDialog::LayerTreeDialog(PaneStack *stack, QWidget *parent) :
     QDialog(parent),
@@ -89,8 +89,8 @@
     grid->addWidget(bb, 2, 0);
     grid->setRowStretch(2, 0);
     
-    QDesktopWidget *desktop = QApplication::desktop();
-    QRect available = desktop->availableGeometry();
+    QScreen *screen = QGuiApplication::primaryScreen();
+    QRect available = screen->availableGeometry();
 
     int width = available.width() / 2;
     int height = available.height() / 3;