]> cloud.milkyroute.net Git - dolphin.git/commitdiff
don't clear the filterbar when switching between tabs
authorPeter Penz <peter.penz19@gmail.com>
Tue, 2 Sep 2008 20:01:50 +0000 (20:01 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 2 Sep 2008 20:01:50 +0000 (20:01 +0000)
BUG: 169878

svn path=/trunk/KDE/kdebase/apps/; revision=856411

src/dolphinviewcontainer.cpp
src/filterbar.cpp
src/filterbar.h

index 4ff9ab0e474107adebbf0a6805baee7349c9264d..cccce3fadbfb1ea0a4934ded79c129905733aca8 100644 (file)
@@ -279,6 +279,7 @@ void DolphinViewContainer::showOperationCompletedMessage(const QString& msg)
 void DolphinViewContainer::closeFilterBar()
 {
     m_filterBar->hide();
+    m_filterBar->clear();
     emit showFilterBarChanged(false);
 }
 
index 080dd423fb97060034c3bb2aa8c7349935cd1732..36a6d5271a83c59af1d08266672b22d2c3b28c75 100644 (file)
@@ -66,12 +66,9 @@ FilterBar::~FilterBar()
 {
 }
 
-void FilterBar::hideEvent(QHideEvent* event)
+void FilterBar::clear()
 {
-    if (!event->spontaneous()) {
-        m_filterInput->clear();
-        m_filterInput->clearFocus();
-    }
+    m_filterInput->clear();
 }
 
 void FilterBar::showEvent(QShowEvent* event)
index db5d49f89e8ef18c22607679712cfa9571c8b4b0..ef5711fc29c45b6fb0ffd514a73a4524cdc98fdb 100644 (file)
@@ -39,7 +39,10 @@ class FilterBar : public QWidget
 public:
     FilterBar(QWidget* parent = 0);
     virtual ~FilterBar();
-
+    
+    /** Clears the the input field. */
+    void clear();
+    
 signals:
     /**
      * Signal that reports the name filter has been
@@ -53,7 +56,6 @@ signals:
     void closeRequest();
 
 protected:
-    virtual void hideEvent(QHideEvent* event);
     virtual void showEvent(QShowEvent* event);
     virtual void keyReleaseEvent(QKeyEvent* event);