Ref T348, style

This commit is contained in:
Klaus Basan
2018-09-14 00:13:06 +02:00
parent 13ebf6bafe
commit 849bc0b9d0
4 changed files with 30 additions and 30 deletions

View File

@@ -55,14 +55,14 @@ namespace BlackGui
QTimer::singleShot(1000, this, [ = ] QTimer::singleShot(1000, this, [ = ]
{ {
if (!sGui || sGui->isShuttingDown()) { return; } if (!sGui || sGui->isShuttingDown()) { return; }
if (myself.isNull()) { return; } if (!myself) { return; }
this->onModeChanged(); this->onModeChanged();
}); });
QTimer::singleShot(30 * 1000, this, [ = ] QTimer::singleShot(30 * 1000, this, [ = ]
{ {
if (!sGui || sGui->isShuttingDown()) { return; } if (!sGui || sGui->isShuttingDown()) { return; }
if (myself.isNull()) { return; } if (!myself) { return; }
this->onSetupChanged(); this->onSetupChanged();
}); });
} }
@@ -140,7 +140,7 @@ namespace BlackGui
const QPointer<CInterpolationSetupComponent> myself(this); const QPointer<CInterpolationSetupComponent> myself(this);
QTimer::singleShot(250, this, [ = ] QTimer::singleShot(250, this, [ = ]
{ {
if (myself.isNull()) { return; } if (!myself) { return; }
this->reloadSetup(); this->reloadSetup();
}); });
} }
@@ -166,7 +166,7 @@ namespace BlackGui
const QPointer<CInterpolationSetupComponent> myself(this); const QPointer<CInterpolationSetupComponent> myself(this);
QTimer::singleShot(250, this, [ = ] QTimer::singleShot(250, this, [ = ]
{ {
if (myself.isNull()) { return; } if (!myself) { return; }
this->displaySetupsPerCallsign(); this->displaySetupsPerCallsign();
}); });
} }
@@ -186,7 +186,7 @@ namespace BlackGui
const QPointer<CInterpolationSetupComponent> myself(this); const QPointer<CInterpolationSetupComponent> myself(this);
QTimer::singleShot(100, this, [ = ] QTimer::singleShot(100, this, [ = ]
{ {
if (myself.isNull()) { return; } if (!myself) { return; }
this->displaySetupsPerCallsign(); this->displaySetupsPerCallsign();
}); });
} }
@@ -220,7 +220,7 @@ namespace BlackGui
{ {
if (showOverlay) if (showOverlay)
{ {
const CStatusMessage m = CStatusMessage(this).validationError("No simulator avialable"); const CStatusMessage m = CStatusMessage(this).validationError("No simulator available");
this->showOverlayMessage(m); this->showOverlayMessage(m);
} }
return false; return false;

View File

@@ -68,52 +68,52 @@ namespace BlackMisc
CAircraftCfgEntries(const QString &filePath, int index, const QString &title, const QString &atcType, const QString &atcModel, const QString &atcParkingCode, const QString &description); CAircraftCfgEntries(const QString &filePath, int index, const QString &title, const QString &atcType, const QString &atcModel, const QString &atcParkingCode, const QString &description);
//! File name //! File name
const QString &getFileName() const { return this->m_fileName; } const QString &getFileName() const { return m_fileName; }
//! Directory of entry //! Directory of entry
QString getFileDirectory() const; QString getFileDirectory() const;
//! Title //! Title
const QString &getTitle() const { return this->m_title; } const QString &getTitle() const { return m_title; }
//! Index //! Index
int getIndex() const { return this->m_index; } int getIndex() const { return m_index; }
//! ATC model //! ATC model
const QString &getAtcModel() const { return this->m_atcModel; } const QString &getAtcModel() const { return m_atcModel; }
//! ATC type //! ATC type
const QString &getAtcType() const { return this->m_atcType; } const QString &getAtcType() const { return m_atcType; }
//! ATC airline //! ATC airline
const QString &getAtcAirline() const { return this->m_atcAirline; } const QString &getAtcAirline() const { return m_atcAirline; }
//! ATC id color (e.g. 0xffffffff) //! ATC id color (e.g. 0xffffffff)
const QString &getAtcIdColor() const { return this->m_atcIdColor; } const QString &getAtcIdColor() const { return m_atcIdColor; }
//! Sim name //! Sim name
const QString &getSimName() const { return this->m_simName; } const QString &getSimName() const { return m_simName; }
//! Description //! Description
const QString &getDescription() const { return this->m_description; } const QString &getDescription() const { return m_description; }
//! ATC parking code //! ATC parking code
const QString &getAtcParkingCode() const { return this->m_atcParkingCode; } const QString &getAtcParkingCode() const { return m_atcParkingCode; }
//! UI type (e.g. A321-231 IAE) //! UI type (e.g. A321-231 IAE)
const QString &getUiType() const { return this->m_uiType; } const QString &getUiType() const { return m_uiType; }
//! UI variation (e.g. White,Green) //! UI variation (e.g. White,Green)
const QString &getUiVariation() const { return this->m_uiVariation; } const QString &getUiVariation() const { return m_uiVariation; }
//! UI manufacturer (e.g. Airbus) //! UI manufacturer (e.g. Airbus)
const QString &getUiManufacturer() const { return this->m_uiManufacturer; } const QString &getUiManufacturer() const { return m_uiManufacturer; }
//! Texture //! Texture
const QString &getTexture() const { return this->m_texture; } const QString &getTexture() const { return m_texture; }
//! Created by //! Created by
const QString &getCreatedBy() const { return this->m_createdBy; } const QString &getCreatedBy() const { return m_createdBy; }
//! Is Rotorcraft? //! Is Rotorcraft?
bool isRotorcraft() const { return m_rotorcraft; } bool isRotorcraft() const { return m_rotorcraft; }
@@ -128,7 +128,7 @@ namespace BlackMisc
void setTitle(const QString &title); void setTitle(const QString &title);
//! Index //! Index
void setIndex(int index) { this->m_index = index; } void setIndex(int index) { m_index = index; }
//! ATC model //! ATC model
void setAtcModel(const QString &atcModel); void setAtcModel(const QString &atcModel);
@@ -143,7 +143,7 @@ namespace BlackMisc
void setAtcAirline(const QString &airline); void setAtcAirline(const QString &airline);
//! ATC color (e.g. 0xffffffff) //! ATC color (e.g. 0xffffffff)
void setAtcIdColor(const QString &color) { this->m_atcIdColor = color.trimmed(); } void setAtcIdColor(const QString &color) { m_atcIdColor = color.trimmed(); }
//! Simulator name //! Simulator name
void setSimName(const QString &simName); void setSimName(const QString &simName);
@@ -161,10 +161,10 @@ namespace BlackMisc
void setUiType(const QString &type); void setUiType(const QString &type);
//! UI variation (e.g. White,Green) //! UI variation (e.g. White,Green)
void setUiVariation(const QString &variation) { this->m_uiVariation = variation.trimmed(); } void setUiVariation(const QString &variation) { m_uiVariation = variation.trimmed(); }
//! UI manufacturer (e.g. Airbus) //! UI manufacturer (e.g. Airbus)
void setUiManufacturer(const QString &manufacturer) { this->m_uiManufacturer = manufacturer.trimmed(); } void setUiManufacturer(const QString &manufacturer) { m_uiManufacturer = manufacturer.trimmed(); }
//! Is Rotorcraft? //! Is Rotorcraft?
void setRotorcraft(bool isRotorcraft) { m_rotorcraft = isRotorcraft; } void setRotorcraft(bool isRotorcraft) { m_rotorcraft = isRotorcraft; }

View File

@@ -56,10 +56,10 @@ namespace BlackSimPlugin
CSimulatorFsxCommon *CFsxSettingsComponent::getFsxSimulator() const CSimulatorFsxCommon *CFsxSettingsComponent::getFsxSimulator() const
{ {
if (!sGui || !sGui->getISimulator() || sGui->isShuttingDown()) { return nullptr; } if (!sGui || !sGui->getISimulator() || sGui->isShuttingDown()) { return nullptr; }
ISimulator *sim = sGui->getISimulator(); ISimulator *simulator = sGui->getISimulator();
if (!sim->getSimulatorInfo().isFsxP3DFamily()) { return nullptr; } if (!simulator->getSimulatorInfo().isFsxP3DFamily()) { return nullptr; }
if (sim->getSimulatorInfo() != m_simulator) { return nullptr; } if (simulator->getSimulatorInfo() != m_simulator) { return nullptr; }
CSimulatorFsxCommon *fsx = static_cast<CSimulatorFsxCommon *>(sim); // wonder why qobject_cast does not work here CSimulatorFsxCommon *fsx = static_cast<CSimulatorFsxCommon *>(simulator); // wonder why qobject_cast does not work here
return fsx; return fsx;
} }
} // ns } // ns

View File

@@ -886,7 +886,7 @@ namespace BlackSimPlugin
{ {
if (!myself) { return; } if (!myself) { return; }
if (this->isShuttingDownOrDisconnected()) { return; } if (this->isShuttingDownOrDisconnected()) { return; }
m_addPendingAircraft.insert(simObjAddAgain, true); m_addPendingAircraft.insert(simObjAddAgain, true); // add failed object
}); });
} }
} }