diff options
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/bookmarkowner.cpp | 2 | ||||
-rw-r--r-- | src/bookmarks/bookmarkprovider.cpp | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp index 862a7de4..530ad199 100644 --- a/src/bookmarks/bookmarkowner.cpp +++ b/src/bookmarks/bookmarkowner.cpp @@ -341,7 +341,7 @@ void BookmarkOwner::setupActions() createAction(NEW_FOLDER, i18n("New Folder"), "folder-new", i18n("Create a new bookmark folder"), SLOT(newBookmarkFolder())); createAction(NEW_SEPARATOR, i18n("New Separator"), "edit-clear", - i18n("Create a new bookmark separatork"), SLOT(newSeparator())); + i18n("Create a new bookmark separator"), SLOT(newSeparator())); createAction(COPY, i18n("Copy Link"), "edit-copy", i18n("Copy the bookmark's link address"), SLOT(copyLink())); createAction(EDIT, i18n("Edit"), "configure", 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; } } |