Formatting

This commit is contained in:
Klaus Basan
2018-05-16 21:15:34 +02:00
parent ba8b9a52da
commit afe4a09218
9 changed files with 17 additions and 21 deletions

View File

@@ -133,10 +133,10 @@ namespace BlackCore
static void registerHelp()
{
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::CContextSimulator")) { return; }
BlackMisc::CSimpleCommandParser::registerCommand({".ris", "rendering/interpolation setup"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris show", "display rendering/interpolation setup on console"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris debug on|off", "rendering/interpolation debug messages"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris parts on|off", "aircraft parts"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris", "rendering/interpolation setup (global setup)"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris show", "display rendering/interpolation setup on console (global setup)"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris debug on|off", "rendering/interpolation debug messages (global setup)"});
BlackMisc::CSimpleCommandParser::registerCommand({".ris parts on|off", "aircraft parts (global setup)"});
}
signals:

View File

@@ -88,7 +88,7 @@ namespace BlackCore
//! Is time synchronization on?
virtual bool isTimeSynchronized() const = 0;
//! Get the setup (simulator environemnt)
//! Get the setup (simulator environment)
virtual const BlackMisc::Simulation::CSimulatorInternals &getSimulatorInternals() const = 0;
//! Connect to simulator

View File

@@ -223,7 +223,7 @@ namespace BlackCore
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics update time
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log interpolation
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log.interpolation
QMap<BlackMisc::Aviation::CCallsign, qint64> m_clampedLogMsg; //!< when logged last so there, can be used so there is no log message overflow
// some optional functionality which can be used by the simulators as needed

View File

@@ -168,11 +168,8 @@ namespace BlackGui
CVariant CGuiUtility::fromSwiftDragAndDropData(const QMimeData *mime)
{
if (hasSwiftVariantMimeType(mime))
{
return fromSwiftDragAndDropData(mime->data(swiftJsonDragAndDropMimeType()));
}
return CVariant();
if (!hasSwiftVariantMimeType(mime)) { return CVariant(); }
return CGuiUtility::fromSwiftDragAndDropData(mime->data(swiftJsonDragAndDropMimeType()));
}
CVariant CGuiUtility::fromSwiftDragAndDropData(const QByteArray &utf8Data)

View File

@@ -342,9 +342,9 @@ namespace BlackMisc
}
}
bool CRemoteAircraftProvider::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRedering)
bool CRemoteAircraftProvider::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRendering)
{
const CPropertyIndexVariantMap vm(CSimulatedAircraft::IndexEnabled, CVariant::fromValue(enabledForRedering));
const CPropertyIndexVariantMap vm(CSimulatedAircraft::IndexEnabled, CVariant::fromValue(enabledForRendering));
const int c = this->updateAircraftInRange(callsign, vm);
return c > 0;
}

View File

@@ -256,7 +256,7 @@ namespace BlackMisc
virtual bool isRemoteAircraftSupportingParts(const Aviation::CCallsign &callsign) const override;
virtual int getRemoteAircraftSupportingPartsCount() const override;
virtual Aviation::CCallsignSet remoteAircraftSupportingParts() const override;
virtual bool updateAircraftEnabled(const Aviation::CCallsign &callsign, bool enabledForRedering) override;
virtual bool updateAircraftEnabled(const Aviation::CCallsign &callsign, bool enabledForRendering) override;
virtual bool updateAircraftModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
virtual bool updateAircraftNetworkModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
virtual bool updateFastPositionEnabled(const Aviation::CCallsign &callsign, bool enableFastPositonUpdates) override;

View File

@@ -162,13 +162,13 @@ namespace BlackMisc
{
// Remark: Names "type" and "value" are also used for drag and drop
// Changing the names here requires the change for drag and drop too
QJsonValue typeValue = json.value("type");
const QJsonValue typeValue = json.value("type");
if (typeValue.isUndefined()) { throw CJsonException("Missing 'type'"); }
QString typeName = typeValue.toString();
const QString typeName = typeValue.toString();
if (typeName.isEmpty()) { m_v.clear(); return; }
int typeId = QMetaType::type(qPrintable(typeName));
const int typeId = QMetaType::type(qPrintable(typeName));
QJsonValue value = json.value("value");
const QJsonValue value = json.value("value");
if (value.isUndefined()) { throw CJsonException("Missing 'value'"); }
switch (typeId)
{

View File

@@ -23,5 +23,5 @@ namespace BlackSimPlugin
{
return new CSimulatorEmulatedConfigWidget(parent);
}
}
}
} // ns
} // ns