* Do not validate values for options without value

* Clean-up

* ws281x include files workaround

* Revert "ws281x include files workaround"

This reverts commit 1b983087183e3c563a191edd34a318cfd0cdace1.

* Use https://github.com/hyperion-project/rpi_ws281x while fix is applied in original repository
This commit is contained in:
LordGrey 2023-10-29 21:12:59 +01:00 committed by GitHub
parent a5625cf984
commit b73e9f4996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 19 deletions

4
.gitmodules vendored
View File

@ -1,7 +1,7 @@
[submodule "dependencies/external/rpi_ws281x"]
path = dependencies/external/rpi_ws281x
url = https://github.com/jgarff/rpi_ws281x
branch = master
url = https://github.com/hyperion-project/rpi_ws281x
branch = main
[submodule "dependencies/external/flatbuffers"]
path = dependencies/external/flatbuffers
url = https://github.com/google/flatbuffers

View File

@ -222,10 +222,11 @@ if (HYPERION_LIGHT)
SET ( DEFAULT_OSX OFF )
SET ( DEFAULT_QT OFF )
SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_AUDIO OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_XCB OFF )
SET ( DEFAULT_AUDIO OFF )
# Disable Input Servers
SET ( DEFAULT_BOBLIGHT_SERVER OFF )
SET ( DEFAULT_CEC OFF )
@ -274,15 +275,13 @@ message(STATUS "ENABLE_V4L2 = ${ENABLE_V4L2}")
option(ENABLE_X11 "Enable the X11 grabber" ${DEFAULT_X11})
message(STATUS "ENABLE_X11 = ${ENABLE_X11}")
option(ENABLE_AUDIO "Enable the AUDIO grabber" ${DEFAULT_AUDIO})
message(STATUS "ENABLE_AUDIO = ${ENABLE_AUDIO}")
option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} )
message(STATUS "ENABLE_WS281XPWM = ${ENABLE_WS281XPWM}")
option(ENABLE_XCB "Enable the XCB grabber" ${DEFAULT_XCB})
message(STATUS "ENABLE_XCB = ${ENABLE_XCB}")
option(ENABLE_AUDIO "Enable the AUDIO grabber" ${DEFAULT_AUDIO})
message(STATUS "ENABLE_AUDIO = ${ENABLE_AUDIO}")
removeIndent()
message(STATUS "Input options:")

View File

@ -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;
}