1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

GM_Script: Fix support for @noframes

This commit is contained in:
David Rosca 2018-01-29 21:46:21 +01:00
parent b5b77e7932
commit 4283260504
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -226,14 +226,10 @@ void GM_Script::parseScript()
line = line.mid(3).replace(QLatin1Char('\t'), QLatin1Char(' '));
int index = line.indexOf(QLatin1Char(' '));
if (index < 0) {
continue;
}
const QString key = line.left(index).trimmed();
const QString value = line.mid(index + 1).trimmed();
const QString value = index > 0 ? line.mid(index + 1).trimmed() : QString();
if (key.isEmpty() || value.isEmpty()) {
if (key.isEmpty()) {
continue;
}
@ -278,6 +274,9 @@ void GM_Script::parseScript()
else if (key == QL1S("@icon")) {
m_iconUrl = QUrl(value);
}
else if (key == QL1S("@noframes")) {
m_noframes = true;
}
}
if (!inMetadata) {