mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 01:12:19 -07:00
Merge 8ea3557696 into 7d867b9745
This commit is contained in:
commit
1dc1c502a2
33 changed files with 880 additions and 30 deletions
|
|
@ -146,6 +146,19 @@ void ServersSettings::setFPPlayerName(QString playerName)
|
|||
setValue(playerName, "fpPlayerName");
|
||||
}
|
||||
|
||||
void ServersSettings::setServerPassword(const QString &saveName, const QString &password)
|
||||
{
|
||||
const int index = getPrevioushostindex(saveName);
|
||||
if (index >= 0) {
|
||||
setValue(password, QString("password%1").arg(index), "server", "server_details");
|
||||
} else {
|
||||
// A credential write that silently no-ops is hard to diagnose from a
|
||||
// bug report; surface a mismatched profile name instead.
|
||||
qCWarning(ServersSettingsLog) << "setServerPassword() could not find profile:" << saveName
|
||||
<< "- password not saved";
|
||||
}
|
||||
}
|
||||
|
||||
QString ServersSettings::getFPPlayerName(QString defaultName) const
|
||||
{
|
||||
QVariant name = getValue("fpPlayerName");
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public:
|
|||
void setFPHostName(QString hostname);
|
||||
void setFPPort(QString port);
|
||||
void setFPPlayerName(QString playerName);
|
||||
//! \brief Store a password (or a "$scrypt$..." verifier) for the given saved server.
|
||||
void setServerPassword(const QString &saveName, const QString &password);
|
||||
void addNewServer(const QString &saveName,
|
||||
const QString &serv,
|
||||
const QString &port,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue