Qt6 support (#1363)

* Initial Qt6 config

* Change Package order to reingfence missing packages

* Update to QT 6.2.0

* Qt 6.2.0 updates

* macOS fix

* Simplify handling QT5 & Qt6 in parallel

* Updates for Windows

* Fix macos build

* macOS linker fix

* General support of QTDIR, update docu

* MaxOS add default qt directories

* Fix merge typo

* Update default CMakeSettings.json with installation path options

* Add additional libs required by Qt6 to CompileHowTo

* Fix Qt5 items

Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2021-11-16 17:12:56 +00:00
committed by GitHub
parent 3b1ca20b10
commit 25d79a9f3f
76 changed files with 645 additions and 541 deletions

View File

@@ -35,7 +35,7 @@ public:
/// @param schema The schema to use
/// @return true upon succes
///
bool setSchema(const QJsonObject & schema);
bool setSchema(const QJsonObject& schema);
///
/// @brief Validate a JSON structure
@@ -44,7 +44,7 @@ public:
/// @return The first boolean is true when the arguments is valid according to the schema. The second is true when the schema contains no errors
/// @return TODO: Check the Schema in SetSchema() function and remove the QPair result
///
QPair<bool, bool> validate(const QJsonObject & value, bool ignoreRequired = false);
QPair<bool, bool> validate(const QJsonObject& value, bool ignoreRequired = false);
///
/// @brief Auto correct a JSON structure
@@ -52,7 +52,7 @@ public:
/// @param ignoreRequired Ignore the "required" keyword in hyperion schema. Default is false
/// @return The corrected JSON structure
///
QJsonObject getAutoCorrectedConfig(const QJsonObject & value, bool ignoreRequired = false);
QJsonObject getAutoCorrectedConfig(const QJsonObject& value, bool ignoreRequired = false);
///
/// @return A list of error messages
@@ -67,14 +67,14 @@ private:
/// @param[in] value The value to validate
/// @param[in] schema The schema against which the value is validated
///
void validate(const QJsonValue &value, const QJsonObject & schema);
void validate(const QJsonValue& value, const QJsonObject& schema);
///
/// Adds the given message to the message-queue (with reference to current line-number)
///
/// @param[in] message The message to add to the queue
///
void setMessage(const QString & message);
void setMessage(const QString& message);
private:
// attribute check functions
@@ -85,7 +85,7 @@ private:
/// @param[in] value The given value
/// @param[in] schema The specified type (as json-value)
///
void checkType(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkType(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks is required properties of an json-object exist and if all properties are of the
@@ -95,7 +95,9 @@ private:
/// @param[in] value The given json-object
/// @param[in] schema The schema of the json-object
///
void checkProperties(const QJsonObject & value, const QJsonObject & schema);
void checkProperties(const QJsonObject& value, const QJsonObject& schema);
bool verifyDeps(const QString& property, const QJsonObject& value, const QJsonObject& schema);
///
/// Checks whether certain properties of a JSON object exist under certain dependencies and are the same.
@@ -105,7 +107,7 @@ private:
/// @param[in] value The given json-object
/// @param[in] schema The schema of the json-object
///
void checkDependencies(const QJsonObject & value, const QJsonObject & schema);
void checkDependencies(const QJsonObject& value, const QJsonObject& schema);
///
/// Verifies the additional configured properties of an json-object. If this is not the case
@@ -115,7 +117,7 @@ private:
/// @param schema The schema for the json-object
/// @param ignoredProperties The properties that were ignored
///
void checkAdditionalProperties(const QJsonObject & value, const QJsonValue & schema, const QStringList & ignoredProperties);
void checkAdditionalProperties(const QJsonObject& value, const QJsonValue& schema, const QStringList& ignoredProperties);
///
/// Checks if the given value is larger or equal to the specified value. If this is not the case
@@ -124,7 +126,7 @@ private:
/// @param[in] value The given value
/// @param[in] schema The minimum value (as json-value)
///
void checkMinimum(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMinimum(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks if the given value is smaller or equal to the specified value. If this is not the
@@ -133,7 +135,7 @@ private:
/// @param[in] value The given value
/// @param[in] schema The maximum value (as json-value)
///
void checkMaximum(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMaximum(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks if the given value is hugher than the specified value. If this is the
@@ -142,7 +144,7 @@ private:
/// @param value The given value
/// @param schema The minimum size specification (as json-value)
///
void checkMinLength(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMinLength(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks if the given value is smaller than the specified value. If this is the
@@ -151,7 +153,7 @@ private:
/// @param value The given value
/// @param schema The maximum size specification (as json-value)
///
void checkMaxLength(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMaxLength(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Validates all the items of an array.
@@ -159,7 +161,7 @@ private:
/// @param value The json-array
/// @param schema The schema for the items in the array
///
void checkItems(const QJsonValue & value, const QJsonObject & schema);
void checkItems(const QJsonValue& value, const QJsonObject& schema);
///
/// Checks if a given array has at least a minimum number of items. If this is not the case
@@ -168,7 +170,7 @@ private:
/// @param value The json-array
/// @param schema The minimum size specification (as json-value)
///
void checkMinItems(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMinItems(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks if a given array has at most a maximum number of items. If this is not the case
@@ -177,7 +179,7 @@ private:
/// @param value The json-array
/// @param schema The maximum size specification (as json-value)
///
void checkMaxItems(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
void checkMaxItems(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
///
/// Checks if a given array contains only unique items. If this is not the case
@@ -186,7 +188,7 @@ private:
/// @param value The json-array
/// @param schema Bool to enable the check (as json-value)
///
void checkUniqueItems(const QJsonValue & value, const QJsonValue & schema);
void checkUniqueItems(const QJsonValue& value, const QJsonValue& schema);
///
/// Checks if an enum value is actually a valid value for that enum. If this is not the case
@@ -195,15 +197,7 @@ private:
/// @param value The enum value
/// @param schema The enum schema definition
///
void checkEnum(const QJsonValue & value, const QJsonValue & schema, const QJsonValue & defaultValue);
///
/// @brief Return the "default" value as string. If not found, an empty string is output
///
/// @param value The JSON value to search
/// @return The "default" value as string
///
QString getDefaultValue(const QJsonValue & value);
void checkEnum(const QJsonValue& value, const QJsonValue& schema, const QJsonValue& defaultValue);
private:
/// The schema of the entire json-configuration