summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-22 12:24:54 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-22 12:24:54 +0200
commitc376a1988f8bd026b46a45a640abc810dc7f6fda (patch)
tree25620771556c019b808332f074aa9816fe08d828 /src
parentMerge commit 'refs/merge-requests/1564' of git://gitorious.org/rekonq/mainlin... (diff)
downloadrekonq-c376a1988f8bd026b46a45a640abc810dc7f6fda.tar.xz
Fixing foreach macros..
Diffstat (limited to 'src')
-rw-r--r--src/cookiejar.cpp2
-rw-r--r--src/homepage.cpp2
-rw-r--r--src/networkaccessmanager.cpp2
-rw-r--r--src/sessionmanager.cpp2
-rw-r--r--src/tabbar.cpp13
-rw-r--r--src/webpage.cpp2
-rw-r--r--src/webview.cpp2
7 files changed, 12 insertions, 13 deletions
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index cd7b97fa..a8ba18bc 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
@@ -84,7 +84,7 @@ QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const
bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, const QUrl & url)
{
QByteArray cookieHeader;
- foreach(const QNetworkCookie& cookie, cookieList)
+ Q_FOREACH(const QNetworkCookie& cookie, cookieList)
{
cookieHeader = "Set-Cookie: ";
cookieHeader += cookie.toRawForm();
diff --git a/src/homepage.cpp b/src/homepage.cpp
index aa679999..8dccc3fd 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -127,7 +127,7 @@ QString HomePage::recentlyClosedTabs()
KUrl::List links = Application::instance()->mainWindow()->mainView()->recentlyClosedTabs();
- foreach(const KUrl &url, links)
+ Q_FOREACH(const KUrl &url, links)
{
closed += "<li><a href=\"" + url.prettyUrl() + "\">" + url.prettyUrl() + "</a></li>";
}
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index b2958d9e..6a89d104 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -117,7 +117,7 @@ void NetworkAccessManager::resetDiskCache()
QDir cacheDir(location + QString("/http") );
QStringList fileList = cacheDir.entryList();
- foreach(QString str, fileList)
+ Q_FOREACH(QString str, fileList)
{
QFile file(str);
file.remove();
diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp
index c93a229d..0c2c5c32 100644
--- a/src/sessionmanager.cpp
+++ b/src/sessionmanager.cpp
@@ -66,7 +66,7 @@ void SessionManager::saveSession()
}
QDataStream out(&sessionFile);
MainWindowList wl = Application::instance()->mainWindowList();
- foreach(QPointer<MainWindow> w, wl)
+ Q_FOREACH(QPointer<MainWindow> w, wl)
{
out << QByteArray("window");
MainView *mv = w->mainView();
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 3f3faabc..dfc1482c 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -75,14 +75,13 @@ void TabBar::postLaunch()
{
// Find the correct MainWindow of this tab button
MainWindowList list = Application::instance()->mainWindowList();
- MainWindow *window;
- foreach (window, list)
+ Q_FOREACH(QPointer<MainWindow> w, list)
{
- if (window->isAncestorOf(this))
- {
- m_addTabButton->setDefaultAction(window->actionByName("new_tab"));
- break;
- }
+ if (w->isAncestorOf(this))
+ {
+ m_addTabButton->setDefaultAction(w->actionByName("new_tab"));
+ break;
+ }
}
m_addTabButton->setAutoRaise(true);
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 697cf448..d5d1cd7c 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -200,7 +200,7 @@ void WebPage::manageNetworkErrors(QNetworkReply* reply)
return;
}
QList<QWebFrame *> children = firstFrame->childFrames();
- foreach(QWebFrame *frame, children)
+ Q_FOREACH(QWebFrame *frame, children)
{
frames.append(frame);
}
diff --git a/src/webview.cpp b/src/webview.cpp
index 8a74e76b..21a24c4f 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -175,7 +175,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
KService::Ptr service;
KUriFilterData data;
- foreach (const QString &engine, favoriteEngines)
+ Q_FOREACH(const QString &engine, favoriteEngines)
{
if(!engine.isEmpty())
{