Commit 0d601900 authored by Tomaz Canabrava's avatar Tomaz Canabrava

don't virtual a class that shouldn't be inheritable, use final instead

virtual marks a method for inclusion on a v-table, but we don't want
the methods of classes that won't be inheritable to have a v-table,
we want, however, to issue a warning if somebody try to inherit
that specific class and reimplement those methods.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent df4043b5
......@@ -34,17 +34,17 @@ public:
APMAirframeComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from APMComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
bool _requiresFrameSetup; ///< true: FRAME parameter must be set
......
......@@ -47,7 +47,7 @@ public:
~APMAutoPilotPlugin();
// Overrides from AutoPilotPlugin
virtual const QVariantList& vehicleComponents(void);
const QVariantList& vehicleComponents(void) final;
APMAirframeComponent* airframeComponent (void) { return _airframeComponent; }
APMCameraComponent* cameraComponent (void) { return _cameraComponent; }
......
......@@ -34,17 +34,17 @@ public:
APMCameraComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
const QString _name;
......
......@@ -34,17 +34,17 @@ public:
APMFlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
const QString _name;
......
......@@ -34,17 +34,17 @@ public:
APMPowerComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name (void) const;
virtual QString description (void) const;
virtual QString iconResource (void) const;
virtual bool requiresSetup (void) const;
virtual bool setupComplete (void) const;
virtual QUrl setupSource (void) const;
virtual QUrl summaryQmlSource (void) const;
virtual QString prerequisiteSetup (void) const;
QString name (void) const final;
QString description (void) const final;
QString iconResource (void) const final;
bool requiresSetup (void) const final;
bool setupComplete (void) const final;
QUrl setupSource (void) const final;
QUrl summaryQmlSource (void) const final;
QString prerequisiteSetup (void) const final;
private:
const QString _name;
......
......@@ -35,17 +35,17 @@ public:
APMRadioComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private slots:
void _triggerChanged(void);
......
......@@ -34,17 +34,17 @@ public:
APMSafetyComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
const QString _name;
......
......@@ -37,17 +37,17 @@ public:
bool accelSetupNeeded(void) const;
// Virtuals from APMComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
const QString _name;
......
......@@ -34,17 +34,17 @@ public:
APMTuningComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
// Virtuals from PX4Component
virtual QStringList setupCompleteChangedTriggerList(void) const;
QStringList setupCompleteChangedTriggerList(void) const final;
// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;
virtual QString prerequisiteSetup(void) const;
QString name(void) const final;
QString description(void) const final;
QString iconResource(void) const final;
bool requiresSetup(void) const final;
bool setupComplete(void) const final;
QUrl setupSource(void) const final;
QUrl summaryQmlSource(void) const final;
QString prerequisiteSetup(void) const final;
private:
const QString _name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment