diff options
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 6 | ||||
| -rw-r--r-- | src/search/dolphinsearchbox.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 71c227501..bcee7e9af 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -134,6 +134,11 @@ KUrl DolphinSearchBox::urlForSearching() const return url; } +void DolphinSearchBox::selectAll() +{ + m_searchInput->selectAll(); +} + bool DolphinSearchBox::event(QEvent* event) { if (event->type() == QEvent::Polish) { @@ -243,6 +248,7 @@ void DolphinSearchBox::init() m_searchInput = new KLineEdit(this); m_searchInput->setClearButtonShown(true); m_searchInput->setFont(KGlobalSettings::generalFont()); + setFocusProxy(m_searchInput); connect(m_searchInput, SIGNAL(returnPressed(QString)), this, SLOT(slotReturnPressed(QString))); connect(m_searchInput, SIGNAL(textChanged(QString)), diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index cbe164502..5fc707e91 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -64,6 +64,11 @@ public: /** @return URL that will start the searching of files. */ KUrl urlForSearching() const; + /** + * Selects the whole text of the search box. + */ + void selectAll(); + protected: virtual bool event(QEvent* event); virtual void showEvent(QShowEvent* event); |
