summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-09-02 22:03:47 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-09-02 22:07:53 +0200
commit83c667187cd4232c412f6390c4ba33a13c328c5a (patch)
tree98dcd634470061e24ea9ae1b38096a9f45ae76cc /src/mainwindow.cpp
parentFix wrong highlights in the search strings (diff)
downloadrekonq-83c667187cd4232c412f6390c4ba33a13c328c5a.tar.xz
- Follow pano's suggestion : Shift + Enter -> findPrevious()
- Don't call findNext() if Ctrl + F is pressed with an existing selection - Correctly update highlights with the timer - A little cleanup
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;