Migrate QWindowSystemInterface to use QElapsedTimer
Change-Id: I7dfb0590dce79678d49f5d6ef8f60758719bcf72 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
12c8909883
commit
6a0f84e0a8
@ -696,6 +696,8 @@ void QGuiApplicationPrivate::init()
|
||||
// trigger registering of QVariant's GUI types
|
||||
qRegisterGuiVariant();
|
||||
|
||||
QWindowSystemInterfacePrivate::eventTime.start();
|
||||
|
||||
is_app_running = true;
|
||||
init_plugins(pluginList);
|
||||
QWindowSystemInterface::sendWindowSystemEvents(QCoreApplicationPrivate::eventDispatcher, QEventLoop::AllEvents);
|
||||
|
@ -49,7 +49,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
QTime QWindowSystemInterfacePrivate::eventTime;
|
||||
QElapsedTimer QWindowSystemInterfacePrivate::eventTime;
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
@ -266,10 +266,6 @@ void QWindowSystemInterfacePrivate::queueWindowSystemEvent(QWindowSystemInterfac
|
||||
windowSystemEventQueue.append(ev);
|
||||
queueMutex.unlock();
|
||||
|
||||
// Make sure the event timer is started.
|
||||
if (!QWindowSystemInterfacePrivate::eventTime.isValid())
|
||||
QWindowSystemInterfacePrivate::eventTime.start();
|
||||
|
||||
QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher();
|
||||
if (dispatcher)
|
||||
dispatcher->wakeUp();
|
||||
|
@ -42,6 +42,7 @@
|
||||
#define QWINDOWSYSTEMINTERFACE_QPA_P_H
|
||||
|
||||
#include "qwindowsysteminterface_qpa.h"
|
||||
#include <QElapsedTimer>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
@ -272,7 +273,7 @@ public:
|
||||
static WindowSystemEvent * getWindowSystemEvent();
|
||||
static void queueWindowSystemEvent(WindowSystemEvent *ev);
|
||||
|
||||
static QTime eventTime;
|
||||
static QElapsedTimer eventTime;
|
||||
|
||||
static QList<QTouchEvent::TouchPoint> convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user