diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2009-11-06 10:43:44 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-11-06 12:17:01 (GMT) |
commit | 7713d95161bf986bb9dbd3e7a9033ce2e29b7213 (patch) | |
tree | dda90ba2340aaa957131272a8af7b0a2025e3e9d /src/gui/widgets | |
parent | 628a0d9d54f50a9e75cb8f26e4927231a2130e84 (diff) | |
download | Qt-7713d95161bf986bb9dbd3e7a9033ce2e29b7213.zip Qt-7713d95161bf986bb9dbd3e7a9033ce2e29b7213.tar.gz Qt-7713d95161bf986bb9dbd3e7a9033ce2e29b7213.tar.bz2 |
Fix QT_NO_MENUBAR
Reviewed-by: tom
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qmenu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 1b5d1cd..c567955 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)); |