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:
parent
2b58e3db35
commit
75246bbda7
@ -40,8 +40,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qtoucheventsenderqpa.h"
|
#include "qtoucheventsenderqpa.h"
|
||||||
#include <QApplication>
|
#include <QGuiApplication>
|
||||||
#include <QDesktopWidget>
|
#include <QScreen>
|
||||||
|
#include <QStringList>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -66,12 +67,12 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state,
|
|||||||
{
|
{
|
||||||
QRect winRect;
|
QRect winRect;
|
||||||
if (m_forceToActiveWindow) {
|
if (m_forceToActiveWindow) {
|
||||||
QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on
|
QWindow *win = QGuiApplication::activeWindow();
|
||||||
if (!win)
|
if (!win)
|
||||||
return;
|
return;
|
||||||
winRect = win->geometry();
|
winRect = win->geometry();
|
||||||
} else {
|
} else {
|
||||||
winRect = QApplication::desktop()->screenGeometry();
|
winRect = QGuiApplication::primaryScreen()->geometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POINT_DEBUG
|
#ifdef POINT_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user