mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Qt 6.7 (#1650)
* Do not validate values for options without value
* Clean-up
* ws281x include files workaround
* Revert "ws281x include files workaround"
This reverts commit 1b98308718
.
* Use https://github.com/hyperion-project/rpi_ws281x while fix is applied in original repository
This commit is contained in:
@@ -14,19 +14,22 @@ bool Parser::parse(const QStringList &arguments)
|
||||
return false;
|
||||
}
|
||||
|
||||
for(Option * option : _options)
|
||||
for(Option * option : std::as_const(_options))
|
||||
{
|
||||
QString value = this->value(*option);
|
||||
if (!option->validate(*this, value)) {
|
||||
const QString error = option->getError();
|
||||
if (!error.isEmpty()) {
|
||||
_errorText = tr("\"%1\" is not a valid option for %2, %3").arg(value, option->name(), error);
|
||||
if (!option->valueName().isEmpty())
|
||||
{
|
||||
QString value = this->value(*option);
|
||||
if (!option->validate(*this, value)) {
|
||||
const QString error = option->getError();
|
||||
if (!error.isEmpty()) {
|
||||
_errorText = tr("\"%1\" is not a valid option for %2, %3").arg(value, option->name(), error);
|
||||
}
|
||||
else
|
||||
{
|
||||
_errorText = tr("\"%1\" is not a valid option for %2").arg(value, option->name());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_errorText = tr("\"%1\" is not a valid option for %2").arg(value, option->name());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user