Locator: Do not popup on focus in

* When a dialog initiated by the locator is closed
* When the main window loses focus

Task-number: QTCREATORBUG-9953
Change-Id: Iff923320e7f1cc9a633d3a6a9bee1fa49b41bb68
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-08-20 20:39:18 +03:00
committed by Orgad Shaneh
parent c2e90c360b
commit 7410e4bea6

View File

@@ -407,8 +407,10 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event)
!(fev->reason() == Qt::ActiveWindowFocusReason && !m_completionList->isActiveWindow()))
hideList = false;
}
if (hideList)
if (hideList) {
m_completionList->hide();
m_fileLineEdit->clearFocus();
}
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusIn) {
showPopupNow();
} else if (obj == this && event->type() == QEvent::ShortcutOverride) {
@@ -542,6 +544,7 @@ void LocatorWidget::acceptCurrentEntry()
return;
const FilterEntry entry = m_locatorModel->data(index, Qt::UserRole).value<FilterEntry>();
m_completionList->hide();
m_fileLineEdit->clearFocus();
entry.filter->accept(entry);
}