mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[Settings] Camel case everything
This commit is contained in:
parent
e37cb5dadf
commit
8a3ffac8e2
15 changed files with 481 additions and 352 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