mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:25:20 +00:00
UI: IniUser: Refactor *HotKeyValue()
This commit is contained in:
parent
c136cb1e9a
commit
8ef9f7e187
@ -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()
|
||||
|
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user