summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-01-29 10:52:28 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-01-29 10:52:28 +0100
commit2649aba801efdbf57f10b55a5e6c46dbd13cdbb4 (patch)
tree7b1519b88688a87c57954a6a0254500a431744d9 /src/mainwindow.cpp
parentNew BookmarkBar!! 1st version, Yeah!! (diff)
downloadrekonq-2649aba801efdbf57f10b55a5e6c46dbd13cdbb4.tar.xz
Fixed Find bar use.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 87ae0ac0..c7c1a47e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -551,14 +551,8 @@ void MainWindow::slotFind(const QString & search)
{
if (!currentTab())
return;
- if (!search.isEmpty())
- {
- m_lastSearch = search;
- if (!currentTab()->findText(m_lastSearch))
- {
- slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") );
- }
- }
+ m_lastSearch = search;
+ slotFindNext();
}
@@ -572,7 +566,10 @@ void MainWindow::slotFindNext()
{
if (!currentTab() && m_lastSearch.isEmpty())
return;
- currentTab()->findText(m_lastSearch);
+ if (!currentTab()->findText(m_lastSearch, QWebPage::FindWrapsAroundDocument))
+ {
+ slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") );
+ }
}
@@ -580,7 +577,10 @@ void MainWindow::slotFindPrevious()
{
if (!currentTab() && m_lastSearch.isEmpty())
return;
- currentTab()->findText(m_lastSearch, QWebPage::FindBackward);
+ if (!currentTab()->findText(m_lastSearch, QWebPage::FindBackward))
+ {
+ slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") );
+ }
}