summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
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."));
}