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 <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
|
||||
|
Loading…
Reference in New Issue
Block a user