diff --git a/src/base/preferences.cpp b/src/base/preferences.cpp index 180c40dd4..296241191 100644 --- a/src/base/preferences.cpp +++ b/src/base/preferences.cpp @@ -61,12 +61,14 @@ namespace { +#ifdef Q_OS_WIN QString makeProfileID(const QString &profilePath, const QString &profileName) { return profilePath.isEmpty() ? profileName : profileName + QLatin1Char('@') + Utils::Fs::toValidFileSystemName(profilePath, false, {}); } +#endif } Preferences *Preferences::m_instance = nullptr; @@ -90,7 +92,7 @@ void Preferences::freeInstance() m_instance = nullptr; } -const QVariant Preferences::value(const QString &key, const QVariant &defaultValue) const +QVariant Preferences::value(const QString &key, const QVariant &defaultValue) const { return SettingsStorage::instance()->loadValue(key, defaultValue); } diff --git a/src/base/preferences.h b/src/base/preferences.h index ff8263ecf..8769bc5e4 100644 --- a/src/base/preferences.h +++ b/src/base/preferences.h @@ -30,6 +30,7 @@ #pragma once #include +#include #include #include "base/utils/net.h" @@ -80,7 +81,7 @@ class Preferences : public QObject Preferences(); - const QVariant value(const QString &key, const QVariant &defaultValue = {}) const; + QVariant value(const QString &key, const QVariant &defaultValue = {}) const; void setValue(const QString &key, const QVariant &value); static Preferences *m_instance;