Standardized some theme loading log messages in TextComponent.

This commit is contained in:
Leon Styhre 2023-01-15 09:44:40 +01:00
parent f5bfacd514
commit fb1caaf879

View file

@ -398,8 +398,9 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
else else
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"<horizontalAlignment> defined as \"" "\"horizontalAlignment\" for element \""
<< horizontalAlignment << "\""; << element.substr(5) << "\" defined as \"" << horizontalAlignment
<< "\"";
} }
if (properties & ALIGNMENT && elem->has("verticalAlignment")) { if (properties & ALIGNMENT && elem->has("verticalAlignment")) {
@ -413,8 +414,8 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
else else
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"<verticalAlignment> defined as \"" "\"verticalAlignment\" for element \""
<< verticalAlignment << "\""; << element.substr(5) << "\" defined as \"" << verticalAlignment << "\"";
} }
// Legacy themes only. // Legacy themes only.
@ -429,8 +430,8 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
else else
LOG(LogWarning) << componentName LOG(LogWarning) << componentName
<< ": Invalid theme configuration, property " << ": Invalid theme configuration, property "
"<alignment> defined as \"" "\"alignment\" for element \""
<< alignment << "\""; << element.substr(5) << "\" defined as \"" << alignment << "\"";
} }
if (properties & TEXT && elem->has("text")) if (properties & TEXT && elem->has("text"))
@ -446,9 +447,9 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
} }
} }
if (mThemeSystemdata == "") { if (mThemeSystemdata == "") {
LOG(LogError) LOG(LogError) << "TextComponent: Invalid theme configuration, property "
<< "TextComponent: Invalid theme configuration, property <systemdata> defined as \"" "\"systemdata\" for element \""
<< systemdata << "\""; << element.substr(5) << "\" defined as \"" << systemdata << "\"";
} }
} }
@ -479,9 +480,9 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
} }
} }
if (mThemeMetadata == "") { if (mThemeMetadata == "") {
LOG(LogError) LOG(LogError) << "TextComponent: Invalid theme configuration, property "
<< "TextComponent: Invalid theme configuration, property <metadata> defined as \"" "\"metadata\" for element \""
<< metadata << "\""; << element.substr(5) << "\" defined as \"" << metadata << "\"";
} }
} }
@ -515,9 +516,9 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
setCapitalize(true); setCapitalize(true);
} }
else if (letterCase != "none") { else if (letterCase != "none") {
LOG(LogWarning) LOG(LogWarning) << "TextComponent: Invalid theme configuration, property "
<< "TextComponent: Invalid theme configuration, property <letterCase> defined as \"" "\"letterCase\" for element \""
<< letterCase << "\""; << element.substr(5) << "\" defined as \"" << letterCase << "\"";
} }
} }