diff options
author | Jonathan Thomas <echidnaman@kubuntu.org> | 2010-05-27 10:57:10 -0400 |
---|---|---|
committer | Jonathan Thomas <echidnaman@kubuntu.org> | 2010-05-27 10:57:10 -0400 |
commit | 498eac8ccbc952228ab14178fc36635360ddde91 (patch) | |
tree | 1967d5e24e6e400077c333875c168a643460f02f | |
parent | The second arg of QString::replace has to be a QString, I suppose (diff) | |
download | rekonq-498eac8ccbc952228ab14178fc36635360ddde91.tar.xz |
Const iterator fixes
-rw-r--r-- | src/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/newtabpage.cpp | 3 | ||||
-rw-r--r-- | src/webpage.cpp | 4 | ||||
-rw-r--r-- | src/webtab.cpp | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 95fbd92d..d5b81c1e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -680,7 +680,7 @@ void MainWindow::updateActions() if (am->menu()) am->menu()->clear(); - foreach (HistoryItem item, mainView()->recentlyClosedTabs()) + foreach (const HistoryItem &item, mainView()->recentlyClosedTabs()) { KAction *a = new KAction(Application::icon(item.url), item.title, this); a->setData(item.url); diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index 2ab52c50..9c381f97 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -380,8 +380,7 @@ void NewTabPage::browsingMenu(const KUrl ¤tUrl) nav.findFirst("span").appendInside(i18n("Downloads")); navItems.append(nav); - QWebElement it; - foreach(it, navItems) + foreach(QWebElement it, navItems) { if (it.findFirst("a").attribute("href") == currentUrl.toMimeDataString()) it.addClass("current"); diff --git a/src/webpage.cpp b/src/webpage.cpp index 00745445..45059def 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -615,14 +615,14 @@ void WebPage::downloadAllContentsWithKGet(QPoint) KUrl relativeUrl; QWebElementCollection images = mainFrame()->documentElement().findAll("img"); - foreach(QWebElement img, images) + foreach(const QWebElement &img, images) { relativeUrl.setEncodedUrl(img.attribute("src").toUtf8(), KUrl::TolerantMode); contents << baseUrl.resolved(relativeUrl).toString(); } QWebElementCollection links = mainFrame()->documentElement().findAll("a"); - foreach(QWebElement link, links) + foreach(const QWebElement &link, links) { relativeUrl.setEncodedUrl(link.attribute("href").toUtf8(), KUrl::TolerantMode); contents << baseUrl.resolved(relativeUrl).toString(); diff --git a/src/webtab.cpp b/src/webtab.cpp index a6bedc97..47780a44 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -183,7 +183,7 @@ void WebTab::showRSSInfo(QPoint pos) QMap<KUrl, QString> map; - foreach(QWebElement el, col) + foreach(const QWebElement &el, col) { QString urlString; if (el.attribute("href").startsWith(QL1S("http"))) |