summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmainwindow.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-02-11 12:00:44 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-02-11 12:00:44 (GMT)
commit86372d8d9bf081b2a1ab2df7942f41309b1842fa (patch)
treef9faafe776674bd919c319b05a2ff59439e9c608 /src/gui/widgets/qmainwindow.cpp
parentf11b682818e0d6fbd9cc75ee59b51bc6d6723c19 (diff)
parent892d4b5e6e9495e29c4df40383e883fc19aa0baa (diff)
downloadQt-86372d8d9bf081b2a1ab2df7942f41309b1842fa.zip
Qt-86372d8d9bf081b2a1ab2df7942f41309b1842fa.tar.gz
Qt-86372d8d9bf081b2a1ab2df7942f41309b1842fa.tar.bz2
Merge remote branch 'origin/master' into master-mobility
Conflicts: tests/auto/qlineedit/tst_qlineedit.cpp
Diffstat (limited to 'src/gui/widgets/qmainwindow.cpp')
-rw-r--r--src/gui/widgets/qmainwindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 269cd12..a63f3bf 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1393,6 +1393,7 @@ bool QMainWindow::event(QEvent *event)
#endif // QT_NO_STATUSTIP
case QEvent::StyleChange:
+ d->layout->layoutState.dockAreaLayout.styleChangedEvent();
if (!d->explicitIconSize)
setIconSize(QSize());
break;
@@ -1554,11 +1555,15 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
#ifndef QT_NO_MENU
QMenu *popup = createPopupMenu();
- if (popup && !popup->isEmpty()) {
- popup->exec(event->globalPos());
- event->accept();
+ if (popup) {
+ if (!popup->isEmpty()) {
+ popup->setAttribute(Qt::WA_DeleteOnClose);
+ popup->popup(event->globalPos());
+ event->accept();
+ } else {
+ delete popup;
+ }
}
- delete popup;
#endif
}
#endif // QT_NO_CONTEXTMENU