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

Use override as we already use it in repo

parent 4a601acf
......@@ -65,7 +65,7 @@ class AbstractGroupEntry : public AbstractEntry
public:
explicit AbstractGroupEntry(AbstractModel *owner);
EntryType type() const Q_DECL_OVERRIDE { return GroupType; }
EntryType type() const override { return GroupType; }
};
class SeparatorEntry : public AbstractEntry
......@@ -73,7 +73,7 @@ class SeparatorEntry : public AbstractEntry
public:
explicit SeparatorEntry(AbstractModel *owner);
EntryType type() const Q_DECL_OVERRIDE { return SeparatorType; }
EntryType type() const override { return SeparatorType; }
};
#endif
......@@ -39,14 +39,14 @@ class AbstractModel : public QAbstractListModel
explicit AbstractModel(QObject *parent = 0);
~AbstractModel();
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const override;
virtual QString description() const = 0;
int count() const;
virtual int separatorCount() const;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const 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 Q_DECL_OVERRIDE { return RunnableType; }
EntryType type() const override { return RunnableType; }
bool isValid() const Q_DECL_OVERRIDE;
bool isValid() const override;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString name() const override;
QString description() const override;
KService::Ptr service() const;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
QString id() const override;
QUrl url() const override;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool hasActions() const override;
QVariantList actions() const override;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) override;
QString menuId() const;
......@@ -80,11 +80,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 Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString name() const override;
bool hasChildren() const Q_DECL_OVERRIDE;
AbstractModel *childModel() const Q_DECL_OVERRIDE;
bool hasChildren() const override;
AbstractModel *childModel() const override;
private:
KServiceGroup::Ptr m_group;
......
......@@ -49,21 +49,21 @@ class AppsModel : public AbstractModel
explicit AppsModel(const QList<AbstractEntry *> entryList, bool deleteEntriesOnDestruction, QObject *parent = 0);
~AppsModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
void setDescription(const QString &text);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
Q_INVOKABLE AbstractModel *modelForRow(int row) Q_DECL_OVERRIDE;
Q_INVOKABLE int rowForModel(AbstractModel *model) Q_DECL_OVERRIDE;
Q_INVOKABLE AbstractModel *modelForRow(int row) override;
Q_INVOKABLE int rowForModel(AbstractModel *model) override;
int separatorCount() const Q_DECL_OVERRIDE;
int separatorCount() const override;
bool paginate() const;
void setPaginate(bool paginate);
......@@ -91,7 +91,7 @@ class AppsModel : public AbstractModel
QStringList hiddenEntries() const;
void entryChanged(AbstractEntry *entry) Q_DECL_OVERRIDE;
void entryChanged(AbstractEntry *entry) override;
Q_SIGNALS:
void cleared() const;
......@@ -106,7 +106,7 @@ class AppsModel : public AbstractModel
void hiddenEntriesChanged() const;
protected Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() 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 Q_DECL_OVERRIDE;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
private:
KFilePlacesModel *m_placesModel;
......@@ -63,13 +63,13 @@ class RunCommandModel : public AbstractModel
RunCommandModel(QObject *parent = 0);
~RunCommandModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
};
class ComputerModel : public ForwardingModel
......@@ -84,7 +84,7 @@ class ComputerModel : public ForwardingModel
explicit ComputerModel(QObject *parent = 0);
~ComputerModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
int appNameFormat() const;
void setAppNameFormat(int format);
......@@ -95,9 +95,9 @@ class ComputerModel : public ForwardingModel
QStringList systemApplications() const;
void setSystemApplications(const QStringList &apps);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) 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 Q_DECL_OVERRIDE { return RunnableType; }
EntryType type() const override { return RunnableType; }
bool isValid() const Q_DECL_OVERRIDE;
bool isValid() const override;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString name() const override;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
QString id() const override;
QUrl url() const override;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool hasActions() const override;
QVariantList actions() const override;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) override;
static void showPersonDetailsDialog(const QString &id);
......
......@@ -67,8 +67,8 @@ class DashboardWindow : public QQuickWindow
void visualParentScreenChanged(QScreen *screen);
protected:
bool event(QEvent *event) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
bool event(QEvent *event) override;
void keyPressEvent(QKeyEvent *e) override;
private:
QQuickItem *m_mainItem;
......
......@@ -30,21 +30,21 @@ class FileEntry : public AbstractEntry
explicit FileEntry(AbstractModel *owner, const QUrl &url);
~FileEntry();
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
EntryType type() const override { return RunnableType; }
bool isValid() const Q_DECL_OVERRIDE;
bool isValid() const override;
QIcon icon() const Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString name() const override;
QString description() const override;
QString id() const Q_DECL_OVERRIDE;
QUrl url() const Q_DECL_OVERRIDE;
QString id() const override;
QUrl url() const override;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool hasActions() const override;
QVariantList actions() const override;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) override;
private:
KFileItem *m_fileItem;
......
......@@ -34,30 +34,30 @@ class ForwardingModel : public AbstractModel
explicit ForwardingModel(QObject *parent = 0);
~ForwardingModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QAbstractItemModel *sourceModel() const;
virtual void setSourceModel(QAbstractItemModel *sourceModel);
bool canFetchMore(const QModelIndex &parent) const Q_DECL_OVERRIDE;
void fetchMore(const QModelIndex &parent) Q_DECL_OVERRIDE;
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
Q_INVOKABLE QString labelForRow(int row) Q_DECL_OVERRIDE;
Q_INVOKABLE QString labelForRow(int row) override;
Q_INVOKABLE AbstractModel *modelForRow(int row) Q_DECL_OVERRIDE;
Q_INVOKABLE AbstractModel *modelForRow(int row) override;
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
AbstractModel* favoritesModel() override;
int separatorCount() const Q_DECL_OVERRIDE;
int separatorCount() const override;
public Q_SLOTS:
void reset();
......
......@@ -30,7 +30,7 @@ class FunnelModel : public ForwardingModel
explicit FunnelModel(QObject *parent = 0);
~FunnelModel();
void setSourceModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
void setSourceModel(QAbstractItemModel *model) override;
};
#endif
......@@ -29,7 +29,7 @@ class KickerPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) Q_DECL_OVERRIDE;
void registerTypes(const char *uri) override;
};
#endif // KICKERPLUGIN_H
......@@ -35,17 +35,17 @@ class RecentContactsModel : public ForwardingModel
explicit RecentContactsModel(QObject *parent = 0);
~RecentContactsModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool hasActions() const override;
QVariantList actions() const override;
private Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() override;
void buildCache();
void personDataChanged();
......
......@@ -34,7 +34,7 @@ class GroupSortProxy : public QSortFilterProxyModel
~GroupSortProxy();
protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
};
class InvalidAppsFilterProxy : public QSortFilterProxyModel
......@@ -46,7 +46,7 @@ class InvalidAppsFilterProxy : public QSortFilterProxyModel
~InvalidAppsFilterProxy();
protected:
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const Q_DECL_OVERRIDE;
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override;
private Q_SLOTS:
void connectNewFavoritesModel();
......@@ -72,14 +72,14 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
int ordering = Recent);
~RecentUsageModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
bool hasActions() const Q_DECL_OVERRIDE;
QVariantList actions() const Q_DECL_OVERRIDE;
bool hasActions() const override;
QVariantList actions() const override;
IncludeUsage usage() const;
......@@ -93,7 +93,7 @@ class RecentUsageModel : public ForwardingModel, public QQmlParserStatus
void orderingChanged(int ordering);
private Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() 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 Q_DECL_OVERRIDE;
QString name() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString name() const override;
bool hasChildren() const Q_DECL_OVERRIDE;
AbstractModel *childModel() const Q_DECL_OVERRIDE;
bool hasChildren() const override;
AbstractModel *childModel() const 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 Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) 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() Q_DECL_OVERRIDE;
AbstractModel* favoritesModel() override;
AbstractModel* systemFavoritesModel();
void classBegin() override;
......@@ -112,7 +112,7 @@ class RootModel : public AppsModel, public QQmlParserStatus
void recentAppsModelChanged() const;
protected Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() 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 Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
QString runnerId() const { return m_runnerId; }
QString name() const { return m_name; }
void setMatches(const QList<Plasma::QueryMatch> &matches);
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
AbstractModel* favoritesModel() 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 Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int count() const;
Q_INVOKABLE QObject *modelForRow(int row);
......
......@@ -39,13 +39,13 @@ class SimpleFavoritesModel : public AbstractModel
explicit SimpleFavoritesModel(QObject *parent = 0);
~SimpleFavoritesModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
bool enabled() const;
void setEnabled(bool enable);
......@@ -65,10 +65,10 @@ class SimpleFavoritesModel : public AbstractModel
int dropPlaceholderIndex() const;
void setDropPlaceholderIndex(int index);
AbstractModel* favoritesModel() Q_DECL_OVERRIDE;
AbstractModel* favoritesModel() override;
public Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() override;
Q_SIGNALS:
void enabledChanged() const;
......
......@@ -43,19 +43,19 @@ class SystemEntry : public AbstractEntry
explicit SystemEntry(AbstractModel *owner, Action action);
explicit SystemEntry(AbstractModel *owner, const QString &id);
EntryType type() const Q_DECL_OVERRIDE { return RunnableType; }
EntryType type() const override { return RunnableType; }
bool isValid() const Q_DECL_OVERRIDE;
bool isValid() const override;
QIcon icon() const Q_DECL_OVERRIDE;
QIcon icon() const override;
QString iconName() const;
QString name() const Q_DECL_OVERRIDE;
QString group() const Q_DECL_OVERRIDE;
QString description() const Q_DECL_OVERRIDE;
QString name() const override;
QString group() const override;
QString description() const override;
QString id() const Q_DECL_OVERRIDE;
QString id() const override;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) Q_DECL_OVERRIDE;
bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) override;
private:
void init();
......
......@@ -32,16 +32,16 @@ class SystemModel : public AbstractModel
explicit SystemModel(QObject *parent = 0);
~SystemModel();
QString description() const Q_DECL_OVERRIDE;
QString description() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE;
Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override;
protected Q_SLOTS:
void refresh() Q_DECL_OVERRIDE;
void refresh() override;
private:
void init();
......