mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fixed potentional issue with starting external download manager
This commit is contained in:
parent
c0c996dbbd
commit
19f34ecd4c
@ -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() + ",");
|
||||
}
|
||||
|
@ -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 = "<ul><li><b>" + tr("Executable: ") + "</b>" + m_externalExecutable + "</li><li><b>" + tr("Arguments: ") + "</b>" + arguments.join(" ") + "</li></ul>";
|
||||
QString info = "<ul><li><b>" + tr("Executable: ") + "</b>" + m_externalExecutable + "</li><li><b>" + tr("Arguments: ") + "</b>" + arguments.join(' ') + "</li></ul>";
|
||||
QMessageBox::critical(this, tr("Cannot start external download manager"), tr("Cannot start external download manager! %1").arg(info));
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ QString QupZillaSchemeReply::configPage()
|
||||
}
|
||||
|
||||
case QVariant::StringList:
|
||||
keyString = keyValue.toStringList().join(",");
|
||||
keyString = keyValue.toStringList().join(',');
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -33,7 +33,7 @@
|
||||
bool startExternalProcess(const QString &program, const QStringList &arguments)
|
||||
{
|
||||
if (!QProcess::startDetached(program, arguments)) {
|
||||
QString info = "<ul><li><b>" + RSSNotification::tr("Executable: ") + "</b>" + program + "</li><li><b>" + RSSNotification::tr("Arguments: ") + "</b>" + arguments.join(" ") + "</li></ul>";
|
||||
QString info = "<ul><li><b>" + RSSNotification::tr("Executable: ") + "</b>" + program + "</li><li><b>" + RSSNotification::tr("Arguments: ") + "</b>" + arguments.join(' ') + "</li></ul>";
|
||||
QMessageBox::critical(0, RSSNotification::tr("Cannot start external program"), RSSNotification::tr("Cannot start external program! %1").arg(info));
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user