Propagate synthesized mouse events in parallel (lock-step) with touch
authorKevin Ottens <kevin.ottens.qnx@kdab.com>
Tue, 17 Jul 2012 15:18:25 +0000 (17:18 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Jul 2012 08:46:24 +0000 (10:46 +0200)
commit7808ec795c5831d56dae9c4f9f7e1306489864aa
tree1e1aaf184be8e83423ac168704818cc811aa687c
parent349f16b03cb75c5284022f957c122446ebfc0b79
Propagate synthesized mouse events in parallel (lock-step) with touch

This patch implement the equivalent of
468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for
QtWidgets.

If a widget doesn't accept a touch event, then QApplication gives it
another try by synthesizing a corresponding mouse event. This way
QtQuick and QtWidget behave in a similar way, removing the need for
platform backends to try to emulate a mouse event from a touch event
unconditionally.

Also add relevant unit tests and adjust old QApplication ones.

Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/kernel/qapplication.cpp
src/widgets/kernel/qapplication_p.h
tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp