mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56: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
|
// Parse all options following $ char
|
||||||
int optionsIndex = parsedLine.indexOf(QLatin1Char('$'));
|
int optionsIndex = parsedLine.indexOf(QLatin1Char('$'));
|
||||||
if (optionsIndex >= 0) {
|
if (optionsIndex >= 0) {
|
||||||
QStringList options = parsedLine.mid(optionsIndex + 1).split(QLatin1Char(','));
|
QStringList options = parsedLine.mid(optionsIndex + 1).split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||||
|
|
||||||
int handledOptions = 0;
|
int handledOptions = 0;
|
||||||
foreach(const QString & option, options) {
|
foreach(const QString & option, options) {
|
||||||
@ -530,7 +530,7 @@ void AdBlockRule::parseFilter()
|
|||||||
|
|
||||||
void AdBlockRule::parseDomains(const QString &domains, const QChar &separator)
|
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) {
|
foreach(const QString domain, domainsList) {
|
||||||
if (domain.isEmpty()) {
|
if (domain.isEmpty()) {
|
||||||
|
@ -101,7 +101,7 @@ void DownloadManager::keyPressEvent(QKeyEvent* e)
|
|||||||
|
|
||||||
void DownloadManager::startExternalManager(const QUrl &url)
|
void DownloadManager::startExternalManager(const QUrl &url)
|
||||||
{
|
{
|
||||||
QzTools::startExternalProcess(m_externalExecutable, m_externalArguments);
|
QzTools::startExternalProcess(m_externalExecutable, m_externalArguments + url.toEncoded());
|
||||||
m_lastDownloadOption = ExternalManager;
|
m_lastDownloadOption = ExternalManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -236,7 +236,7 @@ void SpeedDial::changed(const QString &allPages)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList &entries = allPages.split(QLatin1String("\";"));
|
const QStringList &entries = allPages.split(QLatin1String("\";"), QString::SkipEmptyParts);
|
||||||
m_webPages.clear();
|
m_webPages.clear();
|
||||||
|
|
||||||
foreach(const QString & entry, entries) {
|
foreach(const QString & entry, entries) {
|
||||||
@ -244,7 +244,7 @@ void SpeedDial::changed(const QString &allPages)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList &tmp = entry.split(QLatin1String("\"|"));
|
const QStringList &tmp = entry.split(QLatin1String("\"|"), QString::SkipEmptyParts);
|
||||||
if (tmp.count() != 2) {
|
if (tmp.count() != 2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@ void Preferences::saveSettings()
|
|||||||
settings.setValue("HttpsUsername", ui->httpsProxyUsername->text());
|
settings.setValue("HttpsUsername", ui->httpsProxyUsername->text());
|
||||||
settings.setValue("HttpsPassword", ui->httpsProxyPassword->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();
|
settings.endGroup();
|
||||||
|
|
||||||
//Profiles
|
//Profiles
|
||||||
|
@ -187,7 +187,7 @@ void GM_Script::parseScript()
|
|||||||
|
|
||||||
QStringList requireList;
|
QStringList requireList;
|
||||||
|
|
||||||
const QStringList &lines = metadataBlock.split(QLatin1Char('\n'));
|
const QStringList &lines = metadataBlock.split(QLatin1Char('\n'), QString::SkipEmptyParts);
|
||||||
foreach(QString line, lines) {
|
foreach(QString line, lines) {
|
||||||
if (!line.startsWith(QLatin1String("// @"))) {
|
if (!line.startsWith(QLatin1String("// @"))) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* GreaseMonkey plugin for QupZilla
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,7 +20,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
bool wildcardMatch(const QString &string, const QString &pattern)
|
static bool wildcardMatch(const QString &string, const QString &pattern)
|
||||||
{
|
{
|
||||||
int stringSize = string.size();
|
int stringSize = string.size();
|
||||||
int patternSize = pattern.size();
|
int patternSize = pattern.size();
|
||||||
|
@ -1253,22 +1253,6 @@
|
|||||||
<source>Clear</source>
|
<source>Clear</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</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>
|
<message>
|
||||||
<source>%1% of %2 files (%3) %4 remaining</source>
|
<source>%1% of %2 files (%3) %4 remaining</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -2851,6 +2835,22 @@
|
|||||||
<source>Unknown size</source>
|
<source>Unknown size</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>QtWin</name>
|
<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>
|
<source>Add</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</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>
|
<message>
|
||||||
<source>RSS feed <b>"%1"</b></source>
|
<source>RSS feed <b>"%1"</b></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
Loading…
Reference in New Issue
Block a user