diff --git a/src/ui/user/iniuser.cpp b/src/ui/user/iniuser.cpp index e4429d69..95c819e3 100644 --- a/src/ui/user/iniuser.cpp +++ b/src/ui/user/iniuser.cpp @@ -39,16 +39,16 @@ const char *const defaultValue(const char *key) IniUser::IniUser(Settings *settings) : MapSettings(settings) { } -QString IniUser::hotKeyValue(const QString &key) const +QString IniUser::hotKeyValue(const char *key) const { - const auto &defaultValue = HotKey::defaultValue(key.toLatin1()); + const auto &defaultValue = HotKey::defaultValue(key); - return valueText("hotKey/" + key, defaultValue); + return valueText("hotKey/" + QLatin1String(key), defaultValue); } -void IniUser::setHotKeyValue(const QString &key, const QString &v) +void IniUser::setHotKeyValue(const char *key, const QString &v) { - setValue("hotKey/" + key, v); + setValue("hotKey/" + QLatin1String(key), v); } void IniUser::saveDefaultIni() diff --git a/src/ui/user/iniuser.h b/src/ui/user/iniuser.h index 2fe848e8..642835f5 100644 --- a/src/ui/user/iniuser.h +++ b/src/ui/user/iniuser.h @@ -58,8 +58,8 @@ public: bool hotKeyGlobal() const { return valueBool("hotKey/global", true); } void setHotKeyGlobal(bool v) { setValue("hotKey/global", v, true); } - QString hotKeyValue(const QString &key) const; - void setHotKeyValue(const QString &key, const QString &v); + QString hotKeyValue(const char *key) const; + void setHotKeyValue(const char *key, const QString &v); bool splashWindowVisible() const { return valueBool("splashWindow/visible", true); } void setSplashWindowVisible(bool on) { setValue("splashWindow/visible", on, true); }