From 236eac2ffa671fe9cd56c233925a19d8c89f1141 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 4 Feb 2011 20:55:52 +0100 Subject: Don't clear the search-text when switching between tabs The clearing of the search-text should only be done when opening the search-box. --- src/search/dolphinsearchbox.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/search/dolphinsearchbox.cpp') diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 68dc9da3c..f4588f67f 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -56,7 +56,6 @@ DolphinSearchBox::DolphinSearchBox(QWidget* parent) : QWidget(parent), m_startedSearching(false), - m_nepomukActivated(false), m_topLayout(0), m_searchInput(0), m_fileNameButton(0), @@ -142,6 +141,11 @@ void DolphinSearchBox::selectAll() m_searchInput->selectAll(); } +void DolphinSearchBox::clearText() +{ + m_searchInput->clear(); +} + bool DolphinSearchBox::event(QEvent* event) { if (event->type() == QEvent::Polish) { @@ -153,11 +157,6 @@ bool DolphinSearchBox::event(QEvent* event) void DolphinSearchBox::showEvent(QShowEvent* event) { if (!event->spontaneous()) { -#ifdef HAVE_NEPOMUK - m_nepomukActivated = (Nepomuk::ResourceManager::instance()->init() == 0); -#endif - - m_searchInput->clear(); m_searchInput->setFocus(); m_startedSearching = false; } -- cgit v1.3