mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Changed some theme loading issues log output from warning to error for DateTimeComponent and TextComponent.
This commit is contained in:
parent
0b34bd8991
commit
fa81853127
|
@ -179,9 +179,9 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
mThemeMetadata = metadata;
|
||||
}
|
||||
else {
|
||||
LOG(LogWarning) << "DateTimeComponent: Invalid theme configuration, property "
|
||||
"<metadata> defined as \""
|
||||
<< metadata << "\"";
|
||||
LOG(LogError) << "DateTimeComponent: Invalid theme configuration, property "
|
||||
"<metadata> defined as \""
|
||||
<< metadata << "\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -453,14 +453,14 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
if (properties & METADATA && elem->has("systemdata")) {
|
||||
mThemeSystemdata = "";
|
||||
const std::string systemdata {elem->get<std::string>("systemdata")};
|
||||
for (auto& type : systemdataTypes) {
|
||||
for (auto& type : supportedSystemdataTypes) {
|
||||
if (type == systemdata) {
|
||||
mThemeSystemdata = type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mThemeSystemdata == "") {
|
||||
LOG(LogWarning)
|
||||
LOG(LogError)
|
||||
<< "TextComponent: Invalid theme configuration, property <systemdata> defined as \""
|
||||
<< systemdata << "\"";
|
||||
}
|
||||
|
@ -469,14 +469,15 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
if (properties & METADATA && elem->has("metadata")) {
|
||||
mThemeMetadata = "";
|
||||
const std::string metadata {elem->get<std::string>("metadata")};
|
||||
for (auto& type : metadataTypes) {
|
||||
|
||||
for (auto& type : supportedMetadataTypes) {
|
||||
if (type == metadata) {
|
||||
mThemeMetadata = type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (mThemeMetadata == "") {
|
||||
LOG(LogWarning)
|
||||
LOG(LogError)
|
||||
<< "TextComponent: Invalid theme configuration, property <metadata> defined as \""
|
||||
<< metadata << "\"";
|
||||
}
|
||||
|
|
|
@ -91,10 +91,10 @@ private:
|
|||
void calculateExtent();
|
||||
void onColorChanged();
|
||||
|
||||
static inline std::vector<std::string> systemdataTypes {
|
||||
static inline std::vector<std::string> supportedSystemdataTypes {
|
||||
"name", "fullname", "gamecount", "gamecount_games", "gamecount_favorites"};
|
||||
|
||||
static inline std::vector<std::string> metadataTypes {
|
||||
static inline std::vector<std::string> supportedMetadataTypes {
|
||||
"name", "description", "rating", "developer", "publisher",
|
||||
"genre", "players", "favorite", "completed", "kidgame",
|
||||
"broken", "playcount", "controller", "altemulator"};
|
||||
|
|
Loading…
Reference in a new issue