mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[Settings] Shuffle some settings around (#7084)
* [Settings] Shuffle some settings around Took 21 minutes Took 1 hour 25 minutes * [Settings] Camel case everything * Revert debug schema change * Add new classes * Fix card counters writing to global * Fix CI tests * Fix Windows CI * interface() is a protected keyword for MSVC Took 5 minutes Took 5 seconds * [Settings] Keep menu settings on the appearance settings page Leave the 'Menu settings' group box on the appearance settings page for now; relocating it to the user interface settings page will be done in a separate PR. Took 6 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
bf6b2a90bc
commit
adf574e038
79 changed files with 1899 additions and 1123 deletions
|
|
@ -10,28 +10,28 @@ ServersSettings::ServersSettings(const QString &settingPath, QObject *parent)
|
|||
|
||||
void ServersSettings::setPreviousHostLogin(int previous)
|
||||
{
|
||||
setValue(previous, "previoushostlogin");
|
||||
setValue(previous, "previousHostLogin");
|
||||
}
|
||||
|
||||
int ServersSettings::getPreviousHostLogin() const
|
||||
{
|
||||
QVariant previous = getValue("previoushostlogin");
|
||||
QVariant previous = getValue("previousHostLogin");
|
||||
return previous == QVariant() ? 1 : previous.toInt();
|
||||
}
|
||||
|
||||
void ServersSettings::setPreviousHostList(QStringList list)
|
||||
{
|
||||
setValue(list, "previoushosts");
|
||||
setValue(list, "previousHosts");
|
||||
}
|
||||
|
||||
QStringList ServersSettings::getPreviousHostList() const
|
||||
{
|
||||
return getValue("previoushosts").toStringList();
|
||||
return getValue("previousHosts").toStringList();
|
||||
}
|
||||
|
||||
void ServersSettings::setPrevioushostName(const QString &name)
|
||||
{
|
||||
setValue(name, "previoushostName");
|
||||
setValue(name, "previousHostName");
|
||||
}
|
||||
|
||||
QString ServersSettings::getSaveName(QString defaultname)
|
||||
|
|
@ -50,7 +50,7 @@ QString ServersSettings::getSite(QString defaultSite)
|
|||
|
||||
QString ServersSettings::getPrevioushostName() const
|
||||
{
|
||||
QVariant value = getValue("previoushostName");
|
||||
QVariant value = getValue("previousHostName");
|
||||
return value == QVariant() ? "Rooster Ranges" : value.toString();
|
||||
}
|
||||
|
||||
|
|
@ -110,56 +110,56 @@ bool ServersSettings::getSavePassword() const
|
|||
|
||||
void ServersSettings::setAutoConnect(int autoconnect)
|
||||
{
|
||||
setValue(autoconnect, "auto_connect");
|
||||
setValue(autoconnect, "autoConnect");
|
||||
}
|
||||
|
||||
int ServersSettings::getAutoConnect() const
|
||||
{
|
||||
QVariant autoconnect = getValue("auto_connect");
|
||||
QVariant autoconnect = getValue("autoConnect");
|
||||
return autoconnect == QVariant() ? 0 : autoconnect.toInt();
|
||||
}
|
||||
|
||||
void ServersSettings::setFPHostName(QString hostname)
|
||||
{
|
||||
setValue(hostname, "fphostname");
|
||||
setValue(hostname, "fpHostName");
|
||||
}
|
||||
|
||||
QString ServersSettings::getFPHostname(QString defaultHost) const
|
||||
{
|
||||
QVariant hostname = getValue("fphostname");
|
||||
QVariant hostname = getValue("fpHostName");
|
||||
return hostname == QVariant() ? std::move(defaultHost) : hostname.toString();
|
||||
}
|
||||
|
||||
void ServersSettings::setFPPort(QString port)
|
||||
{
|
||||
setValue(port, "fpport");
|
||||
setValue(port, "fpPort");
|
||||
}
|
||||
|
||||
QString ServersSettings::getFPPort(QString defaultPort) const
|
||||
{
|
||||
QVariant port = getValue("fpport");
|
||||
QVariant port = getValue("fpPort");
|
||||
return port == QVariant() ? std::move(defaultPort) : port.toString();
|
||||
}
|
||||
|
||||
void ServersSettings::setFPPlayerName(QString playerName)
|
||||
{
|
||||
setValue(playerName, "fpplayername");
|
||||
setValue(playerName, "fpPlayerName");
|
||||
}
|
||||
|
||||
QString ServersSettings::getFPPlayerName(QString defaultName) const
|
||||
{
|
||||
QVariant name = getValue("fpplayername");
|
||||
QVariant name = getValue("fpPlayerName");
|
||||
return name == QVariant() ? std::move(defaultName) : name.toString();
|
||||
}
|
||||
|
||||
void ServersSettings::setClearDebugLogStatus(bool abIsChecked)
|
||||
{
|
||||
setValue(abIsChecked, "save_debug_log");
|
||||
setValue(abIsChecked, "saveDebugLog");
|
||||
}
|
||||
|
||||
bool ServersSettings::getClearDebugLogStatus(bool abDefaultValue) const
|
||||
{
|
||||
QVariant cbFlushLog = getValue("save_debug_log");
|
||||
QVariant cbFlushLog = getValue("saveDebugLog");
|
||||
return cbFlushLog == QVariant() ? abDefaultValue : cbFlushLog.toBool();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue