mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
7eacb41113
commit
d4b2238dc6
@@ -119,7 +119,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
VatServerType serverType;
|
VatServerType serverType;
|
||||||
bool success = getCmdLineServerType(serverType);
|
bool success = getCmdLineServerType(serverType);
|
||||||
if(!success) { serverType = CBuildConfig::isVatsimVersion() ? vatServerVatsim : vatServerLegacyFsd; }
|
if (!success) { serverType = CBuildConfig::isVatsimVersion() ? vatServerVatsim : vatServerLegacyFsd; }
|
||||||
|
|
||||||
m_net.reset(Vat_CreateNetworkSession(serverType, sApp->swiftVersionChar(),
|
m_net.reset(Vat_CreateNetworkSession(serverType, sApp->swiftVersionChar(),
|
||||||
CVersion::versionMajor(), CVersion::versionMinor(),
|
CVersion::versionMajor(), CVersion::versionMinor(),
|
||||||
@@ -686,11 +686,9 @@ namespace BlackCore
|
|||||||
static const QList<QCommandLineOption> opts
|
static const QList<QCommandLineOption> opts
|
||||||
{
|
{
|
||||||
QCommandLineOption({ "idAndKey", "clientIdAndKey" },
|
QCommandLineOption({ "idAndKey", "clientIdAndKey" },
|
||||||
QCoreApplication::translate("networkvatlib", "Client id and key pair separated by ':', e.g. <id>:<key>."),
|
QCoreApplication::translate("networkvatlib", "Client id and key pair separated by ':', e.g. <id>:<key>."), "clientIdAndKey"),
|
||||||
"clientIdAndKey"),
|
|
||||||
QCommandLineOption({ "s", "serverType" },
|
QCommandLineOption({ "s", "serverType" },
|
||||||
QCoreApplication::translate("networkvatlib", "FSD server type. Possible values: vatsim, fsd"),
|
QCoreApplication::translate("networkvatlib", "FSD server type. Possible values: vatsim, fsd"), "serverType")
|
||||||
"serverType")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// only in not officially shipped versions
|
// only in not officially shipped versions
|
||||||
@@ -701,7 +699,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower();
|
QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower();
|
||||||
if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; }
|
if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; }
|
||||||
auto stringList = clientIdAndKey.split(':');
|
const auto stringList = clientIdAndKey.split(':');
|
||||||
QString clientIdAsString = stringList[0];
|
QString clientIdAsString = stringList[0];
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
id = clientIdAsString.toInt(&ok, 0);
|
id = clientIdAsString.toInt(&ok, 0);
|
||||||
@@ -712,19 +710,19 @@ namespace BlackCore
|
|||||||
|
|
||||||
bool CNetworkVatlib::getCmdLineServerType(VatServerType &serverType) const
|
bool CNetworkVatlib::getCmdLineServerType(VatServerType &serverType) const
|
||||||
{
|
{
|
||||||
QString serverTypeAsString = sApp->getParserValue("serverType").toLower();
|
QString serverTypeAsString = sApp->getParserValue("serverType").toLower();
|
||||||
if(QString::compare(serverTypeAsString, "vatsim", Qt::CaseInsensitive) == 0)
|
if (QString::compare(serverTypeAsString, "vatsim", Qt::CaseInsensitive) == 0)
|
||||||
{
|
{
|
||||||
serverType = vatServerVatsim;
|
serverType = vatServerVatsim;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(QString::compare(serverTypeAsString, "fsd", Qt::CaseInsensitive) == 0)
|
if (QString::compare(serverTypeAsString, "fsd", Qt::CaseInsensitive) == 0)
|
||||||
{
|
{
|
||||||
serverType = vatServerLegacyFsd;
|
serverType = vatServerLegacyFsd;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendCustomFsinnQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendCustomFsinnQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Aviation
|
namespace Aviation
|
||||||
{
|
{
|
||||||
|
|
||||||
CAltitude::CAltitude(const QString &altitudeAsString, BlackMisc::PhysicalQuantities::CPqString::SeparatorMode mode) : CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::m()), m_datum(MeanSeaLevel)
|
CAltitude::CAltitude(const QString &altitudeAsString, BlackMisc::PhysicalQuantities::CPqString::SeparatorMode mode) : CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::m()), m_datum(MeanSeaLevel)
|
||||||
{
|
{
|
||||||
this->parseFromString(altitudeAsString, mode);
|
this->parseFromString(altitudeAsString, mode);
|
||||||
@@ -111,6 +110,5 @@ namespace BlackMisc
|
|||||||
static const CAltitude null(0, CAltitude::MeanSeaLevel, CLengthUnit::nullUnit());
|
static const CAltitude null(0, CAltitude::MeanSeaLevel, CLengthUnit::nullUnit());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Aviation
|
namespace Aviation
|
||||||
{
|
{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Altitude as used in aviation, can be AGL or MSL altitude
|
* Altitude as used in aviation, can be AGL or MSL altitude
|
||||||
* \remarks Intentionally allowing +/- CLength , and >= / <= CLength.
|
* \remarks Intentionally allowing +/- CLength , and >= / <= CLength.
|
||||||
|
|||||||
Reference in New Issue
Block a user