summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface_p.h
diff options
context:
space:
mode:
authorJon Severinsson <jon@severinsson.net>2012-10-23 18:52:29 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-04 13:20:06 +0100
commitcf2a75e41bc6715958d170d42f37fc6bb609f830 (patch)
tree062ded398ef240b048961d271fe8e74bf5e72eec /src/gui/kernel/qwindowsysteminterface_p.h
parentf415d86d1e88410d22607729ec7f5485a70fc2ad (diff)
Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()
Previous commit b2363a935c8dac fixed keyboardModifiers() after QPA event processing, but broke QTestLib, which expects spontaneous input events sent to qApp->notify() to update keyboardModifiers() and mouseButtons(). The commit also did not fix mouseButtons() after QPA event processing, and missed keyboardModifiers() after QPA Tablet event processing. This commit fixes all these shortcommings in b2363a935c8dac. Includes test case by David Faure <faure@kde.org> Task-Number: QTBUG-26887 Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index e8d2a85dd9..dfdf7e9e93 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -302,10 +302,10 @@ public:
TabletEvent(QWindow *w, ulong time, bool down, const QPointF &local, const QPointF &global,
int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tpressure,
qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers mods)
- : InputEvent(w, time, Tablet, Qt::NoModifier),
+ : InputEvent(w, time, Tablet, mods),
down(down), local(local), global(global), device(device), pointerType(pointerType),
pressure(pressure), xTilt(xTilt), yTilt(yTilt), tangentialPressure(tpressure),
- rotation(rotation), z(z), uid(uid), mods(mods) { }
+ rotation(rotation), z(z), uid(uid) { }
bool down;
QPointF local;
QPointF global;
@@ -318,7 +318,6 @@ public:
qreal rotation;
int z;
qint64 uid;
- Qt::KeyboardModifiers mods;
};
class TabletEnterProximityEvent : public InputEvent {