From 61e7f238472583130020f631ff28a158763f4d56 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 12 Jan 2017 18:10:45 +0100 Subject: [PATCH] refs #858, todo review (demoted, commented) --- src/blackcore/vatsim/networkvatlib.cpp | 12 ++++++------ src/blackgui/components/dbmappingcomponent.cpp | 2 +- src/blackgui/components/dbmappingcomponent.h | 2 +- .../components/settingssimulatorbasicscomponent.cpp | 2 +- src/blackgui/enableforframelesswindow.cpp | 2 +- src/blackgui/menus/menuaction.cpp | 2 -- src/blackmisc/simulation/aircraftmodelloader.cpp | 2 +- src/blackmisc/simulation/simulatorinfo.cpp | 5 +++-- src/plugins/simulator/fscommon/fsuipc.cpp | 9 ++++----- .../simulator/fsx/simulatorfsxsimconnectproc.cpp | 3 +-- tests/blackcore/testnetwork.cpp | 3 ++- 11 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/blackcore/vatsim/networkvatlib.cpp b/src/blackcore/vatsim/networkvatlib.cpp index 8f7484df4..8f487bed8 100644 --- a/src/blackcore/vatsim/networkvatlib.cpp +++ b/src/blackcore/vatsim/networkvatlib.cpp @@ -181,7 +181,7 @@ namespace BlackCore { // Normal / Stealth mode VatPilotPosition pos; - // TODO: we need to distinguish true and pressure altitude + //! \fixme we need to distinguish true and pressure altitude pos.altitudePressure = myAircraft.getAltitude().value(CLengthUnit::ft()); pos.altitudeTrue = myAircraft.getAltitude().value(CLengthUnit::ft()); pos.heading = myAircraft.getHeading().value(CAngleUnit::deg()); @@ -353,7 +353,7 @@ namespace BlackCore VatSimType CNetworkVatlib::convertToSimType(CSimulatorPluginInfo &simInfo) { - /* TODO Define recognized simulators somewhere */ + //! \fixme Define recognized simulators somewhere */ if (simInfo.getSimulator() == "fs9" || simInfo.getSimulator() == "fsx") { return vatSimTypeMSCFS; @@ -401,7 +401,7 @@ namespace BlackCore m_ownAircraftIcaoCode = ownAircraft.getAircraftIcaoCode(); m_ownAirlineIcaoCode = ownAircraft.getAirlineIcaoCode(); m_ownLiveryDescription = ownAircraft.getLivery().getDescription(); - updateOwnIcaoCodes(m_ownAircraftIcaoCode, m_ownAirlineIcaoCode); // \todo livery? + updateOwnIcaoCodes(m_ownAircraftIcaoCode, m_ownAirlineIcaoCode); } void CNetworkVatlib::presetLoginMode(LoginMode mode) @@ -438,7 +438,7 @@ namespace BlackCore VatPilotConnection info; info.callsign = callsign.data(); info.name = name.data(); - info.rating = vatPilotRatingStudent; //TODO + info.rating = vatPilotRatingStudent; // as documented, expected to be vatPilotRatingStudent only info.simType = convertToSimType(m_simulatorInfo); Vat_SpecifyPilotLogon(m_net.data(), toFSD(m_server.getAddress()), m_server.getPort(), toFSD(m_server.getUser().getId()), @@ -1014,8 +1014,8 @@ namespace BlackCore const QString fixed = cbvar_cast(cbvar)->fromFSD(atis->textLines[i]).trimmed(); if (! fixed.isEmpty()) { - // detect the stupid z1, z2, z3 placeholders - // TODO: Anything better as this stupid code here? + // detect the stupid z1, z2, z3 placeholders + //! \fixme: Anything better as this stupid code here? const QString test = fixed.toLower().remove(QRegExp("[\\n\\t\\r]")); if (test == "z") return; if (test.startsWith("z") && test.length() == 2) return; // z1, z2, .. diff --git a/src/blackgui/components/dbmappingcomponent.cpp b/src/blackgui/components/dbmappingcomponent.cpp index c286128ba..757341248 100644 --- a/src/blackgui/components/dbmappingcomponent.cpp +++ b/src/blackgui/components/dbmappingcomponent.cpp @@ -914,7 +914,7 @@ namespace BlackGui // Currently disabled as the same effect can be realized by filtering than // this->addRemoveDbModels(menuActions); - //! \todo remove if not needed in the long term (added 2016-Sep) + // remove if not needed in the long term (added 2016-Sep) this->m_autoStashing = menuActions.addAction(this->m_autoStashing, CIcons::appDbStash16(), "Auto stashing", CMenuAction::pathStash(), this, { mapComp, &CDbMappingComponent::ps_displayAutoStashingDialog }); this->m_autoSimulatorStashing = menuActions.addAction(this->m_autoSimulatorStashing, CIcons::appDbStash16(), "Cross simulator updating (FSX-P3D-FS9)", CMenuAction::pathStash(), this, { mapComp, &CDbMappingComponent::ps_displayAutoSimulatorStashingDialog }); diff --git a/src/blackgui/components/dbmappingcomponent.h b/src/blackgui/components/dbmappingcomponent.h index f6ae851d5..0e7f9f8ea 100644 --- a/src/blackgui/components/dbmappingcomponent.h +++ b/src/blackgui/components/dbmappingcomponent.h @@ -319,7 +319,7 @@ namespace BlackGui //! Workaround to format vPilot view //! \remark presize does not work properly when data are loaded, reason is not understood. This here does a formatting when tab becomes visible. - //! \todo can be removed whenever a proper formatting is archived with data loading + //! \fixme can be removed whenever a proper formatting is archived with data loading, vPilot support will be removed in the long term anyway void formatVPilotView(); //! Model for given index from sender/current view diff --git a/src/blackgui/components/settingssimulatorbasicscomponent.cpp b/src/blackgui/components/settingssimulatorbasicscomponent.cpp index 631bad1ac..f5acaf516 100644 --- a/src/blackgui/components/settingssimulatorbasicscomponent.cpp +++ b/src/blackgui/components/settingssimulatorbasicscomponent.cpp @@ -230,7 +230,7 @@ namespace BlackGui } else { - //! \todo correct version when multiline placeholder is fixed + //! \todo correct version when Qt multiline placeholder is fixed https://bugreports.qt.io/browse/QTBUG-43817 // const QString es(e.join('\n')); // ui->pte_ExcludeDirectories->setPlaceholderText(es); diff --git a/src/blackgui/enableforframelesswindow.cpp b/src/blackgui/enableforframelesswindow.cpp index 4a18a2f92..bb6fa6f57 100644 --- a/src/blackgui/enableforframelesswindow.cpp +++ b/src/blackgui/enableforframelesswindow.cpp @@ -121,7 +121,7 @@ namespace BlackGui // Qt::WA_PaintOnScreen leads to a warning // setMask(QRegion(10, 10, 10, 10) would work, but requires "complex" calcs for rounded corners - //! \todo Transparent widget, try out void QWidget::setMask + //! \fixme further improve transparent widget, try out void QWidget::setMask this->setDynamicProperties(frameless); } diff --git a/src/blackgui/menus/menuaction.cpp b/src/blackgui/menus/menuaction.cpp index 4fcbfea3a..44eb358f1 100644 --- a/src/blackgui/menus/menuaction.cpp +++ b/src/blackgui/menus/menuaction.cpp @@ -191,8 +191,6 @@ namespace BlackGui Q_ASSERT_X(exisitingMenu.size() > 1, Q_FUNC_INFO, "Redundant menu entries"); Q_ASSERT_X(existingAction.getTitle() != title, Q_FUNC_INFO, "Title mismatch"); if (icon.isNull() || existingAction.hasIcon()) { return existingAction.getQAction(); } - - //! \todo replace if we have icon now, but not before return existingAction; } diff --git a/src/blackmisc/simulation/aircraftmodelloader.cpp b/src/blackmisc/simulation/aircraftmodelloader.cpp index 941c7a8d9..5ae8083e5 100644 --- a/src/blackmisc/simulation/aircraftmodelloader.cpp +++ b/src/blackmisc/simulation/aircraftmodelloader.cpp @@ -135,7 +135,7 @@ namespace BlackMisc } else if (useCachedData && mode.testFlag(CacheUntilNewer)) { - //! \todo currently too slow, does not make sense with that overhead + //! \todo currently too slow with remote files, does not make sense with that overhead if (!this->areModelFilesUpdated()) { emit loadingFinished(true, this->getSimulator()); diff --git a/src/blackmisc/simulation/simulatorinfo.cpp b/src/blackmisc/simulation/simulatorinfo.cpp index 212fea368..d1e126db1 100644 --- a/src/blackmisc/simulation/simulatorinfo.cpp +++ b/src/blackmisc/simulation/simulatorinfo.cpp @@ -203,11 +203,11 @@ namespace BlackMisc const CSimulatorInfo CSimulatorInfo::getLocallyInstalledSimulators() { - //! \todo add XP, ... CSimulatorInfo sim; bool fs9 = false; bool fsx = false; bool p3d = false; + bool xp = false; if (CBuildConfig::isRunningOnWindowsNtPlatform()) { @@ -224,7 +224,8 @@ namespace BlackMisc !CFsCommonUtil::p3dDir().isEmpty() && !CFsCommonUtil::p3dSimObjectsDir().isEmpty(); } - bool xp = true; //! \todo XP resolution + + xp = true; //! \todo XP resolution for locally installed simulator sim.setSimulator(CSimulatorInfo::boolToFlag(fsx, fs9, xp, p3d)); return sim; diff --git a/src/plugins/simulator/fscommon/fsuipc.cpp b/src/plugins/simulator/fscommon/fsuipc.cpp index 4f1f84d8a..6f6509903 100644 --- a/src/plugins/simulator/fscommon/fsuipc.cpp +++ b/src/plugins/simulator/fscommon/fsuipc.cpp @@ -89,7 +89,8 @@ namespace BlackSimPlugin if (!this->isConnected()) { return false; } Q_UNUSED(aircraft); - //! \todo FSUIPC write values + + //! \fixme FSUIPC write values not yet implemented return false; } @@ -97,8 +98,7 @@ namespace BlackSimPlugin { if (!this->isConnected()) { return false; } - clearAllWeather(); - + this->clearAllWeather(); CGridPoint gridPoint = weatherGrid.front(); NewWeather nw; @@ -157,7 +157,6 @@ namespace BlackSimPlugin for (const auto &cloudLayer : cloudLayers) { NewCloud cloud; - switch (cloudLayer.getCoverage()) { case CCloudLayer::None: cloud.Coverage = 0; break; @@ -329,7 +328,7 @@ namespace BlackSimPlugin // Mode by SB3 if (xpdrIdentSb3Raw != 0) { - //! \todo Reset value for FSUIPC + //! \fixme Reset value for FSUIPC xpdr.setTransponderMode(CTransponder::StateIdent); } else diff --git a/src/plugins/simulator/fsx/simulatorfsxsimconnectproc.cpp b/src/plugins/simulator/fsx/simulatorfsxsimconnectproc.cpp index 071b08463..21b3b9d6b 100644 --- a/src/plugins/simulator/fsx/simulatorfsxsimconnectproc.cpp +++ b/src/plugins/simulator/fsx/simulatorfsxsimconnectproc.cpp @@ -267,8 +267,7 @@ namespace BlackSimPlugin SIMCONNECT_RECV_CLIENT_DATA *clientData = (SIMCONNECT_RECV_CLIENT_DATA *)pData; if (simulatorFsx->m_useSbOffsets && clientData->dwRequestID == CSimConnectDefinitions::RequestSbData) { - //! \todo why is offset 19 ident 2/0 ? - //! In FSUIPC it is 0/1, according to documentation it is 0/1 but I receive 2/0 here + //! \fixme FSUIPC vs SimConnect why is offset 19 ident 2/0? In FSUIPC it is 0/1, according to documentation it is 0/1 but I receive 2/0 here. Whoever knows, add comment or fix if wrong DataDefinitionClientAreaSb *sbData = (DataDefinitionClientAreaSb *) &clientData->dwData; simulatorFsx->updateOwnAircraftFromSimulator(*sbData); } diff --git a/tests/blackcore/testnetwork.cpp b/tests/blackcore/testnetwork.cpp index ca6f1031a..3f17791b4 100644 --- a/tests/blackcore/testnetwork.cpp +++ b/tests/blackcore/testnetwork.cpp @@ -68,7 +68,8 @@ namespace BlackCoreTest }) .expect(&INetwork::connectionStatusChanged, [](INetwork::ConnectionStatus, INetwork::ConnectionStatus newStatus) { - //! \todo verify how we want to handle the situation if the connect fails. On Jenkins that would cause a failed test case and hence a failed build + // we skip the test at the beginning if the server cannot be reached + // otherwise the whole build on Jenkins may fail QVERIFY(newStatus == INetwork::Connected); qDebug() << "CONNECTED"; })