summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-06-18 22:47:32 +0400
committerDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-06-18 22:47:32 +0400
commit63de0263e68f31dd9535e6e92932260b0ab6111a (patch)
tree3187da16eec1bd9cf5fc7eadc9909a7fa121e5bd
parentMainWindow::slotPrivateBrowsing fix (diff)
downloadrekonq-63de0263e68f31dd9535e6e92932260b0ab6111a.tar.xz
MainWindow::slotFind{Next, Previous} code clean
-rw-r--r--src/mainwindow.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 20ee31f8..d0405ea9 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -570,15 +570,9 @@ void MainWindow::slotFindNext()
if (!currentTab() && m_lastSearch.isEmpty())
return;
- QWebPage::FindFlags options;
+ QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
if (m_findBar->matchCase())
- {
- options = QWebPage::FindCaseSensitively | QWebPage::FindWrapsAroundDocument;
- }
- else
- {
- options = QWebPage::FindWrapsAroundDocument;
- }
+ options |= QWebPage::FindCaseSensitively;
if (!currentTab()->findText(m_lastSearch, options))
{
@@ -592,15 +586,9 @@ void MainWindow::slotFindPrevious()
if (!currentTab() && m_lastSearch.isEmpty())
return;
- QWebPage::FindFlags options;
+ QWebPage::FindFlags options = QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
if (m_findBar->matchCase())
- {
- options = QWebPage::FindCaseSensitively | QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
- }
- else
- {
- options = QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
- }
+ options |= QWebPage::FindCaseSensitively;
if (!currentTab()->findText(m_lastSearch, options))
{