From 75246bbda70e79639c798841bd967fc913874c90 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 12 Oct 2011 14:41:52 +0300 Subject: 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 --- src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/plugins') 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 -#include +#include +#include +#include #include 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 -- cgit v1.2.3