summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-06 17:09:27 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-06 17:09:27 (GMT)
commit7ee944a14582cd7202b4a8e94adc06e7ae5855a6 (patch)
tree0684ab4a4e02dc72c2e1f5bc72baaf55f0d0310f /src/gui/widgets/qmenu.cpp
parentcd58bc13a4a37543d76a79b3cee7cd95bde0a14b (diff)
parent12d14efb2e1df3188c7c0001492f24fd193a11a9 (diff)
downloadQt-7ee944a14582cd7202b4a8e94adc06e7ae5855a6.zip
Qt-7ee944a14582cd7202b4a8e94adc06e7ae5855a6.tar.gz
Qt-7ee944a14582cd7202b4a8e94adc06e7ae5855a6.tar.bz2
Merge commit 'origin/4.6' into 4.6
Conflicts: dist/changes-4.6.0
Diffstat (limited to 'src/gui/widgets/qmenu.cpp')
-rw-r--r--src/gui/widgets/qmenu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index e78c1b4..cc39b7f 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1878,9 +1878,11 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
if(snapToMouse) //position flowing left from the mouse
pos.setX(mouse.x()-size.width());
+#ifndef QT_NO_MENUBAR
//if in a menubar, it should be right-aligned
if (qobject_cast<QMenuBar*>(d->causedPopup.widget))
pos.rx() -= size.width();
+#endif //QT_NO_MENUBAR
if (pos.x() < screen.left()+desktopFrame)
pos.setX(qMax(p.x(), screen.left()+desktopFrame));