mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-24 23:36:01 -05:00
* Give settings managers default groups instead of manually specifying them everywhere. Took 1 hour 2 minutes Took 41 seconds Took 32 seconds Took 5 minutes * Fix dbconverter mock. Took 2 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
32 lines
846 B
C++
32 lines
846 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()
|
|
{
|
|
return getValue("showCardId").toBool();
|
|
}
|
|
|
|
bool DebugSettings::getLocalGameOnStartup()
|
|
{
|
|
return getValue("onStartup", "localgame").toBool();
|
|
}
|
|
|
|
int DebugSettings::getLocalGamePlayerCount()
|
|
{
|
|
return getValue("playerCount", "localgame").toInt();
|
|
}
|
|
|
|
QString DebugSettings::getDeckPathForPlayer(const QString &playerName)
|
|
{
|
|
return getValue(playerName, "localgame", "deck").toString();
|
|
} |