forked from qt-creator/qt-creator
Locator: Simplify condition
a || (!a && b) === a || b Change-Id: I3d3b602fa496a7d5a1f57a95ebedf30748429850 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
672fc59fd6
commit
fc52103524
@@ -398,8 +398,7 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) {
|
||||
QFocusEvent *fev = static_cast<QFocusEvent *>(event);
|
||||
if (fev->reason() != Qt::ActiveWindowFocusReason
|
||||
|| (fev->reason() == Qt::ActiveWindowFocusReason && !m_completionList->isActiveWindow())) {
|
||||
if (fev->reason() != Qt::ActiveWindowFocusReason || !m_completionList->isActiveWindow()) {
|
||||
m_completionList->hide();
|
||||
m_fileLineEdit->clearFocus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user