Commit d3426c77 authored by Rafał Malinowski's avatar Rafał Malinowski

themes: use QSettings intead of PlainConfigFile

Signed-off-by: Rafał Malinowski's avatarRafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
parent fa2e4b3d
......@@ -24,6 +24,7 @@
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QSettings>
#include "configuration/configuration-file.h"
......@@ -102,10 +103,16 @@ void Themes::setTheme(const QString &theme)
ActualTheme = theme;
if (theme != "Custom" && !ConfigName.isEmpty())
{
PlainConfigFile theme_file(
themePath() + fixFileName(themePath(), ConfigName));
theme_file.read();
entries = theme_file.getGroupSection(Name);
QSettings themeSettings(themePath() + fixFileName(themePath(), ConfigName), QSettings::IniFormat);
themeSettings.setIniCodec("ISO8859-2");
themeSettings.beginGroup(Name);
auto keys = themeSettings.allKeys();
for (auto key : keys)
{
entries.insert(key, themeSettings.value(key).toString());
}
themeSettings.endGroup();
}
emit themeChanged(ActualTheme);
}
......
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