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>
This commit is contained in:
Laszlo Agocs 2011-10-12 14:41:52 +03:00 committed by Qt by Nokia
parent 2b58e3db35
commit 75246bbda7

View File

@ -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