Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/client/HotkeyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ bool HotkeyManager::setHotkey(const Hotkey &hk, const std::string_view command)
QVariantMap data = getConfig().hotkeys.data();
data[mmqt::toQStringUtf8(hk.to_string())] = mmqt::toQStringUtf8(command);
setConfig().hotkeys.setData(std::move(data));
getConfig().write();
return true;
}

Expand All @@ -110,6 +111,7 @@ bool HotkeyManager::removeHotkey(const Hotkey &hk)
}
data.remove(key);
setConfig().hotkeys.setData(std::move(data));
getConfig().write();
return true;
}

Expand Down Expand Up @@ -143,9 +145,11 @@ void HotkeyManager::resetToDefaults()
XFOREACH_DEFAULT_HOTKEYS(X_DEFAULT)
#undef X_DEFAULT
setConfig().hotkeys.setData(std::move(data));
getConfig().write();
}

void HotkeyManager::clear()
{
setConfig().hotkeys.setData(QVariantMap());
getConfig().write();
}
1 change: 1 addition & 0 deletions src/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ void MainWindow::createActions()
static void setConfigMapMode(const MapModeEnum mode)
{
setConfig().general.mapMode = mode;
getConfig().write();
}

void MainWindow::slot_onPlayMode()
Expand Down
2 changes: 2 additions & 0 deletions src/parser/AbstractParser-Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ void AbstractParser::doConfig(const StringView cmd)

clone.set(oldValue);
fp.setFloat(value);
getConfig().write();
os << "Changed " << help << " from " << clone.getFloat() << " to " << fp.getFloat()
<< AnsiOstream::endl;
this->graphicsSettingsChanged();
Expand Down Expand Up @@ -294,6 +295,7 @@ void AbstractParser::doConfig(const StringView cmd)
}

conf.set(value);
getConfig().write();
os << "Set " << conf.getName() << " = " << BoolAlpha(value)
<< AnsiOstream::endl;
graphicsSettingsChanged();
Expand Down
1 change: 1 addition & 0 deletions src/parser/AbstractParser-Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void AbstractParser::parseGroup(StringView input)
member->setColor(newColor.getQColor());
if (member->isYou()) {
setConfig().groupManager.color = member->getColor();
getConfig().write();
}
os << "Member " << name << " (" << id << ") has been changed from " << oldColor
<< " to " << newColor << ".\n";
Expand Down
1 change: 1 addition & 0 deletions src/parser/abstractparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ bool AbstractParser::setCommandPrefix(const char prefix)
return false;
}
setConfig().parser.prefixChar = prefix;
getConfig().write();
showCommandPrefix();
return true;
}
Expand Down
Loading