diff options
| author | Peter Penz <[email protected]> | 2010-12-19 12:03:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-12-19 12:03:46 +0000 |
| commit | 342954bb1fdc59fde0a95f2ba97b7e7712cfb47d (patch) | |
| tree | 71edb431764e5f58fa4ce8aec6925ffe70c1fc03 /src/search/dolphinsearchbox.cpp | |
| parent | 366db1568224186624cc61ac31b13c7dc28eed40 (diff) | |
Select the whole text in the filterbar and searchbox if the widget has lost the focus and gets focused again by the shortcut (this behavior is consistent to e.g. the behavior in Kate).
CCBUG: 256160
svn path=/trunk/KDE/kdebase/apps/; revision=1207719
Diffstat (limited to 'src/search/dolphinsearchbox.cpp')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 6 |
1 files changed, 6 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)), |
