mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
[FSD] Style and minor fix, check for network ICAO 1st and not for simulator model (correct display)
This commit is contained in:
committed by
Mat Sutcliffe
parent
ff2ab95367
commit
e9f8be013c
@@ -29,8 +29,8 @@ namespace BlackCore
|
||||
{
|
||||
QStringList pairs;
|
||||
if (!m_aircraft.isEmpty()) { pairs << QString("EQUIPMENT=" + m_aircraft); }
|
||||
if (!m_airline.isEmpty()) { pairs << QString("AIRLINE=" + m_airline); }
|
||||
if (!m_livery.isEmpty()) { pairs << QString("LIVERY=" + m_livery); }
|
||||
if (!m_airline.isEmpty()) { pairs << QString("AIRLINE=" + m_airline); }
|
||||
if (!m_livery.isEmpty()) { pairs << QString("LIVERY=" + m_livery); }
|
||||
|
||||
QStringList tokens;
|
||||
tokens.push_back(m_sender);
|
||||
@@ -47,7 +47,7 @@ namespace BlackCore
|
||||
{
|
||||
BlackMisc::CLogMessage(static_cast<PlaneInformation *>(nullptr)).debug(u"Wrong number of arguments.");
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
QString aircraft;
|
||||
QString airline;
|
||||
@@ -55,12 +55,12 @@ namespace BlackCore
|
||||
|
||||
for (int i = 4; i < tokens.size(); ++i)
|
||||
{
|
||||
QStringList pair = tokens.at(i).split("=");
|
||||
const QStringList pair = tokens.at(i).split("=");
|
||||
if (pair.size() == 2)
|
||||
{
|
||||
if (pair[0] == QLatin1String("EQUIPMENT")) { aircraft = pair[1]; }
|
||||
else if (pair[0] == QLatin1String("AIRLINE")) { airline = pair[1]; }
|
||||
else if (pair[0] == QLatin1String("LIVERY")) { livery = pair[1]; }
|
||||
if (pair[0] == QLatin1String("EQUIPMENT")) { aircraft = pair[1]; }
|
||||
else if (pair[0] == QLatin1String("AIRLINE")) { airline = pair[1]; }
|
||||
else if (pair[0] == QLatin1String("LIVERY")) { livery = pair[1]; }
|
||||
}
|
||||
}
|
||||
return PlaneInformation(tokens[0], tokens[1], aircraft, airline, livery);
|
||||
|
||||
Reference in New Issue
Block a user