Commit 98276616 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use override

parent 83cabac4
......@@ -35,18 +35,18 @@ class BrightnessControl : public PowerDevil::Action
public:
explicit BrightnessControl(QObject* parent);
virtual ~BrightnessControl() = default;
~BrightnessControl() override = default;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
bool isSupported() Q_DECL_OVERRIDE;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap& args) override;
bool isSupported() override;
public:
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
public Q_SLOTS:
// DBus export
......
......@@ -34,11 +34,11 @@ class Q_DECL_EXPORT BrightnessControlConfig : public PowerDevil::ActionConfig
Q_DISABLE_COPY(BrightnessControlConfig)
public:
BrightnessControlConfig(QObject*, const QVariantList&);
virtual ~BrightnessControlConfig();
~BrightnessControlConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QSlider *m_slider;
......
......@@ -34,18 +34,18 @@ class DimDisplay : public PowerDevil::Action
public:
explicit DimDisplay(QObject *parent);
virtual ~DimDisplay() = default;
~DimDisplay() override = default;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
bool isSupported() Q_DECL_OVERRIDE;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap& args) override;
bool isSupported() override;
public:
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
private:
void setBrightnessHelper(int screen, int keyboard, bool force = false);
......
......@@ -34,11 +34,11 @@ class DimDisplayConfig : public PowerDevil::ActionConfig
Q_DISABLE_COPY(DimDisplayConfig)
public:
DimDisplayConfig(QObject *, const QVariantList&);
virtual ~DimDisplayConfig();
~DimDisplayConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QSpinBox *m_spinBox;
......
......@@ -38,20 +38,20 @@ class HandleButtonEvents : public PowerDevil::Action
public:
explicit HandleButtonEvents(QObject* parent);
virtual ~HandleButtonEvents();
~HandleButtonEvents() override;
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool isSupported() Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
bool isSupported() override;
Q_SIGNALS:
void triggersLidActionChanged(bool triggers);
protected:
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) override;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
public Q_SLOTS:
int lidAction() const;
......
......@@ -35,11 +35,11 @@ class HandleButtonEventsConfig : public PowerDevil::ActionConfig
public:
HandleButtonEventsConfig(QObject* parent, const QVariantList&);
virtual ~HandleButtonEventsConfig();
~HandleButtonEventsConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QComboBox *m_lidCloseCombo;
......
......@@ -35,18 +35,18 @@ class KeyboardBrightnessControl : public PowerDevil::Action
public:
explicit KeyboardBrightnessControl(QObject* parent);
virtual ~KeyboardBrightnessControl() = default;
~KeyboardBrightnessControl() override = default;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
bool isSupported() Q_DECL_OVERRIDE;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap& args) override;
bool isSupported() override;
public:
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
public Q_SLOTS:
void onBrightnessChangedFromBackend(const BrightnessLogic::BrightnessInfo &brightnessInfo, BackendInterface::BrightnessControlType type);
......
......@@ -34,11 +34,11 @@ class Q_DECL_EXPORT KeyboardBrightnessControlConfig : public PowerDevil::ActionC
Q_DISABLE_COPY(KeyboardBrightnessControlConfig)
public:
KeyboardBrightnessControlConfig(QObject*, const QVariantList&);
virtual ~KeyboardBrightnessControlConfig();
~KeyboardBrightnessControlConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QSlider *m_slider;
......
......@@ -34,17 +34,17 @@ class RunScript : public PowerDevil::Action
public:
explicit RunScript(QObject* parent);
virtual ~RunScript();
~RunScript() override;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap& args) override;
public:
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
private:
int m_scriptPhase;
......
......@@ -37,11 +37,11 @@ class RunScriptConfig : public PowerDevil::ActionConfig
public:
RunScriptConfig(QObject* parent, const QVariantList&);
virtual ~RunScriptConfig();
~RunScriptConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
KUrlRequester *m_urlRequester;
......
......@@ -53,16 +53,16 @@ public:
};
explicit SuspendSession(QObject *parent);
virtual ~SuspendSession();
~SuspendSession() override;
bool loadAction(const KConfigGroup& config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup& config) override;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap& args) Q_DECL_OVERRIDE;
void onProfileUnload() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap& args) override;
public Q_SLOTS:
void suspendToRam();
......
......@@ -35,11 +35,11 @@ class SuspendSessionConfig : public PowerDevil::ActionConfig
Q_DISABLE_COPY(SuspendSessionConfig)
public:
SuspendSessionConfig(QObject* parent, const QVariantList&);
virtual ~SuspendSessionConfig();
~SuspendSessionConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QSpinBox *m_idleTime;
......
......@@ -43,7 +43,7 @@ public:
};
explicit WirelessPowerSaving(QObject* parent);
virtual ~WirelessPowerSaving() = default;
~WirelessPowerSaving() override = default;
protected:
void onProfileUnload() override;
......
......@@ -35,7 +35,7 @@ class WirelessPowerSavingConfig : public PowerDevil::ActionConfig
public:
WirelessPowerSavingConfig(QObject* parent, const QVariantList&);
virtual ~WirelessPowerSavingConfig();
~WirelessPowerSavingConfig() override;
void save() override;
void load() override;
......
......@@ -35,19 +35,19 @@ class PowerDevilDPMSAction : public PowerDevil::Action
public:
explicit PowerDevilDPMSAction(QObject *parent, const QVariantList &);
virtual ~PowerDevilDPMSAction();
~PowerDevilDPMSAction() override;
protected:
void onProfileUnload() Q_DECL_OVERRIDE;
bool onUnloadAction() Q_DECL_OVERRIDE;
void onWakeupFromIdle() Q_DECL_OVERRIDE;
void onIdleTimeout(int msec) Q_DECL_OVERRIDE;
void onProfileLoad() Q_DECL_OVERRIDE;
void triggerImpl(const QVariantMap &args) Q_DECL_OVERRIDE;
bool isSupported() Q_DECL_OVERRIDE;
void onProfileUnload() override;
bool onUnloadAction() override;
void onWakeupFromIdle() override;
void onIdleTimeout(int msec) override;
void onProfileLoad() override;
void triggerImpl(const QVariantMap &args) override;
bool isSupported() override;
public:
bool loadAction(const KConfigGroup &config) Q_DECL_OVERRIDE;
bool loadAction(const KConfigGroup &config) override;
private Q_SLOTS:
void onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies policies);
......
......@@ -30,11 +30,11 @@ class PowerDevilDPMSActionConfig : public PowerDevil::ActionConfig
Q_DISABLE_COPY(PowerDevilDPMSActionConfig)
public:
PowerDevilDPMSActionConfig(QObject* parent, const QVariantList&);
virtual ~PowerDevilDPMSActionConfig();
~PowerDevilDPMSActionConfig() override;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
QList< QPair< QString, QWidget* > > buildUi() Q_DECL_OVERRIDE;
void save() override;
void load() override;
QList< QPair< QString, QWidget* > > buildUi() override;
private:
QSpinBox *m_spinBox;
......
......@@ -36,9 +36,9 @@ public:
Login1SuspendJob(QDBusInterface *login1Interface,
PowerDevil::BackendInterface::SuspendMethod method,
PowerDevil::BackendInterface::SuspendMethods supported);
virtual ~Login1SuspendJob();
~Login1SuspendJob() override;
void start() Q_DECL_OVERRIDE;
void start() override;
private Q_SLOTS:
void doStart();
......
......@@ -54,17 +54,17 @@ class Q_DECL_EXPORT PowerDevilUPowerBackend : public PowerDevil::BackendInterfac
public:
explicit PowerDevilUPowerBackend(QObject* parent = nullptr);
virtual ~PowerDevilUPowerBackend();
~PowerDevilUPowerBackend() override;
void init() Q_DECL_OVERRIDE;
void init() override;
static bool isAvailable();
int brightness(BrightnessControlType type = Screen) const Q_DECL_OVERRIDE;
int brightnessMax(BrightnessControlType type = Screen) const Q_DECL_OVERRIDE;
int brightness(BrightnessControlType type = Screen) const override;
int brightnessMax(BrightnessControlType type = Screen) const override;
int brightnessKeyPressed(PowerDevil::BrightnessLogic::BrightnessKeyType type, BrightnessControlType controlType) Q_DECL_OVERRIDE;
void setBrightness(int value, PowerDevil::BackendInterface::BrightnessControlType type = Screen) Q_DECL_OVERRIDE;
KJob* suspend(PowerDevil::BackendInterface::SuspendMethod method) Q_DECL_OVERRIDE;
int brightnessKeyPressed(PowerDevil::BrightnessLogic::BrightnessKeyType type, BrightnessControlType controlType) override;
void setBrightness(int value, PowerDevil::BackendInterface::BrightnessControlType type = Screen) override;
KJob* suspend(PowerDevil::BackendInterface::SuspendMethod method) override;
Q_SIGNALS:
void brightnessSupportQueried(bool available);
......
......@@ -42,7 +42,7 @@ class Client : public QObject
public:
explicit Client(QObject *parent = nullptr);
explicit Client(const QStringList &subsystemList, QObject *parent = nullptr);
~Client();
~Client() override;
QStringList watchedSubsystems() const;
void setWatchedSubsystems(const QStringList &subsystemList);
......
......@@ -36,9 +36,9 @@ public:
UPowerSuspendJob(OrgFreedesktopUPowerInterface *upowerInterface,
PowerDevil::BackendInterface::SuspendMethod method,
PowerDevil::BackendInterface::SuspendMethods supported);
virtual ~UPowerSuspendJob();
~UPowerSuspendJob() override;
void start() Q_DECL_OVERRIDE;
void start() override;
private Q_SLOTS:
void doStart();
......
Supports Markdown
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