summaryrefslogtreecommitdiff
path: root/src/findbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-14 19:35:42 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-14 19:35:42 +0200
commitc265c4a38887b65243ec6c9537c9cc7b5b53df40 (patch)
treeba97808ed9610304ef4d4d5adbc1bf0161d60542 /src/findbar.cpp
parentMerge commit 'refs/merge-requests/168' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-c265c4a38887b65243ec6c9537c9cc7b5b53df40.tar.xz
Fixed focus regression.
As show slot calls setVisible(true) in QWidget code, we cannot override show() AND setVisible(bool). The best thing is IMHO inheriting show() && hide() slots
Diffstat (limited to 'src/findbar.cpp')
-rw-r--r--src/findbar.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/findbar.cpp b/src/findbar.cpp
index 495e4f96..b3b80fac 100644
--- a/src/findbar.cpp
+++ b/src/findbar.cpp
@@ -144,6 +144,7 @@ void FindBar::show()
// show findbar if not visible
if (isHidden())
{
+ emit visibilityChanged(true);
QWidget::show();
emit searchString(m_lineEdit->text());
}
@@ -183,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();
}