forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
c2e90c360b
commit
7410e4bea6
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user