mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Code] Use QString::SkipEmptyParts in QString::split.
This commit is contained in:
parent
68e0831bdb
commit
e4ebeb3252
@ -401,7 +401,7 @@ void AdBlockRule::parseFilter()
|
||||
// Parse all options following $ char
|
||||
int optionsIndex = parsedLine.indexOf(QLatin1Char('$'));
|
||||
if (optionsIndex >= 0) {
|
||||
QStringList options = parsedLine.mid(optionsIndex + 1).split(QLatin1Char(','));
|
||||
QStringList options = parsedLine.mid(optionsIndex + 1).split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||
|
||||
int handledOptions = 0;
|
||||
foreach(const QString & option, options) {
|
||||
@ -530,7 +530,7 @@ void AdBlockRule::parseFilter()
|
||||
|
||||
void AdBlockRule::parseDomains(const QString &domains, const QChar &separator)
|
||||
{
|
||||
QStringList domainsList = domains.split(separator);
|
||||
QStringList domainsList = domains.split(separator, QString::SkipEmptyParts);
|
||||
|
||||
foreach(const QString domain, domainsList) {
|
||||
if (domain.isEmpty()) {
|
||||
|
@ -101,7 +101,7 @@ void DownloadManager::keyPressEvent(QKeyEvent* e)
|
||||
|
||||
void DownloadManager::startExternalManager(const QUrl &url)
|
||||
{
|
||||
QzTools::startExternalProcess(m_externalExecutable, m_externalArguments);
|
||||
QzTools::startExternalProcess(m_externalExecutable, m_externalArguments + url.toEncoded());
|
||||
m_lastDownloadOption = ExternalManager;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -236,7 +236,7 @@ void SpeedDial::changed(const QString &allPages)
|
||||
return;
|
||||
}
|
||||
|
||||
const QStringList &entries = allPages.split(QLatin1String("\";"));
|
||||
const QStringList &entries = allPages.split(QLatin1String("\";"), QString::SkipEmptyParts);
|
||||
m_webPages.clear();
|
||||
|
||||
foreach(const QString & entry, entries) {
|
||||
@ -244,7 +244,7 @@ void SpeedDial::changed(const QString &allPages)
|
||||
continue;
|
||||
}
|
||||
|
||||
const QStringList &tmp = entry.split(QLatin1String("\"|"));
|
||||
const QStringList &tmp = entry.split(QLatin1String("\"|"), QString::SkipEmptyParts);
|
||||
if (tmp.count() != 2) {
|
||||
continue;
|
||||
}
|
||||
|
@ -993,7 +993,7 @@ void Preferences::saveSettings()
|
||||
settings.setValue("HttpsUsername", ui->httpsProxyUsername->text());
|
||||
settings.setValue("HttpsPassword", ui->httpsProxyPassword->text());
|
||||
|
||||
settings.setValue("ProxyExceptions", ui->proxyExceptions->text().split(QLatin1Char(',')));
|
||||
settings.setValue("ProxyExceptions", ui->proxyExceptions->text().split(QLatin1Char(','), QString::SkipEmptyParts));
|
||||
settings.endGroup();
|
||||
|
||||
//Profiles
|
||||
|
@ -187,7 +187,7 @@ void GM_Script::parseScript()
|
||||
|
||||
QStringList requireList;
|
||||
|
||||
const QStringList &lines = metadataBlock.split(QLatin1Char('\n'));
|
||||
const QStringList &lines = metadataBlock.split(QLatin1Char('\n'), QString::SkipEmptyParts);
|
||||
foreach(QString line, lines) {
|
||||
if (!line.startsWith(QLatin1String("// @"))) {
|
||||
continue;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* GreaseMonkey plugin for QupZilla
|
||||
* Copyright (C) 2012 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2012-2013 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,7 +20,7 @@
|
||||
#include <QDebug>
|
||||
#include <QStringList>
|
||||
|
||||
bool wildcardMatch(const QString &string, const QString &pattern)
|
||||
static bool wildcardMatch(const QString &string, const QString &pattern)
|
||||
{
|
||||
int stringSize = string.size();
|
||||
int patternSize = pattern.size();
|
||||
|
@ -1253,22 +1253,6 @@
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Executable: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Arguments: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external download manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external download manager! %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1% of %2 files (%3) %4 remaining</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -2851,6 +2835,22 @@
|
||||
<source>Unknown size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Executable: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Arguments: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external program! %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtWin</name>
|
||||
@ -3656,22 +3656,6 @@ Please add some with RSS icon in navigation bar on site which offers feeds.</sou
|
||||
<source>Add</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Executable: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Arguments: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot start external program! %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>RSS feed <b>"%1"</b></source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
Loading…
Reference in New Issue
Block a user