summaryrefslogtreecommitdiff
path: root/src/urlbar/urlresolver.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-20 18:32:52 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-20 18:32:52 +0200
commit78047f4e1024d0d4fd27b53c8b2ec29ff04afba6 (patch)
treeaf684203e2959c8f71bc2c2ad0a88a5d22b5f80b /src/urlbar/urlresolver.cpp
parentAdd a "show main toolbar" action in the empty tabbar contextual menu (diff)
downloadrekonq-78047f4e1024d0d4fd27b53c8b2ec29ff04afba6.tar.xz
Krazy fixes, first bunch
Diffstat (limited to 'src/urlbar/urlresolver.cpp')
-rw-r--r--src/urlbar/urlresolver.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index b762716a..ed4dcb4e 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -95,11 +95,13 @@ UrlResolver::UrlResolver(const QString &typedUrl)
{
QString reg;
QString engineUrl;
- foreach(KService::Ptr s, SearchEngine::favorites())
+ Q_FOREACH(KService::Ptr s, SearchEngine::favorites())
{
engineUrl = QRegExp::escape(s->property("Query").toString()).replace("\\\\\\{@\\}","[\\d\\w-.]+");
- if (reg.isEmpty()) reg = "(" + engineUrl + ")";
- else reg = reg + "|(" + engineUrl + ")";
+ if (reg.isEmpty())
+ reg = '(' + engineUrl + ')';
+ else
+ reg = reg + "|(" + engineUrl + ')';
}
_searchEnginesRegexp = QRegExp(reg);
}
@@ -317,7 +319,7 @@ UrlSearchList UrlResolver::historyResolution()
qSort(found);
UrlSearchList list;
- foreach (HistoryItem i, found)
+ Q_FOREACH(const HistoryItem &i, found)
{
if (_searchEnginesRegexp.indexIn(i.url) == -1) //filter all urls that are search engine results
{
@@ -334,7 +336,7 @@ UrlSearchList UrlResolver::bookmarksResolution()
{
UrlSearchList list;
QList<KBookmark> found = Application::bookmarkProvider()->find(_typedString);
- foreach (KBookmark b, found)
+ Q_FOREACH(const KBookmark &b, found)
{
UrlSearchItem gItem(UrlSearchItem::Bookmark, b.url().url(), b.fullText());
list << gItem;