summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/deform
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-24 17:24:16 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-27 16:50:05 +0000
commitacc629c1e82d19a4153bf2db821f2a34fb1e94a3 (patch)
treeaa37617fc4442b9653d34ba77a367a23383936bc /examples/widgets/painting/deform
parent10db31f933f696b2e61dde640f09c57989617011 (diff)
Examples: replace QDesktopWidget::availableGeometry()/screenGeometry()
QDesktopWidget::availableGeometry()/screenGeometry() was deprecated in 5.11 and replaced with QScreen::availableGeometry()/screenGeometry() Change-Id: I912a133971c41196f8f49754c28ce92711ff42bb Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/painting/deform')
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp
index 490a8508d6..cfbbdb7e8e 100644
--- a/examples/widgets/painting/deform/pathdeform.cpp
+++ b/examples/widgets/painting/deform/pathdeform.cpp
@@ -50,7 +50,8 @@
#include "pathdeform.h"
-#include <QApplication>
+#include <QGuiApplication>
+#include <QScreen>
#include <QtDebug>
#include <QMouseEvent>
#include <QTimerEvent>
@@ -247,7 +248,7 @@ void PathDeformControls::layoutForSmallScreen()
deformSlider->setValue(80);
fontSizeSlider->setValue(120);
- QRect screen_size = QApplication::desktop()->screenGeometry();
+ QRect screen_size = QGuiApplication::primaryScreen()->geometry();
radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5);
m_renderer->setText(tr("Qt"));
@@ -277,7 +278,7 @@ PathDeformWidget::PathDeformWidget(QWidget *parent, bool smallScreen)
connect(m_renderer, SIGNAL(clicked()), this, SLOT(showControls()));
connect(m_controls, SIGNAL(okPressed()), this, SLOT(hideControls()));
- connect(m_controls, SIGNAL(quitPressed()), QApplication::instance(), SLOT(quit()));
+ connect(m_controls, SIGNAL(quitPressed()), QCoreApplication::instance(), SLOT(quit()));
}