┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-02-04 22:13:50 +0100
committerPeter Penz <[email protected]>2011-02-04 22:13:50 +0100
commit17d217b862ec21668632576fd9df86d3a0cd5813 (patch)
treeaf7c6b862096d5e6c8ea08315e3df58a17065e42 /src/search
parent236eac2ffa671fe9cd56c233925a19d8c89f1141 (diff)
Add unittest for DolphinSearchBox
A minor API cleanup in DolphinSearchBox has been done related to the test.
Diffstat (limited to 'src/search')
-rw-r--r--src/search/dolphinsearchbox.cpp10
-rw-r--r--src/search/dolphinsearchbox.h8
2 files changed, 11 insertions, 7 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index f4588f67f..c7d08ff1f 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -73,6 +73,11 @@ DolphinSearchBox::~DolphinSearchBox()
saveSettings();
}
+void DolphinSearchBox::setText(const QString& text)
+{
+ m_searchInput->setText(text);
+}
+
QString DolphinSearchBox::text() const
{
return m_searchInput->text();
@@ -141,11 +146,6 @@ void DolphinSearchBox::selectAll()
m_searchInput->selectAll();
}
-void DolphinSearchBox::clearText()
-{
- m_searchInput->clear();
-}
-
bool DolphinSearchBox::event(QEvent* event)
{
if (event->type() == QEvent::Polish) {
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h
index 3e4648048..07fda5c29 100644
--- a/src/search/dolphinsearchbox.h
+++ b/src/search/dolphinsearchbox.h
@@ -49,6 +49,12 @@ public:
virtual ~DolphinSearchBox();
/**
+ * Sets the text that should be used as input for
+ * searching.
+ */
+ void setText(const QString& text);
+
+ /**
* Returns the text that should be used as input
* for searching.
*/
@@ -69,8 +75,6 @@ public:
*/
void selectAll();
- void clearText();
-
protected:
virtual bool event(QEvent* event);
virtual void showEvent(QShowEvent* event);