Commit 2e87da24 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Theming: Cache display name in ThemeSettingsWidget

Change-Id: Ia1d4949ab7153ae887ecfa98ab84953c4fb668db
Reviewed-by: default avatarEike Ziller <>
parent 34415946
......@@ -100,14 +100,20 @@ struct ThemeEntry
QString m_name;
QString m_filePath;
mutable QString m_displayName;
bool m_readOnly;
QString ThemeEntry::displayName() const
QSettings settings(filePath(), QSettings::IniFormat);
QString n = settings.value(QLatin1String(themeNameKey), QCoreApplication::tr("unnamed")).toString();
return m_readOnly ? QCoreApplication::tr("%1 (built-in)").arg(n) : n;
if (m_displayName.isEmpty()) {
QSettings settings(filePath(), QSettings::IniFormat);
m_displayName = settings.value(QLatin1String(themeNameKey),
if (m_readOnly)
m_displayName = QCoreApplication::tr("%1 (built-in)").arg(m_displayName);
return m_displayName;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment