summaryrefslogtreecommitdiff
path: root/src/findbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/findbar.cpp')
-rw-r--r--src/findbar.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/findbar.cpp b/src/findbar.cpp
index 5d88dc1b..b3b80fac 100644
--- a/src/findbar.cpp
+++ b/src/findbar.cpp
@@ -75,6 +75,7 @@ FindBar::FindBar(QWidget *parent)
// hide timer
connect(m_hideTimer, SIGNAL(timeout()), this, SLOT(hide()));
+ m_hideTimer->setSingleShot(true);
// label
QLabel *label = new QLabel(i18n("Find:"));
@@ -143,6 +144,7 @@ void FindBar::show()
// show findbar if not visible
if (isHidden())
{
+ emit visibilityChanged(true);
QWidget::show();
emit searchString(m_lineEdit->text());
}
@@ -182,19 +184,13 @@ void FindBar::notifyMatch(bool match)
void FindBar::hide()
{
m_hideTimer->stop();
+ emit visibilityChanged(false);
QWidget::hide();
emit(searchString(m_lineEdit->text()));
}
-void FindBar::setVisible(bool visible)
-{
- emit visibilityChanged(visible);
- QWidget::setVisible(visible);
-}
-
-
void FindBar::toggleVisibility()
{
- setVisible(!isVisible());
+ isVisible() ? hide() : show();
}