summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-10-12 14:41:52 +0300
committerQt by Nokia <qt-info@nokia.com>2011-10-13 08:05:48 +0200
commit75246bbda70e79639c798841bd967fc913874c90 (patch)
treea26abb224a3a60f29f912f806968047a7447e99a
parent2b58e3db352424a597943a04a171bd9e46c6a718 (diff)
Migrate the touchscreen generic qpa plugin to QWindow.
This plugin was still using QApplication and QDesktopWidget. The code is now migrated to QGuiApplication, QWindow, and QScreen. Change-Id: I22a7e15982efea16cbf560d09c8831cd82ed29d0 Reviewed-on: http://codereview.qt-project.org/6528 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
-rw-r--r--src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
index cd11f44bed..341d38773b 100644
--- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
+++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
@@ -40,8 +40,9 @@
****************************************************************************/
#include "qtoucheventsenderqpa.h"
-#include <QApplication>
-#include <QDesktopWidget>
+#include <QGuiApplication>
+#include <QScreen>
+#include <QStringList>
#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -66,12 +67,12 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state,
{
QRect winRect;
if (m_forceToActiveWindow) {
- QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on
+ QWindow *win = QGuiApplication::activeWindow();
if (!win)
return;
winRect = win->geometry();
} else {
- winRect = QApplication::desktop()->screenGeometry();
+ winRect = QGuiApplication::primaryScreen()->geometry();
}
#ifdef POINT_DEBUG