Commit 44051d03 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent c8909613
......@@ -65,7 +65,7 @@ class AbstractGroupEntry : public AbstractEntry
public:
explicit AbstractGroupEntry(AbstractModel *owner);
EntryType type() const { return GroupType; }
EntryType type() const Q_DECL_OVERRIDE { return GroupType; }
};
class SeparatorEntry : public AbstractEntry
......@@ -73,7 +73,7 @@ class SeparatorEntry : public AbstractEntry
public:
explicit SeparatorEntry(AbstractModel *owner);
EntryType type() const { return SeparatorType; }
EntryType type() const Q_DECL_OVERRIDE { return SeparatorType; }
};
#endif
......@@ -39,14 +39,14 @@ class AbstractModel : public QAbstractListModel
explicit AbstractModel(QObject *parent = 0);
~AbstractModel();
virtual QHash<int, QByteArray> roleNames() const;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QString description() const = 0;
int count() const;
virtual int separatorCount() const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int iconSize() const;
void setIconSize(int size);
......
......@@ -41,22 +41,22 @@ class AppEntry : public AbstractEntry
explicit AppEntry(AbstractModel *owner, KService::Ptr service, NameFormat nameFormat);
explicit AppEntry(AbstractModel *owner, const QString &id);
EntryType type() const { return RunnableType; }
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
bool isValid() const;
bool isValid() const Q_DECL_OVERRIDE;
QIcon icon() const;
QString name() const;
QString description() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
KService::Ptr service() const;
QString id() const;
QUrl url() const;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
bool hasActions() const;
QVariantList actions() const;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant());
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
static QString nameFromService(const KService::Ptr service, NameFormat nameFormat);
static KService::Ptr defaultAppByName(const QString &name);
......@@ -78,11 +78,11 @@ class AppGroupEntry : public AbstractGroupEntry
AppGroupEntry(AppsModel *parentModel, KServiceGroup::Ptr group,
bool paginate, int pageSize, bool flat, bool sorted, bool separators, int appNameFormat);
QIcon icon() const;
QString name() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
bool hasChildren() const;
AbstractModel *childModel() const;
bool hasChildren() const Q_DECL_OVERRIDE;
AbstractModel *childModel() const Q_DECL_OVERRIDE;
private:
KServiceGroup::Ptr m_group;
......
......@@ -48,21 +48,21 @@ class AppsModel : public AbstractModel
explicit AppsModel(const QList<AbstractEntry *> entryList, bool deleteEntriesOnDestruction, QObject *parent = 0);
~AppsModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
void setDescription(const QString &text);
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE virtual bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE virtual bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE AbstractModel *modelForRow(int row);
Q_INVOKABLE int rowForModel(AbstractModel *model);
Q_INVOKABLE AbstractModel *modelForRow(int row) Q_DECL_OVERRIDE;
Q_INVOKABLE int rowForModel(AbstractModel *model) Q_DECL_OVERRIDE;
int separatorCount() const;
int separatorCount() const Q_DECL_OVERRIDE;
bool paginate() const;
void setPaginate(bool paginate);
......@@ -87,7 +87,7 @@ class AppsModel : public AbstractModel
QStringList hiddenEntries() const;
void entryChanged(AbstractEntry *entry);
void entryChanged(AbstractEntry *entry) Q_DECL_OVERRIDE;
Q_SIGNALS:
void cleared() const;
......@@ -101,7 +101,7 @@ class AppsModel : public AbstractModel
void hiddenEntriesChanged() const;
protected Q_SLOTS:
virtual void refresh();
void refresh() Q_DECL_OVERRIDE;
protected:
void refreshInternal();
......
......@@ -48,8 +48,8 @@ class FilteredPlacesModel : public QSortFilterProxyModel
Solid::Device deviceForIndex(const QModelIndex &index) const;
protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
private:
KFilePlacesModel *m_placesModel;
......@@ -61,13 +61,13 @@ class RunCommandModel : public AbstractModel
RunCommandModel(QObject *parent = 0);
~RunCommandModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
};
class ComputerModel : public ForwardingModel
......@@ -82,7 +82,7 @@ class ComputerModel : public ForwardingModel
explicit ComputerModel(QObject *parent = 0);
~ComputerModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
int appNameFormat() const;
void setAppNameFormat(int format);
......@@ -93,9 +93,9 @@ class ComputerModel : public ForwardingModel
QStringList systemApplications() const;
void setSystemApplications(const QStringList &apps);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_SIGNALS:
void appNameFormatChanged() const;
......
......@@ -31,20 +31,20 @@ class ContactEntry : public AbstractEntry
public:
explicit ContactEntry(AbstractModel *owner, const QString &id);
EntryType type() const { return RunnableType; }
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
bool isValid() const;
bool isValid() const Q_DECL_OVERRIDE;
QIcon icon() const;
QString name() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QString id() const;
QUrl url() const;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
bool hasActions() const;
QVariantList actions() const;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant());
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
static void showPersonDetailsDialog(const QString &id);
......
......@@ -39,13 +39,13 @@ class FavoritesModel : public AbstractModel
explicit FavoritesModel(QObject *parent = 0);
~FavoritesModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
bool enabled() const;
void setEnabled(bool enable);
......@@ -65,10 +65,10 @@ class FavoritesModel : public AbstractModel
int dropPlaceholderIndex() const;
void setDropPlaceholderIndex(int index);
AbstractModel* favoritesModel();
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
public Q_SLOTS:
virtual void refresh();
void refresh() Q_DECL_OVERRIDE;
Q_SIGNALS:
void enabledChanged() const;
......
......@@ -30,21 +30,21 @@ class FileEntry : public AbstractEntry
explicit FileEntry(AbstractModel *owner, const QUrl &url);
~FileEntry();
EntryType type() const { return RunnableType; }
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
bool isValid() const;
bool isValid() const Q_DECL_OVERRIDE;
QIcon icon() const;
QString name() const;
QString description() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QString id() const;
QUrl url() const;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
bool hasActions() const;
QVariantList actions() const;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant());
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
private:
KFileItem *m_fileItem;
......
......@@ -34,30 +34,30 @@ class ForwardingModel : public AbstractModel
explicit ForwardingModel(QObject *parent = 0);
~ForwardingModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QAbstractItemModel *sourceModel() const;
virtual void setSourceModel(QAbstractItemModel *sourceModel);
bool canFetchMore(const QModelIndex &parent) const;
void fetchMore(const QModelIndex &parent);
bool canFetchMore(const QModelIndex &parent) const Q_DECL_OVERRIDE;
void fetchMore(const QModelIndex &parent) Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE QString labelForRow(int row);
Q_INVOKABLE QString labelForRow(int row) Q_DECL_OVERRIDE;
Q_INVOKABLE AbstractModel *modelForRow(int row);
Q_INVOKABLE AbstractModel *modelForRow(int row) Q_DECL_OVERRIDE;
AbstractModel* favoritesModel();
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
int separatorCount() const;
int separatorCount() const Q_DECL_OVERRIDE;
public Q_SLOTS:
void reset();
......
......@@ -30,7 +30,7 @@ class FunnelModel : public ForwardingModel
explicit FunnelModel(QObject *parent = 0);
~FunnelModel();
void setSourceModel(QAbstractItemModel *model);
void setSourceModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
};
#endif
......@@ -29,7 +29,7 @@ class KickerPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char *uri);
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
};
#endif // KICKERPLUGIN_H
......@@ -35,17 +35,17 @@ class RecentContactsModel : public ForwardingModel
explicit RecentContactsModel(QObject *parent = 0);
~RecentContactsModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
bool hasActions() const;
QVariantList actions() const;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
private Q_SLOTS:
void refresh();
void refresh() Q_DECL_OVERRIDE;
void buildCache();
void personDataChanged();
......
......@@ -32,7 +32,7 @@ class GroupSortProxy : public QSortFilterProxyModel
~GroupSortProxy();
protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
};
class InvalidAppsFilterProxy : public QSortFilterProxyModel
......@@ -44,7 +44,7 @@ class InvalidAppsFilterProxy : public QSortFilterProxyModel
~InvalidAppsFilterProxy();
protected:
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const;
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const Q_DECL_OVERRIDE;
private Q_SLOTS:
void connectNewFavoritesModel();
......@@ -70,14 +70,14 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
int ordering = Recent);
~RecentUsageModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
bool hasActions() const;
QVariantList actions() const;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
IncludeUsage usage() const;
......@@ -91,7 +91,7 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
void orderingChanged(int ordering);
private Q_SLOTS:
void refresh();
void refresh() Q_DECL_OVERRIDE;
private:
QVariant appData(const QString &resource, int role) const;
......
......@@ -37,11 +37,11 @@ class GroupEntry : public AbstractGroupEntry
GroupEntry(AppsModel *parentModel, const QString &name,
const QString &iconName, AbstractModel *childModel);
QIcon icon() const;
QString name() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
bool hasChildren() const;
AbstractModel *childModel() const;
bool hasChildren() const Q_DECL_OVERRIDE;
AbstractModel *childModel() const Q_DECL_OVERRIDE;
private:
QString m_name;
......@@ -68,9 +68,9 @@ class RootModel : public AppsModel, public QQmlParserStatus
explicit RootModel(QObject *parent = 0);
~RootModel();
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
Q_INVOKABLE virtual bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE virtual bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
bool autoPopulate() const;
void setAutoPopulate(bool populate);
......@@ -93,7 +93,7 @@ class RootModel : public AppsModel, public QQmlParserStatus
bool showPowerSession() const;
void setShowPowerSession(bool show);
AbstractModel* favoritesModel();
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
AbstractModel* systemFavoritesModel();
void classBegin() override;
......@@ -112,7 +112,7 @@ class RootModel : public AppsModel, public QQmlParserStatus
void recentAppsModelChanged() const;
protected Q_SLOTS:
void refresh();
void refresh() Q_DECL_OVERRIDE;
private:
bool m_complete;
......
......@@ -39,20 +39,20 @@ class RunnerMatchesModel : public AbstractModel
explicit RunnerMatchesModel(const QString &runnerId, const QString &name,
Plasma::RunnerManager *manager, QObject *parent = 0);
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
QString runnerId() const { return m_runnerId; }
QString name() const { return m_name; }
void setMatches(const QList<Plasma::QueryMatch> &matches);
AbstractModel* favoritesModel();
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
private:
QString m_runnerId;
......
......@@ -51,10 +51,10 @@ class RunnerModel : public QAbstractListModel
explicit RunnerModel(QObject *parent = 0);
~RunnerModel();
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int count() const;
Q_INVOKABLE QObject *modelForRow(int row);
......
......@@ -43,19 +43,19 @@ class SystemEntry : public AbstractEntry
explicit SystemEntry(AbstractModel *owner, Action action);
explicit SystemEntry(AbstractModel *owner, const QString &id);
EntryType type() const { return RunnableType; }
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
bool isValid() const;
bool isValid() const Q_DECL_OVERRIDE;
QIcon icon() const;
QIcon icon() const Q_DECL_OVERRIDE;
QString iconName() const;
QString name() const;
QString group() const;
QString description() const;
QString name() const Q_DECL_OVERRIDE;
QString group() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QString id() const;
QString id() const Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant());
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
private:
void init();
......
......@@ -32,16 +32,16 @@ class SystemModel : public AbstractModel
explicit SystemModel(QObject *parent = 0);
~SystemModel();
QString description() const;
QString description() const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument);
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
protected Q_SLOTS:
virtual void refresh();
void refresh() Q_DECL_OVERRIDE;
private:
void init();
......
......@@ -43,7 +43,7 @@ class WheelInterceptor : public QQuickItem
void wheelMoved(QPoint delta) const;
protected:
void wheelEvent(QWheelEvent *event);
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
private:
QPointer<QQuickItem> m_destination;
......
......@@ -33,7 +33,7 @@ class WindowSystem : public QObject
WindowSystem(QObject *parent = 0);
~WindowSystem();
bool eventFilter(QObject *watched, QEvent *event);
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
Q_INVOKABLE void forceActive(QQuickItem *item);
......
......@@ -31,7 +31,7 @@ class KimpanelPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char* uri);
void registerTypes(const char* uri) Q_DECL_OVERRIDE;
};
......
......@@ -106,8 +106,8 @@ public:
Q_INVOKABLE void addDesktop();
Q_INVOKABLE void removeDesktop();
void classBegin();
void componentComplete();
void classBegin() Q_DECL_OVERRIDE;
void componentComplete() Q_DECL_OVERRIDE;
Q_SIGNALS:
void countChanged() const;
......
......@@ -29,7 +29,7 @@ class KickoffPlugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char *uri);
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
};
#endif // PAGERPLUGIN_H
......@@ -29,7 +29,7 @@ class TaskManagerPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char *uri);
void registerTypes