Cockatrice/libcockatrice_settings/libcockatrice/settings/debug_settings.cpp
RickyRister 34a5b8b9ce
[SettingsManager] Make setting getters const (#6748)
* [SettingsManager] Make setting getters const

* remove hashGameType from header
2026-03-27 18:13:25 +01:00

32 lines
No EOL
870 B
C++

#include "debug_settings.h"
#include <QtCore/QFile>
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
: SettingsManager(settingPath + "debug.ini", "debug", QString(), parent)
{
// Create the default debug.ini if it doesn't exist yet
if (!QFile(settingPath + "debug.ini").exists()) {
QFile::copy(":/resources/config/debug.ini", settingPath + "debug.ini");
}
}
bool DebugSettings::getShowCardId() const
{
return getValue("showCardId").toBool();
}
bool DebugSettings::getLocalGameOnStartup() const
{
return getValue("onStartup", "localgame").toBool();
}
int DebugSettings::getLocalGamePlayerCount() const
{
return getValue("playerCount", "localgame").toInt();
}
QString DebugSettings::getDeckPathForPlayer(const QString &playerName) const
{
return getValue(playerName, "localgame", "deck").toString();
}