QMenu: Do not set snapToMouse if a caused-widget exists.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Tue, 11 Dec 2012 12:47:26 +0000 (13:47 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 19 Dec 2012 13:33:17 +0000 (14:33 +0100)
commit0a24cec5a11678ebefe08b331812adbb9b3368aa
tree15c0161167424190cb42d89ebdc899733f159835
parent99288633373ecc8ba808cf0ecf18f4a81d62ac84
QMenu: Do not set snapToMouse if a caused-widget exists.

When clicking at the bottom-right corner of a menu in a menu
bar, it appears at the wrong position. Add test and stabilize
RTL-tests by making sure the layout direction is cleared should
they fail.

Task-number: QTBUG-28031
Task-number: QTBUG-2596
Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qtbase/bf178c77dda1db56ae698c1d31a6e3f685f4830f)
src/gui/widgets/qmenu.cpp
tests/auto/qmenubar/tst_qmenubar.cpp