summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 11580f69..92735f6f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -370,8 +370,6 @@ void MainWindow::setupActions()
KShortcut findShortcut = KStandardShortcut::find();
findShortcut.setAlternate(Qt::Key_Slash);
a->setShortcut(findShortcut);
- a->setChecked(m_findBar->isVisible());
- connect(m_findBar, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool)));
KStandardAction::findNext(this, SLOT(findNext()) , actionCollection());
KStandardAction::findPrev(this, SLOT(findPrevious()) , actionCollection());
@@ -781,6 +779,7 @@ void MainWindow::find(const QString & search)
return;
m_lastSearch = search;
+ updateHighlight();
findNext();
}
@@ -792,6 +791,7 @@ void MainWindow::matchCaseUpdate()
currentTab()->view()->findText(m_lastSearch, QWebPage::FindBackward);
findNext();
+ updateHighlight();
}
@@ -800,8 +800,6 @@ void MainWindow::findNext()
if (!currentTab())
return;
- highlightAll();
-
if (m_findBar->isHidden())
{
QPoint previous_position = currentTab()->view()->page()->currentFrame()->scrollPosition();
@@ -810,8 +808,6 @@ void MainWindow::findNext()
return;
}
- highlightAll();
-
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
if (m_findBar->matchCase())
options |= QWebPage::FindCaseSensitively;
@@ -841,7 +837,8 @@ void MainWindow::findPrevious()
m_findBar->notifyMatch(found);
}
-void MainWindow::highlightAll()
+
+void MainWindow::updateHighlight()
{
if (!currentTab())
return;