summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2013-08-26 17:54:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-28 00:59:40 +0200
commit198d2f6d3e1f622e1f168ff7e6aea7d1f05b80ed (patch)
treede358ea37cea8fa3b826dad8f463f96c044e7de8 /src
parentb7f7edfae4d5dc7e7547c3377c73129a9c6fdae0 (diff)
Activate Qt::WidgetWithChildrenShortcut shortcuts in MDI subwindows
If a MDI subwindow is focused and an ancestor has a QShortCut set with the Qt::WidgetWithChildrenShortcut flag, it should trigger, as MDI subwindows are not top-level widgets. Task-number: QTBUG-32788 Change-Id: I7ec76d493b827ae6678209a56015ab6b432c1ed9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qshortcut.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 471b054a99..678e6f25d1 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -158,7 +158,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge
if (context == Qt::WidgetWithChildrenShortcut) {
const QWidget *tw = QApplication::focusWidget();
- while (tw && tw != w && (tw->windowType() == Qt::Widget || tw->windowType() == Qt::Popup))
+ while (tw && tw != w && (tw->windowType() == Qt::Widget || tw->windowType() == Qt::Popup || tw->windowType() == Qt::SubWindow))
tw = tw->parentWidget();
return tw == w;
}