diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-20 18:32:52 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-20 18:32:52 +0200 |
commit | 78047f4e1024d0d4fd27b53c8b2ec29ff04afba6 (patch) | |
tree | af684203e2959c8f71bc2c2ad0a88a5d22b5f80b /src/urlbar | |
parent | Add a "show main toolbar" action in the empty tabbar contextual menu (diff) | |
download | rekonq-78047f4e1024d0d4fd27b53c8b2ec29ff04afba6.tar.xz |
Krazy fixes, first bunch
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/bookmarkwidget.h | 2 | ||||
-rw-r--r-- | src/urlbar/urlresolver.cpp | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/urlbar/bookmarkwidget.h b/src/urlbar/bookmarkwidget.h index cdab328e..c3c15e18 100644 --- a/src/urlbar/bookmarkwidget.h +++ b/src/urlbar/bookmarkwidget.h @@ -44,7 +44,7 @@ class BookmarkWidget : public QFrame Q_OBJECT public: - BookmarkWidget(const KBookmark &bookmark, QWidget *parent = 0); + explicit BookmarkWidget(const KBookmark &bookmark, QWidget *parent = 0); ~BookmarkWidget(); void showAt(const QPoint &pos); 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; |