Skip to content

Commit 52a727d

Browse files
committed
fix: Fix errors from pull request
Co-authored-by: Lars Toenning <dev@ltoenning.de>
1 parent 5951f75 commit 52a727d

22 files changed

+31
-86
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,4 @@ cmake-build-*/
5151
/out/
5252
/dist/
5353
CMakeUserPresets.json
54-
/third_party/externals
55-
/src/plugins/simulator/msfs2024/simulatormsfs2024.cpp_
56-
/src/plugins/simulator/msfs2024/simulatormsfs2024.h_
54+
/third_party/externals

src/core/airspacemonitor.cpp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,6 @@ namespace swift::core
787787
}
788788
}
789789

790-
// for request
791-
// #SBBER750:DAL483:FSIPIR:0:BER:A320:::::L2J:PMDG 737-800 AIRBERLIN (D-ABKM)
792-
// and also for information
793-
// #SBFSC751 : BER636 : FSIPI : 0 ::EC35:: :: : H2T : AIRBUS H135 NORSK LUFTAMBULANSE
794790
void CAirspaceMonitor::onCustomFSInnPacketReceived(const CCallsign &callsign, const QString &airlineIcaoDesignator,
795791
const QString &aircraftIcaoDesignator,
796792
const QString &combinedAircraftType, const QString &modelString)
@@ -865,16 +861,15 @@ namespace swift::core
865861
// in order not to override swift livery string data, we ignore those
866862
if (!usedModelString.isEmpty())
867863
{
868-
const CSimulatedAircraft aircraft = this->addOrUpdateAircraftInRange(
869-
callsign, aircraftIcaoDesignator, airlineIcaoDesignator, QString(), usedModelString,
870-
CAircraftModel::TypeFSInnData, pReverseLookupMessages);
864+
this->addOrUpdateAircraftInRange(callsign, aircraftIcaoDesignator, airlineIcaoDesignator, QString(),
865+
usedModelString, CAircraftModel::TypeFSInnData,
866+
pReverseLookupMessages);
871867
this->addReverseLookupMessages(callsign, reverseLookupMessages);
872868
}
873869
this->sendReadyForModelMatching(callsign, ReceivedFsInnPacket); // from FSInn
874870
}
875871
}
876872

877-
// #SBDAL483:BER636:PI:GEN:EQUIPMENT=B738:AIRLINE=DAL:LIVERY=swift_l1855a1787m13853
878873
void CAirspaceMonitor::onIcaoCodesReceived(const CCallsign &callsign, const QString &aircraftIcaoDesignator,
879874
const QString &airlineIcaoDesignator, const QString &livery)
880875
{
@@ -1227,14 +1222,6 @@ namespace swift::core
12271222
// we do not change manually assigned models (msfs2024)
12281223
if (!aircraft.getModel().hasValidDbKey() && aircraft.getModelType() != CAircraftModel::TypeManuallySet)
12291224
{
1230-
1231-
CLogMessage(this).warning(u"CAirspaceMonitor::reverseLookupModelWithFlightplanData "
1232-
u"aircraft.getModelType %1 "
1233-
u"callsign %2 "
1234-
u"aircraftIcao %3 "
1235-
u"incomming modelType %4 ")
1236-
<< aircraft.getModelType() << callsign.toQString() << aircraftIcao << modelType;
1237-
12381225
CAircraftModel model = this->reverseLookupModelWithFlightplanData(callsign, aircraftIcao, airlineIcao,
12391226
livery, modelString, modelType, log);
12401227
model.updateMissingParts(aircraft.getModel());

src/core/modelsetbuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace swift::core
4949
}
5050
else
5151
{
52-
if (!options.testFlag(ShowAllInstalledModells))
52+
if (!options.testFlag(ShowAllInstalledModels))
5353
// without any information we can not use them
5454
modelSet = modelSet.findWithKnownAircraftDesignator();
5555
}

src/core/modelsetbuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace swift::core
3535
Incremental = 1 << 3,
3636
SortByDistributors = 1 << 4,
3737
ConsolidateWithDb = 1 << 5,
38-
ShowAllInstalledModells = 1 << 6,
38+
ShowAllInstalledModels = 1 << 6,
3939
};
4040
Q_DECLARE_FLAGS(Builder, BuilderFlag)
4141

