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:
parent
b5b77e7932
commit
4283260504
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user