summaryrefslogtreecommitdiff
path: root/src/bookmarks
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-26 20:46:55 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-26 20:46:55 +0200
commit303c4d1d267f8b53a2604b51314ea79053e62635 (patch)
treef8870d92d221ba9d746375351cb502172af87975 /src/bookmarks
parentSVN_SILENT made messages (.desktop file) (diff)
parentMerge commit 'refs/merge-requests/191' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-303c4d1d267f8b53a2604b51314ea79053e62635.tar.xz
Merge branch 'm2_191'
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/bookmarkprovider.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp
index f07c5164..ec02ed31 100644
--- a/src/bookmarks/bookmarkprovider.cpp
+++ b/src/bookmarks/bookmarkprovider.cpp
@@ -253,9 +253,21 @@ void BookmarkProvider::find(QList<KBookmark> *list, const KBookmark &bookmark, c
for (KBookmark bm = group.first(); !bm.isNull(); bm = group.next(bm))
find(list, bm, text);
}
- else if (bookmark.url().url().contains(text) || bookmark.fullText().contains(text))
+ else
{
- *list << bookmark;
+ QStringList words = text.split(" ");
+ bool matches = true;
+ foreach (const QString &word, words)
+ {
+ if (!bookmark.url().url().contains(word, Qt::CaseInsensitive)
+ && !bookmark.fullText().contains(word, Qt::CaseInsensitive))
+ {
+ matches = false;
+ break;
+ }
+ }
+ if (matches)
+ *list << bookmark;
}
}