src/gui/components/dbownmodelscomponent.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ namespace swift::gui::components
9797
ui->tvp_OwnAircraftModels->setCustomMenu(new CConsolidateWithDbDataMenu(ui->tvp_OwnAircraftModels, this));
9898
}
9999

100-
CDbOwnModelsComponent::~CDbOwnModelsComponent()
101-
{
102-
// void
103-
}
100+
CDbOwnModelsComponent::~CDbOwnModelsComponent() = default;
104101

105102
const QStringList &CDbOwnModelsComponent::getLogCategories()
106103
{
@@ -282,7 +279,7 @@ namespace swift::gui::components
282279
QStringLiteral("Completely reload '%1' models from disk?").arg(simulator.toQString(true)),
283280
QMessageBox::Yes | QMessageBox::No, this);
284281
msgBox.setDefaultButton(QMessageBox::Cancel);
285-
const QMessageBox::StandardButton reply = static_cast<QMessageBox::StandardButton>(msgBox.exec());
282+
const auto reply = static_cast<QMessageBox::StandardButton>(msgBox.exec());
286283
if (reply != QMessageBox::Yes) { return; }
287284

288285
this->requestSimulatorModels(simulator, IAircraftModelLoader::InBackgroundNoCache);
@@ -513,7 +510,7 @@ namespace swift::gui::components
513510
"override the loaded models from the simulator.\nNormally you would not want that (cancel).",
514511
QMessageBox::Save | QMessageBox::Cancel, this);
515512
msgBox.setDefaultButton(QMessageBox::Cancel);
516-
const QMessageBox::StandardButton reply = static_cast<QMessageBox::StandardButton>(msgBox.exec());
513+
const auto reply = static_cast<QMessageBox::StandardButton>(msgBox.exec());
517514
if (reply != QMessageBox::Cancel) { return; }
518515
const CAircraftModelList models = ui->tvp_OwnAircraftModels->container();
519516
if (models.isEmpty()) { return; }

src/gui/components/logincomponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace swift::gui::components
136136
});
137137
}
138138

139-
CLoginComponent::~CLoginComponent() {}
139+
CLoginComponent::~CLoginComponent() = default;
140140

141141
void CLoginComponent::mainInfoAreaChanged(const QWidget *currentWidget)
142142
{
@@ -313,7 +313,7 @@ namespace swift::gui::components
313313

314314
void CLoginComponent::onSimulatorStatusChanged(int status)
315315
{
316-
ISimulator::SimulatorStatus s = static_cast<ISimulator::SimulatorStatus>(status);
316+
auto s = static_cast<ISimulator::SimulatorStatus>(status);
317317
if (!this->hasValidContexts()) { return; }
318318
m_simulatorConnected = s.testFlag(ISimulator::Connected);
319319
this->updateUiConnectState();

src/misc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ add_library(misc SHARED
682682
weather/windlayer.h
683683
weather/windlayerlist.cpp
684684
weather/windlayerlist.h
685-
)
685+
)
686686

687687
if(APPLE)
688688
target_sources(misc PRIVATE

src/misc/simulation/aircraftmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ namespace swift::misc::simulation
245245
return this->getAllModelStringsAndAliases() % " " % this->getDbKeyAsStringInParentheses();
246246
}
247247

248-
QString CAircraftModel::getMsfs2024Modelstring()
248+
QString CAircraftModel::getMsfs2024ModelString()
249249
{
250250
m_modelString = m_modelString.trimmed().toUpper() % u" " % m_modelLivery.trimmed().toUpper();
251251
return m_modelString;

src/misc/simulation/aircraftmodel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ namespace swift::misc
211211
QString getAllModelStringsAliasesAndDbKey() const;
212212

213213
//! Get model string and Livery
214-
QString getMsfs2024Modelstring();
214+
QString getMsfs2024ModelString();
215215

216216
//! Model string alias
217217
void setModelStringAlias(const QString &alias) { m_modelStringAlias = alias.trimmed().toUpper(); }

src/misc/simulation/msfs2024/aircraftmodelloadermsfs2024.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace swift::misc::simulation::msfs2024
2929
bool CAircraftModelLoaderMsfs2024::isLoadingFinished() const
3030
{
3131
return !m_parserWorker || m_parserWorker->isFinished();
32-
;
32+
3333
}
3434

3535
CAircraftModelLoaderMsfs2024::CAircraftModelLoaderMsfs2024(QObject *parent)

0 commit comments

Comments
 (0)