mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Style, minor adjustments
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
namespace Fsd
|
||||
@@ -40,9 +42,9 @@ namespace BlackCore
|
||||
{
|
||||
if (tokens.size() < 6)
|
||||
{
|
||||
BlackMisc::CLogMessage(static_cast<AddPilot*>(nullptr)).warning(u"Wrong number of arguments.");
|
||||
CLogMessage(static_cast<AddPilot*>(nullptr)).warning(u"Wrong number of arguments.");
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
PilotRating rating = static_cast<PilotRating>(tokens[4].toInt());
|
||||
int protocolRevision = tokens[5].toInt();
|
||||
|
||||
@@ -29,10 +29,10 @@ namespace BlackCore
|
||||
AddPilot(const QString &callsign, const QString &cid, const QString &password, PilotRating rating, int protocolRevision, SimType simType, const QString &realName);
|
||||
|
||||
//! Get user cid
|
||||
QString cid() const { return m_cid; }
|
||||
const QString &cid() const { return m_cid; }
|
||||
|
||||
//! Get user password
|
||||
QString password() const { return m_password; }
|
||||
const QString &password() const { return m_password; }
|
||||
|
||||
//! Get pilot rating
|
||||
PilotRating rating() const { return m_rating; }
|
||||
@@ -44,7 +44,7 @@ namespace BlackCore
|
||||
SimType simType() const { return m_simType; }
|
||||
|
||||
//! Get real name
|
||||
QString realName() const { return m_realName; }
|
||||
const QString &realName() const { return m_realName; }
|
||||
|
||||
//! Message converted to tokens
|
||||
QStringList toTokens() const;
|
||||
|
||||
@@ -1246,10 +1246,10 @@ namespace BlackCore
|
||||
case ServerErrorCode::NoWeatherProfile: CLogMessage(this).info(u"FSD Server: requested weather profile does not exist"); break;
|
||||
|
||||
// we have no idea what these mean
|
||||
case ServerErrorCode::AlreadyRegistered: CLogMessage(this).info(u"Server says already registered: %1") << serverError.m_description; break;
|
||||
case ServerErrorCode::InvalidCtrl: CLogMessage(this).info(u"Server invalid control: %1") << serverError.m_description; break;
|
||||
case ServerErrorCode::Unknown: CLogMessage(this).info(u"Server sent unknown error code: %1 (%2)") << serverError.m_causingParameter << serverError.m_description; break;
|
||||
case ServerErrorCode::AuthTimeout: CLogMessage(this).info(u"Client did not authenticate in time"); break;
|
||||
case ServerErrorCode::AlreadyRegistered: CLogMessage(this).info(u"Server says already registered: %1") << serverError.m_description; break;
|
||||
case ServerErrorCode::InvalidCtrl: CLogMessage(this).info(u"Server invalid control: %1") << serverError.m_description; break;
|
||||
case ServerErrorCode::Unknown: CLogMessage(this).info(u"Server sent unknown error code: %1 (%2)") << serverError.m_causingParameter << serverError.m_description; break;
|
||||
case ServerErrorCode::AuthTimeout: CLogMessage(this).info(u"Client did not authenticate in time"); break;
|
||||
}
|
||||
if (serverError.isFatalError()) { disconnectFromServer(); }
|
||||
}
|
||||
|
||||
@@ -208,9 +208,6 @@ namespace BlackCore
|
||||
//! We received a reply to one of our ATIS queries.
|
||||
void atisReplyReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CInformationMessage &atis);
|
||||
|
||||
//! We received a reply to one of our ATIS queries, containing the controller's voice room URL.
|
||||
// void atisVoiceRoomReplyReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &url);
|
||||
|
||||
//! We received a reply to one of our ATIS queries, containing the controller's planned logoff time.
|
||||
void atisLogoffTimeReplyReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &zuluTime);
|
||||
|
||||
@@ -349,8 +346,8 @@ namespace BlackCore
|
||||
// Client data
|
||||
QString m_clientName;
|
||||
QString m_hostApplication;
|
||||
int m_versionMajor = 0;
|
||||
int m_versionMinor = 0;
|
||||
int m_versionMajor = 0;
|
||||
int m_versionMinor = 0;
|
||||
int m_protocolRevision = 0;
|
||||
ServerType m_serverType = ServerType::LegacyFsd;
|
||||
Capabilities m_capabilities = Capabilities::None;
|
||||
@@ -413,7 +410,7 @@ namespace BlackCore
|
||||
QTimer m_positionUpdateTimer; //!< sending positions
|
||||
QTimer m_interimPositionUpdateTimer; //!< sending interim positions
|
||||
|
||||
qint64 m_additionalOffsetTime = 0; //!< additional offset time
|
||||
qint64 m_additionalOffsetTime = 0; //!< additional offset time
|
||||
|
||||
bool m_statistics = false;
|
||||
QMap <QString, int> m_callStatistics;
|
||||
|
||||
Reference in New Issue
Block a user