Commit 3416ecc5 authored by Daniel Teske's avatar Daniel Teske
Browse files

Locator: Fix locator behavior with qt5



Task-number: QTCREATORBUG-10013

Change-Id: I2bf55cfa2fe1e11bac56cced765789566b659469
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent b8bd6723
......@@ -97,12 +97,9 @@ public:
QSize preferredSize() const { return m_preferredSize; }
void focusOutEvent (QFocusEvent * event) {
if (Utils::HostOsInfo::isWindowsHost()) {
if (event->reason() == Qt::ActiveWindowFocusReason)
hide();
} else {
QTreeView::focusOutEvent(event);
}
if (event->reason() == Qt::ActiveWindowFocusReason)
hide();
QTreeView::focusOutEvent(event);
}
void next() {
......@@ -400,14 +397,9 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event)
}
}
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) {
bool hideList = true;
if (Utils::HostOsInfo::isWindowsHost()) {
QFocusEvent *fev = static_cast<QFocusEvent*>(event);
if (fev->reason() == Qt::ActiveWindowFocusReason &&
!(fev->reason() == Qt::ActiveWindowFocusReason && !m_completionList->isActiveWindow()))
hideList = false;
}
if (hideList) {
QFocusEvent *fev = static_cast<QFocusEvent*>(event);
if (fev->reason() != Qt::ActiveWindowFocusReason
|| (fev->reason() == Qt::ActiveWindowFocusReason && !m_completionList->isActiveWindow())) {
m_completionList->hide();
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