mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Do not validate values for options without value
This commit is contained in:
parent
a5625cf984
commit
7aa1cd87ea
@ -14,7 +14,9 @@ bool Parser::parse(const QStringList &arguments)
|
||||
return false;
|
||||
}
|
||||
|
||||
for(Option * option : _options)
|
||||
for(Option * option : std::as_const(_options))
|
||||
{
|
||||
if (!option->valueName().isEmpty())
|
||||
{
|
||||
QString value = this->value(*option);
|
||||
if (!option->validate(*this, value)) {
|
||||
@ -29,6 +31,7 @@ bool Parser::parse(const QStringList &arguments)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user