diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-09 19:03:50 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-09 19:03:50 +0200 |
commit | 7a93d8a59aa0f693ae533a35b0bc3e4607d3f5ff (patch) | |
tree | f6447e2628e625386dcb0438dd61c8f4989c46d9 /src/mainwindow.cpp | |
parent | Removed unuseful lasttabclosed signal in mainview. (diff) | |
download | rekonq-7a93d8a59aa0f693ae533a35b0bc3e4607d3f5ff.tar.xz |
Refactoring find bar following (a bit) Pawel suggestions..
Applied match Case search
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c074d667..2d959034 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -566,7 +566,18 @@ void MainWindow::slotFindNext() { if (!currentTab() && m_lastSearch.isEmpty()) return; - if (!currentTab()->findText(m_lastSearch, QWebPage::FindWrapsAroundDocument)) + + QWebPage::FindFlags options; + if(m_findBar->matchCase()) + { + options = QWebPage::FindCaseSensitively | QWebPage::FindWrapsAroundDocument; + } + else + { + options = QWebPage::FindWrapsAroundDocument; + } + + if (!currentTab()->findText(m_lastSearch, options)) { slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found.")); } @@ -577,7 +588,18 @@ void MainWindow::slotFindPrevious() { if (!currentTab() && m_lastSearch.isEmpty()) return; - if (!currentTab()->findText(m_lastSearch, QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument)) + + QWebPage::FindFlags options; + if(m_findBar->matchCase()) + { + options = QWebPage::FindCaseSensitively | QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument; + } + else + { + options = QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument; + } + + if (!currentTab()->findText(m_lastSearch, options)) { slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found.")); } |