Store the primary status in the touch point flags.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Wed, 30 Nov 2011 17:19:27 +0000 (19:19 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Dec 2011 11:28:29 +0000 (12:28 +0100)
commit6f1c4fb342dd94b21df8f5c2bbdfa4b9f5a09c4e
tree7d1caeed412eb527cf12e68ecde2b992c4678113
parent67be01ae5048138e894fa8d3eb0abe93c5699048
Store the primary status in the touch point flags.

For some reason the primary bit has previously been encoded in the
touch point state, even though it has nothing to do with the regular
states like Pressed, Released, etc.

The value is now stored in the recently introduced flags member of the
touch points. This also reduces the need for error-prone internal
masking of the state value.

The structure used by QWindowSystemInterface::handleTouchEvent also
becomes cleaner because the primary status can now be set in the flags
member and the isPrimary bool can be dropped.

Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 files changed:
src/corelib/global/qnamespace.h
src/gui/kernel/qevent.cpp
src/gui/kernel/qevent.h
src/gui/kernel/qguiapplication.cpp
src/gui/kernel/qwindowsysteminterface_qpa.cpp
src/gui/kernel/qwindowsysteminterface_qpa.h
src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp
src/plugins/generic/touchscreen/qtouchscreen.cpp
src/plugins/platforms/cocoa/qmultitouch_mac.mm
src/plugins/platforms/windows/qwindowsmousehandler.cpp
src/plugins/platforms/xcb/qxcbconnection_maemo.cpp
src/testlib/qtesttouch.h
src/widgets/kernel/qapplication.cpp