Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()
authorJon Severinsson <jon@severinsson.net>
Tue, 23 Oct 2012 16:52:29 +0000 (18:52 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 4 Jan 2013 12:20:06 +0000 (13:20 +0100)
commitcf2a75e41bc6715958d170d42f37fc6bb609f830
tree062ded398ef240b048961d271fe8e74bf5e72eec
parentf415d86d1e88410d22607729ec7f5485a70fc2ad
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>
src/gui/kernel/qguiapplication.cpp
src/gui/kernel/qwindowsysteminterface_p.h
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp