summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-09 19:03:50 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-09 19:03:50 +0200
commit7a93d8a59aa0f693ae533a35b0bc3e4607d3f5ff (patch)
treef6447e2628e625386dcb0438dd61c8f4989c46d9 /src/mainwindow.cpp
parentRemoved unuseful lasttabclosed signal in mainview. (diff)
downloadrekonq-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.cpp26
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."));
}