diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-02-19 22:27:05 +0100 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-02-19 22:27:05 +0100 |
commit | 8f9db7ef7ce4116c3ea7a34a49d5db04602b4c06 (patch) | |
tree | a200dfe6f757e52f7f1804a063bfe2466281d3b5 /src/mainwindow.cpp | |
parent | Fix a small regression : the color of the lineEdit of the findBar is not corr... (diff) | |
download | rekonq-8f9db7ef7ce4116c3ea7a34a49d5db04602b4c06.tar.xz |
Get rid of the selection of the next found expression when the checkbox matchCase is toggled
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 22cf8c6c..d61b56f9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -777,7 +777,22 @@ void MainWindow::find(const QString & search) findNext(); } - +void MainWindow::matchCaseUpdate() +{ + if (!currentTab()) + return; + + QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument; + + if (m_findBar->matchCase()) + options |= QWebPage::FindCaseSensitively; + + currentTab()->view()->findText(m_lastSearch, QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument); + bool found = currentTab()->view()->findText(m_lastSearch, options); + m_findBar->notifyMatch(found); + if(!found) + currentTab()->view()->page()->focusNextPrevChild(true); +} void MainWindow::findNext() { if (!currentTab()) |