Fix QTreeView header re-ordering bug on Mac OS.
authorChris Meyer <cmeyer1969@gmail.com>
Thu, 7 Jun 2012 14:42:43 +0000 (16:42 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 12 Jun 2012 09:16:49 +0000 (11:16 +0200)
commit4591f67e917c4a0ecfbb99c7e37d3ebbf4280c9c
tree1d4d5fea6739bed1c69bb39e0e96373489f4d087
parent32bc019ac1292a0dafabd1d2d2430b44501cbda1
Fix QTreeView header re-ordering bug on Mac OS.

This is a cherry-pick of 0ba850c7a2dbccb8dd6aa1664679bda6cce95065

When the mouse button is released at the end of a drag, Cocoa
may simulate an extra mouse moved event. However, the state of
the buttons when this event is generated is already 'no button'.
This leads to some failsafe code canceling out of the drag state
and when the actual mouse release event is finally processed, the
header drag state has already been exited and the header drag
fails.

This patch disables the failsafe code on Cocoa and makes header
dragging work when the mouse goes outside the bounds of the header
view.

Task-number: QTBUG-14179
Change-Id: Ia9fd1ac79f9e7b4b90d3e160298c53d65fb171d3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/widgets/itemviews/qheaderview.cpp