From 63de0263e68f31dd9535e6e92932260b0ab6111a Mon Sep 17 00:00:00 2001 From: Domrachev Alexandr Date: Thu, 18 Jun 2009 22:47:32 +0400 Subject: MainWindow::slotFind{Next, Previous} code clean --- src/mainwindow.cpp | 20 ++++---------------- 1 file 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)) { -- cgit v1.2.1