diff options
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/completionwidget.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/listitem.cpp | 3 | ||||
-rw-r--r-- | src/urlbar/listitem.h | 8 | ||||
-rw-r--r-- | src/urlbar/rsswidget.cpp | 8 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/urlresolver.cpp | 10 | ||||
-rw-r--r-- | src/urlbar/urlresolver.h | 2 |
7 files changed, 18 insertions, 17 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index 7c6c6fe7..230f96d4 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -68,7 +68,7 @@ void CompletionWidget::insertSearchList(const UrlSearchList &list, const QString { _list = list; int i = 0; - foreach(UrlSearchItem item, _list) + foreach(const UrlSearchItem &item, _list) { ListItem *suggestion = ListItemFactory::create(item, text, this); suggestion->setBackgroundRole(i % 2 ? QPalette::AlternateBase : QPalette::Base); diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index ce1f8d9a..f8f93dcd 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -41,7 +41,6 @@ // KDE Includes #include <KIcon> #include <QActionGroup> -#include <KIcon> // Qt Includes #include <QHBoxLayout> @@ -195,7 +194,7 @@ TextLabel::TextLabel(const QString &text, const QString &textToPointOut, QWidget { QString t = text; if (!textToPointOut.isEmpty()) - t = t.replace(QRegExp("(" + textToPointOut + ")", Qt::CaseInsensitive), "<b>\\1</b>"); + t = t.replace(QRegExp('(' + textToPointOut + ')', Qt::CaseInsensitive), "<b>\\1</b>"); setText(t); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); diff --git a/src/urlbar/listitem.h b/src/urlbar/listitem.h index 25d651d3..328e5af9 100644 --- a/src/urlbar/listitem.h +++ b/src/urlbar/listitem.h @@ -54,7 +54,7 @@ class ListItem : public QWidget Q_OBJECT public: - ListItem(const UrlSearchItem &item, QWidget *parent = 0); + explicit ListItem(const UrlSearchItem &item, QWidget *parent = 0); virtual ~ListItem(); void activate(); @@ -90,7 +90,7 @@ class TypeIconLabel : public QLabel Q_OBJECT public: - TypeIconLabel(int type, QWidget *parent = 0); + explicit TypeIconLabel(int type, QWidget *parent = 0); private: QLabel *getIcon(QString icon); @@ -129,7 +129,7 @@ class EngineBar : public KToolBar Q_OBJECT public: - EngineBar(KService::Ptr selectedEngine, QWidget *parent = 0); + explicit EngineBar(KService::Ptr selectedEngine, QWidget *parent = 0); void selectNextEngine(); signals: @@ -152,7 +152,7 @@ class SearchListItem : public ListItem Q_OBJECT public: - SearchListItem(const UrlSearchItem &item, const QString &text, QWidget *parent = 0); + explicit SearchListItem(const UrlSearchItem &item, const QString &text, QWidget *parent = 0); public slots: virtual void nextItemSubChoice(); diff --git a/src/urlbar/rsswidget.cpp b/src/urlbar/rsswidget.cpp index e5ec50ee..9e26164e 100644 --- a/src/urlbar/rsswidget.cpp +++ b/src/urlbar/rsswidget.cpp @@ -61,7 +61,6 @@ RSSWidget::RSSWidget(QMap< KUrl, QString > map, QWidget *parent) QFormLayout *layout = new QFormLayout(this); setLayout(layout); - QLabel *agregator = new QLabel(this); agregator->setText(i18n("Aggregator:")); @@ -76,9 +75,12 @@ RSSWidget::RSSWidget(QMap< KUrl, QString > map, QWidget *parent) feed->setText(i18n("Feed:")); m_feeds = new KComboBox(this); - foreach(QString title, m_map) - m_feeds->addItem(title); + foreach(const QString &title, m_map) + { + m_feeds->addItem(title); + } + layout->addRow(feed, m_feeds); diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 4a992d25..ef0ee45c 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -347,7 +347,7 @@ IconButton *UrlBar::addRightIcon(UrlBar::icon ic) break; case UrlBar::SSL: rightIcon->setIcon(KIcon("object-locked")); - rightIcon->setToolTip(i18n("Show SSL Infos")); + rightIcon->setToolTip(i18n("Show SSL Info")); break; default: kDebug() << "ERROR.. default non extant case!!"; diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 4dd96041..2fd02c10 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -56,7 +56,7 @@ // 5. "fixhosturifilter" -bool UrlSearchItem::operator==(UrlSearchItem i) +bool UrlSearchItem::operator==(const UrlSearchItem &i) { return url == i.url; } @@ -118,12 +118,12 @@ UrlSearchList UrlResolver::orderedSearchItems() } } - foreach(UrlSearchItem i, common) + foreach(const UrlSearchItem &i, common) { list << i; } - foreach(UrlSearchItem i, bookmarksList) + foreach(const UrlSearchItem &i, bookmarksList) { if (!common.contains(i)) list << i; @@ -149,8 +149,8 @@ bool UrlResolver::isHttp() "y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|"\ "pro)"; - return _typedString.startsWith("http://") - || _typedString.startsWith("https://") + return _typedString.startsWith( QL1S("http://") ) + || _typedString.startsWith( QL1S("https://") ) || (QRegExp(address, Qt::CaseInsensitive).indexIn(_typedString) != -1) || (QRegExp(ipv4, Qt::CaseInsensitive).indexIn(_typedString) != -1) || (QRegExp(ipv6, Qt::CaseInsensitive).indexIn(_typedString) != -1); diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h index c16fd09b..d3cdedbe 100644 --- a/src/urlbar/urlresolver.h +++ b/src/urlbar/urlresolver.h @@ -59,7 +59,7 @@ public: : type(_type), url(_url), title(_title) {}; - bool operator==(UrlSearchItem i); + bool operator==(const UrlSearchItem &i); }; typedef QList <UrlSearchItem> UrlSearchList; |