Allow external windows to define contexts for Qt Creator.

Task-number: QTCREATORBUG-5070

Change-Id: Ia466b73eb37bb8aef6f71ab8f1d990b40b43cac3
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2012-10-23 15:59:37 +02:00
parent 6a337561c5
commit 2118d542e6

View File

@@ -1122,9 +1122,8 @@ void MainWindow::updateFocusWidget(QWidget *old, QWidget *now)
return;
IContext *newContext = 0;
if (focusWidget()) {
if (QWidget *p = qApp->focusWidget()) {
IContext *context = 0;
QWidget *p = focusWidget();
while (p) {
context = m_contextWidgets.value(p);
if (context) {