From 3a851daf2cf5449b5355bd3a47b39c1582e4bb54 Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Mon, 22 Jun 2009 10:53:21 +0200
Subject: [PATCH] Activating Locator when already in the locator window didn't
 work.

For example when you typed Ctrl+l and find that you don't want to use
the goto line filter after all.
---
 src/plugins/quickopen/quickopenplugin.cpp     | 2 +-
 src/plugins/quickopen/quickopentoolwindow.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/plugins/quickopen/quickopenplugin.cpp b/src/plugins/quickopen/quickopenplugin.cpp
index fcbd194bdab..b3f17669a5d 100644
--- a/src/plugins/quickopen/quickopenplugin.cpp
+++ b/src/plugins/quickopen/quickopenplugin.cpp
@@ -129,7 +129,7 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *)
 
 void QuickOpenPlugin::openQuickOpen()
 {
-    m_quickOpenToolWindow->setFocus();
+    m_quickOpenToolWindow->show("");
 }
 
 void QuickOpenPlugin::extensionsInitialized()
diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp
index 7c530473904..86d46769dff 100644
--- a/src/plugins/quickopen/quickopentoolwindow.cpp
+++ b/src/plugins/quickopen/quickopentoolwindow.cpp
@@ -438,7 +438,8 @@ void QuickOpenToolWindow::acceptCurrentEntry()
 void QuickOpenToolWindow::show(const QString &text, int selectionStart, int selectionLength)
 {
     m_fileLineEdit->hideHintText();
-    m_fileLineEdit->setText(text);
+    if (!text.isEmpty())
+        m_fileLineEdit->setText(text);
     if (!m_fileLineEdit->hasFocus())
         m_fileLineEdit->setFocus();
     else
@@ -447,7 +448,7 @@ void QuickOpenToolWindow::show(const QString &text, int selectionStart, int sele
     if (selectionStart >= 0)
         m_fileLineEdit->setSelection(selectionStart, selectionLength);
     else
-        m_fileLineEdit->deselect();
+        m_fileLineEdit->selectAll();
 }
 
 void QuickOpenToolWindow::filterSelected()
-- 
GitLab