Commit fc521035 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Tobias Hunger
Browse files

Locator: Simplify condition



a || (!a && b) === a || b

Change-Id: I3d3b602fa496a7d5a1f57a95ebedf30748429850
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 672fc59f
...@@ -398,8 +398,7 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event) ...@@ -398,8 +398,7 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event)
} }
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) { } else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) {
QFocusEvent *fev = static_cast<QFocusEvent *>(event); QFocusEvent *fev = static_cast<QFocusEvent *>(event);
if (fev->reason() != Qt::ActiveWindowFocusReason if (fev->reason() != Qt::ActiveWindowFocusReason || !m_completionList->isActiveWindow()) {
|| (fev->reason() == Qt::ActiveWindowFocusReason && !m_completionList->isActiveWindow())) {
m_completionList->hide(); m_completionList->hide();
m_fileLineEdit->clearFocus(); m_fileLineEdit->clearFocus();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment