diff --git a/src/lib/adblock/adblocksubscription.cpp b/src/lib/adblock/adblocksubscription.cpp
index ab728fee6..6e3243ac6 100644
--- a/src/lib/adblock/adblocksubscription.cpp
+++ b/src/lib/adblock/adblocksubscription.cpp
@@ -189,7 +189,7 @@ const AdBlockRule* AdBlockSubscription::match(const QNetworkRequest &request, co
{
int count = m_networkExceptionRules.count();
for (int i = 0; i < count; ++i) {
- const AdBlockRule * rule = m_networkExceptionRules.at(i);
+ const AdBlockRule* rule = m_networkExceptionRules.at(i);
if (rule->networkMatch(request, urlDomain, urlString)) {
return 0;
}
@@ -197,7 +197,7 @@ const AdBlockRule* AdBlockSubscription::match(const QNetworkRequest &request, co
count = m_networkBlockRules.count();
for (int i = 0; i < count; ++i) {
- const AdBlockRule * rule = m_networkBlockRules.at(i);
+ const AdBlockRule* rule = m_networkBlockRules.at(i);
if (rule->networkMatch(request, urlDomain, urlString)) {
return rule;
}
@@ -210,7 +210,7 @@ bool AdBlockSubscription::adBlockDisabledForUrl(const QUrl &url) const
{
int count = m_documentRules.count();
for (int i = 0; i < count; ++i) {
- const AdBlockRule * rule = m_documentRules.at(i);
+ const AdBlockRule* rule = m_documentRules.at(i);
if (rule->urlMatch(url)) {
return true;
}
@@ -227,7 +227,7 @@ bool AdBlockSubscription::elemHideDisabledForUrl(const QUrl &url) const
int count = m_elemhideRules.count();
for (int i = 0; i < count; ++i) {
- const AdBlockRule * rule = m_elemhideRules.at(i);
+ const AdBlockRule* rule = m_elemhideRules.at(i);
if (rule->urlMatch(url)) {
return true;
}
@@ -247,7 +247,7 @@ QString AdBlockSubscription::elementHidingRulesForDomain(const QString &domain)
int count = m_domainRestrictedCssRules.count();
for (int i = 0; i < count; ++i) {
- const AdBlockRule * rule = m_domainRestrictedCssRules.at(i);
+ const AdBlockRule* rule = m_domainRestrictedCssRules.at(i);
if (rule->matchDomain(domain)) {
rules.append(rule->cssSelector() + ",");
}
diff --git a/src/lib/downloads/downloadmanager.cpp b/src/lib/downloads/downloadmanager.cpp
index 5522df8cf..5d589bc33 100644
--- a/src/lib/downloads/downloadmanager.cpp
+++ b/src/lib/downloads/downloadmanager.cpp
@@ -102,13 +102,13 @@ void DownloadManager::keyPressEvent(QKeyEvent* e)
void DownloadManager::startExternalManager(const QUrl &url)
{
- QStringList arguments = m_externalArguments.split(" ");
+ QStringList arguments = m_externalArguments.split(' ', QString::SkipEmptyParts);
arguments << url.toString();
bool success = QProcess::startDetached(m_externalExecutable, arguments);
if (!success) {
- QString info = "
- " + tr("Executable: ") + "" + m_externalExecutable + "
- " + tr("Arguments: ") + "" + arguments.join(" ") + "
";
+ QString info = "- " + tr("Executable: ") + "" + m_externalExecutable + "
- " + tr("Arguments: ") + "" + arguments.join(' ') + "
";
QMessageBox::critical(this, tr("Cannot start external download manager"), tr("Cannot start external download manager! %1").arg(info));
}
}
diff --git a/src/lib/network/qupzillaschemehandler.cpp b/src/lib/network/qupzillaschemehandler.cpp
index 72b3cf2ff..31f8ba5a3 100644
--- a/src/lib/network/qupzillaschemehandler.cpp
+++ b/src/lib/network/qupzillaschemehandler.cpp
@@ -414,7 +414,7 @@ QString QupZillaSchemeReply::configPage()
}
case QVariant::StringList:
- keyString = keyValue.toStringList().join(",");
+ keyString = keyValue.toStringList().join(',');
break;
default:
diff --git a/src/lib/other/updater.cpp b/src/lib/other/updater.cpp
index 9e3bd8eb0..3eccc403e 100644
--- a/src/lib/other/updater.cpp
+++ b/src/lib/other/updater.cpp
@@ -38,12 +38,12 @@ Updater::Version Updater::parseVersionFromString(const QString &string)
Version ver;
ver.isValid = false;
- QStringList v = string.split(".");
+ QStringList v = string.split('.');
if (v.count() != 3) {
return ver;
}
- QStringList r = v.at(2).split("-");
+ QStringList r = v.at(2).split('.');
ver.majorVersion = v.at(0).toInt();
ver.minorVersion = v.at(1).toInt();
diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp
index b8e0a7972..9599645d6 100644
--- a/src/lib/preferences/preferences.cpp
+++ b/src/lib/preferences/preferences.cpp
@@ -398,7 +398,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
ui->httpsProxyUsername->setText(settings.value("HttpsUsername", "").toString());
ui->httpsProxyPassword->setText(settings.value("HttpsPassword", "").toString());
- ui->proxyExceptions->setText(settings.value("ProxyExceptions", QStringList() << "localhost" << "127.0.0.1").toStringList().join(","));
+ ui->proxyExceptions->setText(settings.value("ProxyExceptions", QStringList() << "localhost" << "127.0.0.1").toStringList().join(','));
settings.endGroup();
useDifferentProxyForHttpsChanged(ui->useHttpsProxy->isChecked());
@@ -905,7 +905,7 @@ void Preferences::saveSettings()
settings.setValue("HttpsUsername", ui->httpsProxyUsername->text());
settings.setValue("HttpsPassword", ui->httpsProxyPassword->text());
- settings.setValue("ProxyExceptions", ui->proxyExceptions->text().split(","));
+ settings.setValue("ProxyExceptions", ui->proxyExceptions->text().split(','));
settings.endGroup();
//Profiles
diff --git a/src/lib/rss/rssnotification.cpp b/src/lib/rss/rssnotification.cpp
index 66d9a2347..0a5aabb70 100644
--- a/src/lib/rss/rssnotification.cpp
+++ b/src/lib/rss/rssnotification.cpp
@@ -33,7 +33,7 @@
bool startExternalProcess(const QString &program, const QStringList &arguments)
{
if (!QProcess::startDetached(program, arguments)) {
- QString info = "- " + RSSNotification::tr("Executable: ") + "" + program + "
- " + RSSNotification::tr("Arguments: ") + "" + arguments.join(" ") + "
";
+ QString info = "- " + RSSNotification::tr("Executable: ") + "" + program + "
- " + RSSNotification::tr("Arguments: ") + "" + arguments.join(' ') + "
";
QMessageBox::critical(0, RSSNotification::tr("Cannot start external program"), RSSNotification::tr("Cannot start external program! %1").arg(info));
return false;