summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-20 19:31:18 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-20 19:31:19 +0200
commit36c025a8d66b244b6017746b415881ef1814b1e2 (patch)
tree419c55a80f161e3882a3060cbcf0762d7a151841 /src/widgets/kernel/qapplication.cpp
parentd55f2b1fb9c910bc118f75967a0e6273f8aa98d1 (diff)
parent8e8bd90e4445415df7b7f516444e594d3e678c1a (diff)
Merge 5.7 into 5.7.0
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 936da0414c..86b3282124 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2251,10 +2251,10 @@ void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous)
QApplication::setActiveWindow(tlw);
// QTBUG-37126, Active X controls may set the focus on native child widgets.
if (wnd && tlw && wnd != tlw->windowHandle()) {
- if (QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(wnd)) {
- if (widgetWindow->widget()->inherits("QAxHostWidget"))
- widgetWindow->widget()->setFocus(Qt::ActiveWindowFocusReason);
- }
+ if (QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(wnd))
+ if (QWidget *widget = widgetWindow->widget())
+ if (widget->inherits("QAxHostWidget"))
+ widget->setFocus(Qt::ActiveWindowFocusReason);
}
}