┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Fieroni <[email protected]>2017-01-01 21:47:10 +0200
committerAnthony Fieroni <[email protected]>2017-01-01 21:47:10 +0200
commitc456c5d528f470ce782a90646eae52951c0f31b9 (patch)
tree6d2634ebf0b5ce0ad8f05c7e2a6d929dce147362
parent586368dbfc900b172069b45a6a7db301ab3c009a (diff)
[DolphinSearchBox] Stop search timer on hide
REVIEW: 129705 Signed-off-by: Anthony Fieroni <[email protected]>
-rw-r--r--src/search/dolphinsearchbox.cpp7
-rw-r--r--src/search/dolphinsearchbox.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index 26ddd27f8..60a4a7567 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -206,6 +206,13 @@ void DolphinSearchBox::showEvent(QShowEvent* event)
}
}
+void DolphinSearchBox::hideEvent(QHideEvent* event)
+{
+ Q_UNUSED(event);
+ m_startedSearching = false;
+ m_startSearchTimer->stop();
+}
+
void DolphinSearchBox::keyReleaseEvent(QKeyEvent* event)
{
QWidget::keyReleaseEvent(event);
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h
index a80617476..b747679ec 100644
--- a/src/search/dolphinsearchbox.h
+++ b/src/search/dolphinsearchbox.h
@@ -100,6 +100,7 @@ public:
protected:
virtual bool event(QEvent* event) Q_DECL_OVERRIDE;
virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
+ virtual void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
virtual void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE;