move the default debug.ini to a resource

This commit is contained in:
RickyRister 2025-01-02 23:07:00 -08:00
parent 98b28a0c21
commit 97c0b5a9ec
3 changed files with 14 additions and 7 deletions

View file

@ -5,14 +5,9 @@
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
: SettingsManager(settingPath + "debug.ini", parent)
{
// force debug.ini to be created if it doesn't exist yet
// Create the default debug.ini if it doesn't exist yet
if (!QFile(settingPath + "debug.ini").exists()) {
setValue(false, "showCardId", "debug");
setValue(false, "onStartup", "localgame");
setValue(1, "playerCount", "localgame");
setValue("path/to/deck", "Player 1", "localgame", "deck");
setValue("path/to/deck", "Player 2", "localgame", "deck");
QFile::copy(":/resources/config/debug.ini", settingPath + "debug.ini");
}
}