Commit ac0ab631 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 9d26b94d
......@@ -60,14 +60,14 @@ public:
}
//! Are there uncommited changes?
bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
void setActionData( KHotKeys::ActionDataGroup *group );
private:
void doCopyFromObject();
void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
//! Widget to change the conditions
ConditionsWidget *_conditions;
......
......@@ -44,15 +44,15 @@ public:
*/
virtual ~CommandUrlActionWidget();
KHotKeys::CommandUrlAction *action();
const KHotKeys::CommandUrlAction *action() const;
KHotKeys::CommandUrlAction *action() Q_DECL_OVERRIDE;
const KHotKeys::CommandUrlAction *action() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::CommandUrlActionWidget ui;
......
......@@ -46,10 +46,10 @@ public:
*/
virtual ~DbusActionWidget();
KHotKeys::DBusAction *action();
const KHotKeys::DBusAction *action() const;
KHotKeys::DBusAction *action() Q_DECL_OVERRIDE;
const KHotKeys::DBusAction *action() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
public Q_SLOTS:
......@@ -58,8 +58,8 @@ public Q_SLOTS:
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::DbusActionWidget ui;
......
......@@ -46,15 +46,15 @@ public:
*/
virtual ~KeyboardInputActionWidget();
KHotKeys::KeyboardInputAction *action();
const KHotKeys::KeyboardInputAction *action() const;
KHotKeys::KeyboardInputAction *action() Q_DECL_OVERRIDE;
const KHotKeys::KeyboardInputAction *action() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::KeyboardInputActionWidget ui;
......
......@@ -46,10 +46,10 @@ public:
*/
virtual ~MenuentryActionWidget();
KHotKeys::MenuEntryAction *action();
const KHotKeys::MenuEntryAction *action() const;
KHotKeys::MenuEntryAction *action() Q_DECL_OVERRIDE;
const KHotKeys::MenuEntryAction *action() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
public Q_SLOTS:
......@@ -57,8 +57,8 @@ public Q_SLOTS:
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
QString storage_id;
......
......@@ -43,9 +43,9 @@ public:
void build();
virtual void visitConditionsListBase(KHotKeys::Condition_list_base *list);
virtual void visitConditionsList(KHotKeys::Condition_list *list);
virtual void visitCondition( KHotKeys::Condition *condition );
void visitConditionsListBase(KHotKeys::Condition_list_base *list) Q_DECL_OVERRIDE;
void visitConditionsList(KHotKeys::Condition_list *list) Q_DECL_OVERRIDE;
void visitCondition( KHotKeys::Condition *condition ) Q_DECL_OVERRIDE;
QMap<QTreeWidgetItem*, KHotKeys::Condition*> _items;
private:
......
......@@ -55,12 +55,12 @@ public:
private Q_SLOTS:
bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
private:
......
......@@ -40,10 +40,10 @@ class GestureDrawer : public QFrame
KHotKeys::StrokePoints pointData() const;
virtual QSize sizeHint() const { return QSize(30, 30); }
QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(30, 30); }
protected:
void paintEvent(QPaintEvent *ev);
void paintEvent(QPaintEvent *ev) Q_DECL_OVERRIDE;
private:
KHotKeys::StrokePoints _data;
......
......@@ -37,9 +37,9 @@ class GestureRecorder : public QFrame
protected:
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
Q_SIGNALS:
......
......@@ -52,7 +52,7 @@ public:
void setWindowDefinitions(KHotKeys::Windowdef_list *windowdef_list);
bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
private:
......@@ -67,8 +67,8 @@ private Q_SLOTS:
protected:
void doCopyFromObject();
void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
private:
......@@ -108,7 +108,7 @@ public:
}
virtual void accept()
void accept() Q_DECL_OVERRIDE
{
def->copyToObject();
KDialog::accept();
......
......@@ -53,12 +53,12 @@ public:
*/
virtual ~WindowDefinitionWidget();
bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
protected:
void doCopyFromObject();
void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
private Q_SLOTS:
......@@ -99,7 +99,7 @@ public:
}
virtual void accept()
void accept() Q_DECL_OVERRIDE
{
def->copyToObject();
KDialog::accept();
......
......@@ -61,14 +61,14 @@ class KHotkeysModel : public QAbstractItemModel
* \group Qt Model/View Framework methods
*/
//@{
QModelIndex index( int, int, const QModelIndex &parent = QModelIndex() ) const;
QModelIndex parent( const QModelIndex &index ) const;
int rowCount( const QModelIndex &index ) const;
int columnCount( const QModelIndex &index ) const;
QVariant headerData( int section, Qt::Orientation, int role = Qt::DisplayRole ) const;
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
bool setData( const QModelIndex &index, const QVariant &value, int role );
Qt::ItemFlags flags( const QModelIndex &index ) const;
QModelIndex index( int, int, const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE;
int rowCount( const QModelIndex &index ) const Q_DECL_OVERRIDE;
int columnCount( const QModelIndex &index ) const Q_DECL_OVERRIDE;
QVariant headerData( int section, Qt::Orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE;
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE;
bool setData( const QModelIndex &index, const QVariant &value, int role ) Q_DECL_OVERRIDE;
Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
//@}
/**
......@@ -80,9 +80,9 @@ class KHotkeysModel : public QAbstractItemModel
,Qt::DropAction action
,int row
,int column
,const QModelIndex &parent);
QMimeData *mimeData(const QModelIndexList &indexes) const;
QStringList mimeTypes() const;
,const QModelIndex &parent) Q_DECL_OVERRIDE;
QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
//@}
/**
......@@ -147,7 +147,7 @@ class KHotkeysModel : public QAbstractItemModel
/**
* Remove @a count rows starting with @a row under @a parent.
*/
bool removeRows( int row, int count, const QModelIndex &parent );
bool removeRows( int row, int count, const QModelIndex &parent ) Q_DECL_OVERRIDE;
/**
* Save the settings to the file
......
......@@ -52,7 +52,7 @@ class KHotkeysProxyModel : public QSortFilterProxyModel
* Returns true if the item in column @a column should be included in
* the model.
*/
bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const;
bool filterAcceptsRow( int source_column, const QModelIndex &source_parent ) const Q_DECL_OVERRIDE;
/**
* Get the KHotKeys::ActionDataBase behind the index.
......
......@@ -54,16 +54,16 @@ public:
/**
* The user requested a context menu
*/
void contextMenuEvent( QContextMenuEvent *event );
void contextMenuEvent( QContextMenuEvent *event ) Q_DECL_OVERRIDE;
/**
* Set a new model
*/
void setModel( QAbstractItemModel *model );
void setModel( QAbstractItemModel *model ) Q_DECL_OVERRIDE;
KHotkeysModel *model();
protected:
void mouseReleaseEvent(QMouseEvent *me);
void mouseReleaseEvent(QMouseEvent *me) Q_DECL_OVERRIDE;
private Q_SLOTS:
......
......@@ -48,7 +48,7 @@ public:
*/
virtual ~HotkeysWidgetBase();
virtual void apply();
void apply() Q_DECL_OVERRIDE;
/**
* The associated action.
......@@ -63,7 +63,7 @@ public:
return _data;
}
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
using HotkeysWidgetIFace::changed;
......@@ -84,8 +84,8 @@ protected:
void extend(QWidget*, const QString &);
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::HotkeysWidgetBase ui;
......
......@@ -56,17 +56,17 @@ public:
/**
* Set all settings back to defaults.
*/
void defaults();
void defaults() Q_DECL_OVERRIDE;
/**
* Load all settings.
*/
void load();
void load() Q_DECL_OVERRIDE;
/**
* Save the settings
*/
void save();
void save() Q_DECL_OVERRIDE;
......
......@@ -65,12 +65,12 @@ public:
*/
virtual ~SimpleActionDataWidget();
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
protected:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
private:
......
......@@ -48,15 +48,15 @@ public:
*/
virtual ~GestureTriggerWidget();
KHotKeys::GestureTrigger *trigger();
const KHotKeys::GestureTrigger *trigger() const;
KHotKeys::GestureTrigger *trigger() Q_DECL_OVERRIDE;
const KHotKeys::GestureTrigger *trigger() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
private:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::GestureTriggerWidget ui;
......
......@@ -45,11 +45,11 @@ public:
*/
virtual ~ShortcutTriggerWidget();
KHotKeys::ShortcutTrigger *trigger();
const KHotKeys::ShortcutTrigger *trigger() const;
KHotKeys::ShortcutTrigger *trigger() Q_DECL_OVERRIDE;
const KHotKeys::ShortcutTrigger *trigger() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
private Q_SLOTS:
......@@ -59,8 +59,8 @@ private Q_SLOTS:
private:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::ShortcutTriggerWidget shortcut_trigger_ui;
......
......@@ -47,11 +47,11 @@ public:
*/
virtual ~WindowTriggerWidget();
KHotKeys::WindowTrigger *trigger();
const KHotKeys::WindowTrigger *trigger() const;
KHotKeys::WindowTrigger *trigger() Q_DECL_OVERRIDE;
const KHotKeys::WindowTrigger *trigger() const Q_DECL_OVERRIDE;
virtual bool isChanged() const;
bool isChanged() const Q_DECL_OVERRIDE;
private Q_SLOTS:
......@@ -59,8 +59,8 @@ private Q_SLOTS:
private:
virtual void doCopyFromObject();
virtual void doCopyToObject();
void doCopyFromObject() Q_DECL_OVERRIDE;
void doCopyToObject() Q_DECL_OVERRIDE;
Ui::WindowTriggerWidget window_trigger_ui;
......
......@@ -45,17 +45,17 @@ class Q_DECL_EXPORT ActionData
* Visitor pattern
* @reimp
*/
virtual void accept(ActionDataVisitor *visitor);
virtual void accept(ActionDataConstVisitor *visitor) const;
void accept(ActionDataVisitor *visitor) Q_DECL_OVERRIDE;
void accept(ActionDataConstVisitor *visitor) const Q_DECL_OVERRIDE;
virtual void update_triggers();
void update_triggers() Q_DECL_OVERRIDE;
virtual void execute();
/**
* @reimp
*/
void aboutToBeErased();
void aboutToBeErased() Q_DECL_OVERRIDE;
const Trigger_list* triggers() const;
Trigger_list* triggers();
......@@ -82,8 +82,8 @@ class Q_DECL_EXPORT ActionData
Trigger_list* _triggers;
ActionList* _actions;
virtual void doEnable();
virtual void doDisable();
void doEnable() Q_DECL_OVERRIDE;
void doDisable() Q_DECL_OVERRIDE;
};
......
......@@ -68,10 +68,10 @@ class Q_DECL_EXPORT ActionDataGroup
/**
* Visitor pattern
*/
virtual void accept(ActionDataVisitor *visitor);
virtual void accept(ActionDataConstVisitor *visitor) const;
void accept(ActionDataVisitor *visitor) Q_DECL_OVERRIDE;
void accept(ActionDataConstVisitor *visitor) const Q_DECL_OVERRIDE;
virtual void update_triggers();
void update_triggers() Q_DECL_OVERRIDE;
/**
* What kind of actions are allowed for this group?
......@@ -96,7 +96,7 @@ class Q_DECL_EXPORT ActionDataGroup
/**
* @reimp
*/
void aboutToBeErased();
void aboutToBeErased() Q_DECL_OVERRIDE;
/**
* Is this a system group?
......@@ -132,9 +132,9 @@ class Q_DECL_EXPORT ActionDataGroup
//! System group type
system_group_t _system_group; // e.g. menuedit entries, can't be deleted or renamed
virtual void doEnable();
void doEnable() Q_DECL_OVERRIDE;
virtual void doDisable();
void doDisable() Q_DECL_OVERRIDE;
};
......
......@@ -39,8 +39,8 @@ class Q_DECL_EXPORT Generic_action_data
* Visitor pattern
* @reimp
*/
virtual void accept(ActionDataVisitor *visitor);
virtual void accept(ActionDataConstVisitor *visitor) const;
void accept(ActionDataVisitor *visitor) Q_DECL_OVERRIDE;
void accept(ActionDataConstVisitor *visitor) const Q_DECL_OVERRIDE;
// CHECKME: Why this?
using ActionDataBase::set_conditions; // make public
......
......@@ -49,8 +49,8 @@ class Q_DECL_EXPORT MenuEntryShortcutActionData
* Visitor pattern
* @reimp
*/
virtual void accept(ActionDataVisitor *visitor);
virtual void accept(ActionDataConstVisitor *visitor) const;
void accept(ActionDataVisitor *visitor) Q_DECL_OVERRIDE;
void accept(ActionDataConstVisitor *visitor) const Q_DECL_OVERRIDE;
};
......
......@@ -163,21 +163,21 @@ class Q_DECL_EXPORT CommandUrlAction
typedef Action base;
public:
CommandUrlAction( ActionData* data_P, const QString& command_url_P = QString() );
virtual void cfg_write( KConfigGroup& cfg_P ) const;
virtual void execute();
virtual const QString description() const;
void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
void execute() Q_DECL_OVERRIDE;
const QString description() const Q_DECL_OVERRIDE;
//! The command url to trigger
void set_command_url( const QString &command_url );
QString command_url() const;
virtual ActionType type() { return CommandUrlActionType; }
virtual Action* copy( ActionData* data_P ) const;
ActionType type() Q_DECL_OVERRIDE { return CommandUrlActionType; }
Action* copy( ActionData* data_P ) const Q_DECL_OVERRIDE;
/**
* Acyclic visitor pattern
*/
virtual void accept(ActionVisitor&);
void accept(ActionVisitor&) Q_DECL_OVERRIDE;
private:
QString _command_url;
......@@ -199,21 +199,21 @@ class Q_DECL_EXPORT MenuEntryAction
typedef CommandUrlAction base;
public:
MenuEntryAction( ActionData* data_P, const QString& menuentry_P = QString() );
virtual void cfg_write( KConfigGroup& cfg_P ) const;
virtual void execute();
void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
void execute() Q_DECL_OVERRIDE;
// The service we trigger
KService::Ptr service() const;
void set_service( KService::Ptr );
virtual const QString description() const;
virtual Action* copy( ActionData* data_P ) const;
virtual ActionType type() { return Action::MenuEntryActionType; }
const QString description() const Q_DECL_OVERRIDE;
Action* copy( ActionData* data_P ) const Q_DECL_OVERRIDE;
ActionType type() Q_DECL_OVERRIDE { return Action::MenuEntryActionType; }
/**
* Acyclic visitor pattern
*/
virtual void accept(ActionVisitor&);
void accept(ActionVisitor&) Q_DECL_OVERRIDE;
private:
KService::Ptr _service;
......@@ -240,8 +240,8 @@ class Q_DECL_EXPORT DBusAction
const QString& call_P= QString(),
const QString& args_P= QString() );
virtual void cfg_write( KConfigGroup& cfg_P ) const;
virtual void execute();
void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
void execute() Q_DECL_OVERRIDE;
const QString remote_application() const;
const QString remote_object() const;
const QString called_function() const;
......@@ -252,14 +252,14 @@ class Q_DECL_EXPORT DBusAction
void set_called_function( const QString &function );
void set_arguments( const QString &args );
virtual const QString description() const;
virtual Action* copy( ActionData* data_P ) const;
virtual ActionType type() { return DBusActionType; }
const QString description() const Q_DECL_OVERRIDE;
Action* copy( ActionData* data_P ) const Q_DECL_OVERRIDE;
ActionType type() Q_DECL_OVERRIDE { return DBusActionType; }
/**
* Acyclic visitor pattern
*/
virtual void accept(ActionVisitor&);
void accept(ActionVisitor&) Q_DECL_OVERRIDE;
private:
QString _application; // CHECKME QCString ?
......@@ -300,8 +300,8 @@ class Q_DECL_EXPORT KeyboardInputAction
bool active_window_P = true);
virtual ~KeyboardInputAction();
virtual void cfg_write( KConfigGroup& cfg_P ) const;
virtual void execute();
void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
void execute() Q_DECL_OVERRIDE;
const QString& input() const;
......@@ -320,14 +320,14 @@ class Q_DECL_EXPORT KeyboardInputAction
void setDestinationWindowRules(Windowdef_list *list);
bool activeWindow() const;
virtual const QString description() const;
virtual Action* copy( ActionData* data_P ) const;
virtual ActionType type() { return KeyboardInputActionType; }
const QString description() const Q_DECL_OVERRIDE;
Action* copy( ActionData* data_P ) const Q_DECL_OVERRIDE;
ActionType type() Q_DECL_OVERRIDE { return KeyboardInputActionType; }
/**
* Acyclic visitor pattern
*/
virtual void accept(ActionVisitor&);
void accept(ActionVisitor&) Q_DECL_OVERRIDE;
private:
QString _input;
......@@ -357,20 +357,20 @@ class Q_DECL_EXPORT ActivateWindowAction
const Windowdef_list* window = NULL);