mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Style, removed redundant CForm overrides
This commit is contained in:
@@ -97,7 +97,7 @@ namespace BlackCore
|
||||
static IContextNetwork *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextNetwork() {}
|
||||
virtual ~IContextNetwork() override {}
|
||||
|
||||
signals:
|
||||
//! An aircraft disappeared
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace BlackCore
|
||||
static IContextSimulator *create(CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, BlackMisc::CDBusServer *server, QDBusConnection &connection);
|
||||
|
||||
//! Destructor
|
||||
virtual ~IContextSimulator() {}
|
||||
virtual ~IContextSimulator() override {}
|
||||
|
||||
signals:
|
||||
//! Simulator combined status
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace BlackCore
|
||||
const int MaxAircraftInfinite = 100;
|
||||
|
||||
//! Destructor
|
||||
virtual ~ISimulator();
|
||||
virtual ~ISimulator() override;
|
||||
|
||||
//! Combined status
|
||||
virtual SimulatorStatus getSimulatorStatus() const;
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace BlackCore
|
||||
else
|
||||
{
|
||||
// network error
|
||||
CLogMessage(this).warning("Reading VATSIM data file failed %1 %2") << nwReply->errorString() << nwReply->url().toString();
|
||||
CLogMessage(this).warning("Reading VATSIM data file failed '%1' '%2'") << nwReply->errorString() << nwReply->url().toString();
|
||||
nwReply->abort();
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFailed, 0);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#define BLACKGUI_EDITORS_AIRCRAFTMODELFORM_H
|
||||
|
||||
#include "form.h"
|
||||
#include <QFrame>
|
||||
|
||||
namespace Ui { class CAircraftModelForm; }
|
||||
namespace BlackGui
|
||||
@@ -32,7 +31,7 @@ namespace BlackGui
|
||||
explicit CAircraftModelForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CAircraftModelForm();
|
||||
virtual ~CAircraftModelForm() override;
|
||||
|
||||
//! Allow to drop data
|
||||
void allowDrop(bool allowDrop);
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace BlackGui
|
||||
explicit CAirlineIcaoForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CAirlineIcaoForm();
|
||||
virtual ~CAirlineIcaoForm() override;
|
||||
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Aviation::CAirlineIcaoCode &icao = BlackMisc::Aviation::CAirlineIcaoCode());
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BlackGui
|
||||
explicit CCockpitComForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destrutor
|
||||
virtual ~CCockpitComForm();
|
||||
virtual ~CCockpitComForm() override;
|
||||
|
||||
//! COM frequencies displayed
|
||||
void setFrequencies(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2);
|
||||
|
||||
@@ -141,12 +141,7 @@ namespace BlackGui
|
||||
this->forceStyleSheetUpdate();
|
||||
}
|
||||
|
||||
void CCoordinateForm::setSelectOnly()
|
||||
{
|
||||
this->setReadOnly(true);
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessageList CCoordinateForm::validate(bool nested) const
|
||||
CStatusMessageList CCoordinateForm::validate(bool nested) const
|
||||
{
|
||||
Q_UNUSED(nested);
|
||||
CStatusMessageList ml;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BlackGui
|
||||
explicit CCoordinateForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CCoordinateForm();
|
||||
virtual ~CCoordinateForm() override;
|
||||
|
||||
//! Get the coordinate
|
||||
BlackMisc::Geo::CCoordinateGeodetic getCoordinate() const { return m_coordinate; }
|
||||
@@ -47,7 +47,6 @@ namespace BlackGui
|
||||
//! \name Form class implementations
|
||||
//! @{
|
||||
virtual void setReadOnly(bool readonly) override;
|
||||
virtual void setSelectOnly() override;
|
||||
virtual BlackMisc::CStatusMessageList validate(bool nested = false) const override;
|
||||
//! @}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackGui
|
||||
explicit CDistributorForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CDistributorForm();
|
||||
virtual ~CDistributorForm() override;
|
||||
|
||||
//! Get value
|
||||
BlackMisc::Simulation::CDistributor getValue() const;
|
||||
@@ -75,7 +75,6 @@ namespace BlackGui
|
||||
|
||||
QScopedPointer<Ui::CDistributorForm> ui;
|
||||
BlackMisc::Simulation::CDistributor m_currentDistributor;
|
||||
bool m_readOnly = false;
|
||||
};
|
||||
} // ns
|
||||
} //ns
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackGui
|
||||
explicit CLiveryForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CLiveryForm();
|
||||
virtual ~CLiveryForm() override;
|
||||
|
||||
//! Value
|
||||
BlackMisc::Aviation::CLivery getValue() const;
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CModelMappingForm; }
|
||||
namespace BlackGui
|
||||
{
|
||||
@@ -39,7 +37,7 @@ namespace BlackGui
|
||||
explicit CModelMappingForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CModelMappingForm();
|
||||
virtual ~CModelMappingForm() override;
|
||||
|
||||
//! Value
|
||||
BlackMisc::Simulation::CAircraftModel getValue() const;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <QScopedPointer>
|
||||
|
||||
class QCheckBox;
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CModelMappingModifyForm; }
|
||||
namespace BlackMisc { namespace Simulation { class CAircraftModel; } }
|
||||
@@ -40,7 +39,7 @@ namespace BlackGui
|
||||
explicit CModelMappingModifyForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CModelMappingModifyForm();
|
||||
virtual ~CModelMappingModifyForm() override;
|
||||
|
||||
//! Get the values
|
||||
BlackMisc::CPropertyIndexVariantMap getValues() const;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <tuple>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace BlackMisc
|
||||
CLogHandler();
|
||||
|
||||
//! \private Destructor.
|
||||
~CLogHandler();
|
||||
virtual ~CLogHandler();
|
||||
|
||||
//! Return pointer to the CLogHandler singleton.
|
||||
//! \warning This can not be called from within a plugin, because the returned instance will be wrong.
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace BlackMisc
|
||||
class IProvider
|
||||
{
|
||||
public:
|
||||
//! Dtor
|
||||
virtual ~IProvider() {}
|
||||
|
||||
//! Return as QObject
|
||||
virtual QObject *asQObject() { return nullptr; }
|
||||
};
|
||||
@@ -34,6 +37,9 @@ namespace BlackMisc
|
||||
//! Ctor
|
||||
IProviderAware(PROVIDER *provider = nullptr) { this->setProvider(provider); }
|
||||
|
||||
//! Dtor
|
||||
virtual ~IProviderAware() {}
|
||||
|
||||
//! Has provider?
|
||||
bool hasProvider() const { return m_provider; }
|
||||
|
||||
|
||||
@@ -448,6 +448,9 @@ namespace BlackMisc
|
||||
class BLACKMISC_EXPORT CRemoteAircraftAware : public IProviderAware<IRemoteAircraftProvider>
|
||||
{
|
||||
public:
|
||||
//! Destructor
|
||||
virtual ~CRemoteAircraftAware() {}
|
||||
|
||||
//! \copydoc IRemoteAircraftProvider::getAircraftInRange
|
||||
CSimulatedAircraftList getAircraftInRange() const;
|
||||
|
||||
|
||||
@@ -32,10 +32,8 @@ namespace BlackMisc
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexAllowExclude:
|
||||
return CVariant::fromValue(this->m_allowExcludeModels);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
case IndexAllowExclude: return CVariant::fromValue(this->m_allowExcludeModels);
|
||||
default: return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,12 +43,8 @@ namespace BlackMisc
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexAllowExclude:
|
||||
this->setAllowExcludedModels(variant.toBool());
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
case IndexAllowExclude: this->setAllowExcludedModels(variant.toBool()); break;
|
||||
default: CValueObject::setPropertyByIndex(index, variant); break;
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <QPointer>
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
Reference in New Issue
Block a user