as discussed in slack: added default swift testserver (FSD servers) if no settings can be loaded

This commit is contained in:
Klaus Basan
2015-07-11 01:36:06 +02:00
committed by Mathew Sutcliffe
parent d8e0ff83e6
commit 6a1f5e8347
5 changed files with 26 additions and 9 deletions

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
};
//! Default constructor.
CServer() : m_port(-1), m_isAcceptingConnections(true) {}
CServer() {}
//! Constructor.
CServer(const QString &name, const QString &description, const QString &address, int port, const CUser &user, bool isAcceptingConnections = true)
@@ -73,10 +73,10 @@ namespace BlackMisc
//! Set port
void setPort(int port) { m_port = port; }
//! Server is accepting connections
//! Server is accepting connections (allows to disable server temporarily)
bool isAcceptingConnections() const { return m_isAcceptingConnections; }
//! Set whether server is accepting connections
//! Set whether server is accepting connections (allows to disable server temporarily)
void setIsAcceptingConnections(bool value) { m_isAcceptingConnections = value; }
//! Is valid for login?
@@ -99,9 +99,9 @@ namespace BlackMisc
QString m_name;
QString m_description;
QString m_address;
int m_port;
int m_port = -1;
CUser m_user;
bool m_isAcceptingConnections;
bool m_isAcceptingConnections = true; //!< temp. disable server
};
} // namespace
} // namespace

View File

@@ -86,6 +86,7 @@ namespace BlackMisc
if (isCompiledWithBlackSound()) sl << "BlackSound";
if (isCompiledWithBlackInput()) sl << "BlackInput";
if (isCompiledWithGui()) sl << "BlackGui";
if (isCompiledWithFs9Support()) sl << "FS9";
if (isCompiledWithFsxSupport()) sl << "FSX";
if (isCompiledWithXPlaneSupport()) sl << "XPlane";
info = sl.join(", ");
@@ -102,6 +103,7 @@ namespace BlackMisc
static QStringList sl;
if (isCompiledWithFsxSupport()) sl << "FSX";
if (isCompiledWithXPlaneSupport()) sl << "XPlane";
if (isCompiledWithFs9Support()) sl << "FS9";
sims = sl.join(", ");
if (sims.isEmpty()) sims = "<none>";
}