mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Various Fixes/Updates (#1549)
* Update FindWindowsSDK.cmake * cmake support libcec without version * Ensure Light-Ids are strings * Fix type - do not have dbus as requried * Fixing #1544 * Cleanup * CleanupFix #1551 * Consistently return instance number with JSON replies (#1504) * hyperion-remote- Fix extracting reply for configGet request * Qt 6.6 - Fix iterator finds * Fix test_image2ledsmap * Ensure window.currentHyperionInstanceName is set, cleanup system/log clipboard report * Address protobuf cmake warning * Update License * Update ChangeLog * Address CodeQL and clang findings
This commit is contained in:
@@ -64,7 +64,7 @@ QJsonObject QJsonSchemaChecker::getAutoCorrectedConfig(const QJsonObject& value,
|
||||
_messages.clear();
|
||||
_autoCorrected = value;
|
||||
|
||||
for (const QString& correct : sequence)
|
||||
for (const QString& correct : qAsConst(sequence))
|
||||
{
|
||||
_correct = correct;
|
||||
_currentPath.clear();
|
||||
@@ -234,7 +234,6 @@ void QJsonSchemaChecker::checkProperties(const QJsonObject& value, const QJsonOb
|
||||
const QJsonValue& propertyValue = *i;
|
||||
|
||||
_currentPath.append("." + property);
|
||||
QJsonObject::const_iterator required = propertyValue.toObject().find("required");
|
||||
|
||||
if (value.contains(property))
|
||||
{
|
||||
@@ -242,7 +241,8 @@ void QJsonSchemaChecker::checkProperties(const QJsonObject& value, const QJsonOb
|
||||
}
|
||||
else if (!verifyDeps(property, value, schema))
|
||||
{
|
||||
if (required != propertyValue.toObject().end() && propertyValue.toObject().find("required").value().toBool() && !_ignoreRequired)
|
||||
bool isRequired = propertyValue.toObject().value("required").toBool(false);
|
||||
if (isRequired && !_ignoreRequired)
|
||||
{
|
||||
_error = true;
|
||||
|
||||
@@ -273,9 +273,10 @@ bool QJsonSchemaChecker::verifyDeps(const QString& property, const QJsonObject&
|
||||
{
|
||||
const QJsonObject& depends = ((schema[property].toObject())["options"].toObject())["dependencies"].toObject();
|
||||
|
||||
if (depends.keys().size() > 0)
|
||||
const QStringList dependsKeys = depends.keys();
|
||||
if (!dependsKeys.isEmpty())
|
||||
{
|
||||
QString firstName = depends.keys().first();
|
||||
const QString firstName = dependsKeys.constFirst();
|
||||
if (value.contains(firstName))
|
||||
{
|
||||
if (value[firstName] != depends[firstName])
|
||||
|
Reference in New Issue
Block a user