diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-09-02 22:39:13 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-09-02 22:39:13 +0200 |
commit | 0928f8027530aa0159136d652ff6f1e222c2fd17 (patch) | |
tree | bb003da12775500e7b0c81ab93d5ea228d98f42d /src/mainwindow.cpp | |
parent | Merge commit 'refs/merge-requests/197' of git://gitorious.org/rekonq/mainline... (diff) | |
parent | Use Q_SIGNALS instead of signals :) (diff) | |
download | rekonq-0928f8027530aa0159136d652ff6f1e222c2fd17.tar.xz |
Merge commit 'refs/merge-requests/200' of git://gitorious.org/rekonq/mainline into m200
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 11 |
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; |