summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-28 11:12:42 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-28 11:12:42 +0200
commit3cd1f78b70ad60fc0197db664d361e92487d5e8b (patch)
tree96f54bc8232fd146c4d0c4c6c588bd79e415aa4d /src
parentSVN_SILENT made messages (.desktop file) (diff)
parentDon't use QString::number(), KDE will format the numbers is an l10n-friendly ... (diff)
downloadrekonq-3cd1f78b70ad60fc0197db664d361e92487d5e8b.tar.xz
Merge commit 'refs/merge-requests/2286' of git://gitorious.org/rekonq/mainline into m2286
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkcontextmenu.cpp4
-rw-r--r--src/bookmarks/bookmarksmanager.cpp4
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp2
-rw-r--r--src/history/historypanel.cpp2
-rw-r--r--src/mainview.cpp2
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/newtabpage.cpp5
-rw-r--r--src/urlbar/urlresolver.cpp2
-rw-r--r--src/webpage.cpp4
-rw-r--r--src/webtab.cpp2
10 files changed, 14 insertions, 15 deletions
diff --git a/src/bookmarks/bookmarkcontextmenu.cpp b/src/bookmarks/bookmarkcontextmenu.cpp
index c96fa7bf..4422763a 100644
--- a/src/bookmarks/bookmarkcontextmenu.cpp
+++ b/src/bookmarks/bookmarkcontextmenu.cpp
@@ -237,7 +237,7 @@ void BookmarkContextMenu::editBookmark()
selected.setFullText(selected.text().replace("&&", "&"));
KBookmarkDialog *dialog = owner()->bookmarkDialog(manager(), QApplication::activeWindow());
dialog->editBookmark(selected);
- selected.setFullText(selected.text().replace("&", "&&"));
+ selected.setFullText(selected.text().replace('&', "&&"));
delete dialog;
}
@@ -319,7 +319,7 @@ void BookmarkContextMenu::bookmarkCurrentPage()
if (selected.isGroup())
parent = selected.toGroup();
- KBookmark newBk = parent.addBookmark(owner()->currentTitle().replace("&", "&&"), KUrl(owner()->currentUrl()), "text-html");
+ KBookmark newBk = parent.addBookmark(owner()->currentTitle().replace('&', "&&"), KUrl(owner()->currentUrl()), "text-html");
parent.moveBookmark(newBk, selected.parentGroup().previous(selected));
}
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index c06375b5..c430078b 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -103,7 +103,7 @@ void BookmarkOwner::openFolderinTabs(const KBookmarkGroup &bookmark)
i18ncp("%1=Number of tabs. Value is always >=8",
"You are about to open %1 tabs.\nAre you sure?",
"You are about to open %1 tabs.\nAre you sure?",
- QString::number( urlList.length() ))
+ urlList.length())
) == KMessageBox::Continue)
)
return;
@@ -412,7 +412,7 @@ void BookmarkProvider::fillBookmarkBar(KToolBar *toolBar)
else
{
KBookmarkAction* a = new KBookmarkAction(bookmark, m_owner, this);
- a->setIconText(a->iconText().replace("&", "&&"));
+ a->setIconText(a->iconText().replace('&', "&&"));
toolBar->addAction(a);
}
}
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index 4003cf3f..a865a99d 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -75,7 +75,7 @@ QVariant BtmItem::data(int role) const
}
if (m_kbm.isGroup())
{
- tooltip += i18nc("%1=Number of items in bookmark folder", " (%1 items)", QString::number(childCount()));
+ tooltip += i18nc("%1=Number of items in bookmark folder", " (%1 items)", childCount());
}
if (!m_kbm.url().url().isEmpty())
{
diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp
index 28284e0a..d8309eed 100644
--- a/src/history/historypanel.cpp
+++ b/src/history/historypanel.cpp
@@ -175,7 +175,7 @@ void HistoryPanel::openAll()
i18ncp("%1=Number of tabs. Value is always >=8",
"You are about to open %1 tabs.\nAre you sure?",
"You are about to open %1 tabs.\nAre you sure?",
- QString::number(allChild.length()))) == KMessageBox::Continue)
+ allChild.length())) == KMessageBox::Continue)
)
return;
}
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 0bc6fbde..84dc70af 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -596,7 +596,7 @@ void MainView::webViewTitleChanged(const QString &title)
{
QString viewTitle = title.isEmpty()? i18n("(Untitled)") : title;
QString tabTitle = viewTitle;
- tabTitle.replace("&", "&&");
+ tabTitle.replace('&', "&&");
WebView *view = qobject_cast<WebView *>(sender());
int index = indexOf(view->parentWidget());
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 015e655b..9c381f97 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -380,8 +380,7 @@ void NewTabPage::browsingMenu(const KUrl &currentUrl)
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");
@@ -582,7 +581,7 @@ void NewTabPage::downloadsPage()
div.appendInside("<em>" + date + "</em>");
div.appendInside("<br/>");
- div.appendInside("<a href=" + item.srcUrlString + ">" + item.srcUrlString + "</a>");
+ div.appendInside("<a href=" + item.srcUrlString + '>' + item.srcUrlString + "</a>");
div.appendInside("<br/>");
div.appendInside(markup("a"));
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index 494c8145..7333e305 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -91,7 +91,7 @@ UrlResolver::UrlResolver(const QString &typedUrl)
"y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|"\
"pro)";
- _browseRegexp = QRegExp("(" + protocol + ")|(" + local + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +")");
+ _browseRegexp = QRegExp('(' + protocol + ")|(" + local + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +')');
}
}
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")))