Skip to content
Snippets Groups Projects
Commit dddb965f authored by con's avatar con
Browse files

Locator text was no longer selected when using shortcut.


Reviewed-by: default avatardt <qtc-committer@nokia.com>
parent 2d84ccf5
No related branches found
No related tags found
No related merge requests found
......@@ -345,6 +345,8 @@ bool QuickOpenToolWindow::eventFilter(QObject *obj, QEvent *event)
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusOut) {
m_completionList->hide();
} else if (obj == m_fileLineEdit && event->type() == QEvent::FocusIn) {
if (static_cast<QFocusEvent*>(event)->reason() != Qt::MouseFocusReason)
m_fileLineEdit->selectAll();
updateCompletionList(m_fileLineEdit->typedText());
showCompletionList();
} else if (obj == this && event->type() == QEvent::ShortcutOverride) {
......@@ -470,15 +472,6 @@ void QuickOpenToolWindow::filterSelected()
m_fileLineEdit->setFocus();
}
void QuickOpenToolWindow::focusInEvent(QFocusEvent *e)
{
m_fileLineEdit->setFocus(e->reason());
if (e->reason() != Qt::MouseFocusReason) {
m_fileLineEdit->selectAll();
}
QWidget::focusInEvent(e);
}
void QuickOpenToolWindow::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
......
......@@ -76,7 +76,6 @@ private:
bool eventFilter(QObject *obj, QEvent *event);
void showEvent(QShowEvent *e);
void focusInEvent(QFocusEvent *e);
bool isShowingTypeHereMessage() const;
void showCompletionList();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment