diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-26 20:45:15 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-26 20:45:15 +0200 |
commit | 624b0733d0a028e374bad2199819d3a25632f30c (patch) | |
tree | 1a56bf2d26563ae301452b48a0aa24029d84e8d2 /src/history | |
parent | Adding QWeakPointers for the walletbar and the previewselectorbar. (diff) | |
parent | Name cleanup in WebSnap::imagePathFromUrl with QRegExp. (diff) | |
download | rekonq-624b0733d0a028e374bad2199819d3a25632f30c.tar.xz |
Merge commit 'refs/merge-requests/191' of git://gitorious.org/rekonq/mainline into m2_191
Diffstat (limited to 'src/history')
-rw-r--r-- | src/history/historymanager.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 5cd85cd7..4a3039f3 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -239,8 +239,18 @@ QList<HistoryItem> HistoryManager::find(const QString &text) { int index = m_historyFilterModel->historyLocation(url); HistoryItem item = m_history.at(index); - - if(url.contains(text) || item.title.contains(text)) + + QStringList words = text.split(" "); + bool matches = true; + foreach (const QString &word, words) + { + if (!url.contains(word, Qt::CaseInsensitive) + && !item.title.contains(word, Qt::CaseInsensitive)) { + matches = false; + break; + } + } + if (matches) list << item; } |