aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-14 07:14:28 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-14 07:14:28 +0200
commit04a277dbb6c15e79be8623f3c36edd465d4b80a7 (patch)
treec135df825573e7d56e812ab1bbbc66494db7c5f1 /lib
parente8be883d1c05bd82040e59c4744362509bd24222 (diff)
downloadlibquotient-04a277dbb6c15e79be8623f3c36edd465d4b80a7.tar.gz
libquotient-04a277dbb6c15e79be8623f3c36edd465d4b80a7.zip
Settings: use UTF-8 encoding
Fixes #403.
Diffstat (limited to 'lib')
-rw-r--r--lib/settings.cpp5
-rw-r--r--lib/settings.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/settings.cpp b/lib/settings.cpp
index 0349e699..5413693d 100644
--- a/lib/settings.cpp
+++ b/lib/settings.cpp
@@ -16,6 +16,11 @@ void Settings::setLegacyNames(const QString& organizationName,
legacyApplicationName = applicationName;
}
+Settings::Settings(QObject* parent) : QSettings(parent)
+{
+ setIniCodec("UTF-8");
+}
+
void Settings::setValue(const QString& key, const QVariant& value)
{
QSettings::setValue(key, value);
diff --git a/lib/settings.h b/lib/settings.h
index 79ebba6c..5a097285 100644
--- a/lib/settings.h
+++ b/lib/settings.h
@@ -39,7 +39,7 @@ public:
static void setLegacyNames(const QString& organizationName,
const QString& applicationName = {});
- using QSettings::QSettings;
+ explicit Settings(QObject* parent = nullptr);
/// Set the value for a given key
/*! If the key exists in the legacy location, it is removed. */