MCPcopy Create free account
hub / github.com/YACReader/yacreader / normalizeThemeJsonValue

Function normalizeThemeJsonValue

common/themes/theme_json_utils.cpp:9–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace {
8
9QJsonValue normalizeThemeJsonValue(const QJsonValue &value)
10{
11 if (value.isObject())
12 return normalizeThemeJson(value.toObject());
13
14 if (value.isArray()) {
15 QJsonArray normalizedArray = value.toArray();
16 for (int i = 0; i < normalizedArray.size(); ++i)
17 normalizedArray[i] = normalizeThemeJsonValue(normalizedArray.at(i));
18 return normalizedArray;
19 }
20
21 if (value.isString()) {
22 const QString stringValue = value.toString();
23 if (isThemeHexColorString(stringValue))
24 return stringValue.toUpper();
25 }
26
27 return value;
28}
29
30}
31

Callers 1

normalizeThemeJsonFunction · 0.85

Calls 3

normalizeThemeJsonFunction · 0.85
isThemeHexColorStringFunction · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected