summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-19 13:58:24 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-20 08:26:52 +0200
commit55b91dc4714d36d457fbfa32bc6b412415362430 (patch)
tree743eecbb2dd41f98fb9ecd0f4d29eea023524960 /src
parent463299b8c9b8f2ce28126aa8180f7103112d1947 (diff)
Fix deprecated/removed code
- Port away from QDesktopWidget - Use QFontMetrics::horizontalAdvance() instead of width() Pick-to: 5.15 Change-Id: I5d721fa574356a27e414545d6b9b2d28d400080b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/container/qaxselect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index 30af521..e2642aa 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -57,7 +57,7 @@
#include <QtCore/qitemselectionmodel.h>
#include <QtCore/qsysinfo.h>
#include <QtCore/qtextstream.h>
-#include <QtWidgets/qdesktopwidget.h>
+#include <QtGui/qscreen.h>
#include <QtWidgets/qpushbutton.h>
#include <qt_windows.h>
@@ -362,7 +362,7 @@ QAxSelect::QAxSelect(QWidget *parent, Qt::WindowFlags flags)
d->selectUi.setupUi(this);
d->setOkButtonEnabled(false);
- const QRect availableGeometry = QApplication::desktop()->availableGeometry(this);
+ const QRect availableGeometry = screen()->availableGeometry();
resize(availableGeometry.width() / 4, availableGeometry.height() * 2 / 3);
#ifndef QT_NO_CURSOR