Commit 4e7116c3 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Change Q_DECL_OVERRIDE to override keyword

parent 3fc36674
......@@ -33,24 +33,24 @@ public:
explicit ContainerModel(KEduVocContainer::EnumContainerType type, QObject *parent = 0);
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int role = Qt::DisplayRole) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData * mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const override;
QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
int row, int column, const QModelIndex &parent) override;
/** Change the name or checkbox of a lesson.
* @param index which lesson
* @param value new name
* @param role
* @return bool @c true it worked */
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QModelIndex appendContainer(const QModelIndex& parent, const QString & containerName = QString());
......@@ -59,7 +59,7 @@ public:
/** Indicate supported drag actions
@return enum of actions supported **/
Qt::DropActions supportedDragActions() const Q_DECL_OVERRIDE;
Qt::DropActions supportedDragActions() const override;
signals:
/**
......
......@@ -39,7 +39,7 @@ protected:
private:
// intentionally hide this to make sure a proper model is passed
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE {
void setModel(QAbstractItemModel *model) override {
Q_UNUSED(model)
}
};
......
......@@ -24,9 +24,9 @@ public:
explicit LessonModel(QObject *parent = 0);
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
/**
* Divide a lesson into smaller ones.
......@@ -38,7 +38,7 @@ public:
void splitLesson(const QModelIndex& containerIndex, int entriesPerLesson, SplitLessonOrder order);
protected:
KEduVocContainer * rootContainer() const Q_DECL_OVERRIDE;
KEduVocContainer * rootContainer() const override;
};
......
......@@ -29,17 +29,17 @@ class ReadonlyContainerModel : public QAbstractItemModel
public:
explicit ReadonlyContainerModel(KEduVocContainer::EnumContainerType type, QObject *parent = 0);
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index(KEduVocContainer* container) const;
QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
KEduVocContainer::EnumContainerType containerType();
......
......@@ -28,10 +28,10 @@ public slots:
void setSearchString(const QString& expression);
protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
private:
void setSourceModel(QAbstractItemModel *model) Q_DECL_OVERRIDE {
void setSourceModel(QAbstractItemModel *model) override {
Q_UNUSED(model)
}
......
......@@ -33,9 +33,9 @@ public:
QList<KEduVocTranslation *> translationList() const;
QList<VocabularyMimeData::MimeExpression> expressionList() const;
QVariant retrieveData(const QString & mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
QVariant retrieveData(const QString & mimeType, QVariant::Type type) const override;
QStringList formats() const Q_DECL_OVERRIDE;
QStringList formats() const override;
private:
......
......@@ -48,13 +48,13 @@ public:
~VocabularyModel();
int rowCount(const QModelIndex&) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex&) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex&, int) 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;
int rowCount(const QModelIndex&) const override;
int columnCount(const QModelIndex&) const override;
QVariant data(const QModelIndex&, int) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
/**
* Returns the name of the entryColumns column
......@@ -79,10 +79,10 @@ public:
QModelIndex appendEntry(KEduVocExpression *expression = 0);
bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()) Q_DECL_OVERRIDE;
bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()) override;
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData * mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList &indexes) const override;
// bool dropMimeData(const QMimeData *data, Qt::DropAction action,
// int row, int column, const QModelIndex &parent);
......
......@@ -23,7 +23,7 @@ public:
void deleteWordClass(const QModelIndex& wordTypeIndex);
protected:
KEduVocContainer * rootContainer() const Q_DECL_OVERRIDE;
KEduVocContainer * rootContainer() const override;
};
......
......@@ -29,7 +29,7 @@ public:
void setDue(WordCount &wc);
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *) override;
private:
int m_dueWords[8];
......
......@@ -22,9 +22,9 @@ public:
virtual ~ButtonDelegate();
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QModelIndex hoveredIndex() const;
......
......@@ -48,7 +48,7 @@ public:
RemoveButton(QWidget *parent = 0);
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *) override;
};
......
......@@ -16,7 +16,7 @@ public:
explicit GradeReferenceWidget(QWidget *parent = 0);
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *) override;
};
......
......@@ -39,7 +39,7 @@ private slots:
void slotImageChanged(const QString & url);
protected:
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) override;
private:
/// Column in the document - corresponds to the language (-KV_COL_TRANS)
......
......@@ -69,8 +69,8 @@ class LatexDelegate : public QItemDelegate
public:
explicit LatexDelegate(QObject *parent = 0);
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const override;
void setMathModeCheckBox(QCheckBox *checkBox) {
m_checkBox = checkBox;
}
......
......@@ -75,14 +75,14 @@ public slots:
void collapseAllLesson();
protected slots:
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) Q_DECL_OVERRIDE;
void currentChanged(const QModelIndex & current, const QModelIndex & previous) Q_DECL_OVERRIDE;
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) override;
void currentChanged(const QModelIndex & current, const QModelIndex & previous) override;
private:
void setModel(ContainerModel *model) Q_DECL_OVERRIDE {
void setModel(ContainerModel *model) override {
Q_UNUSED(model)
}
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE {
void setModel(QAbstractItemModel *model) override {
Q_UNUSED(model)
}
......
......@@ -31,7 +31,7 @@ public slots:
void setTranslation(KEduVocExpression *entry, int translation);
protected:
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) override;
private slots:
void slotDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
......
......@@ -93,7 +93,7 @@ class SummaryWordDelegate : public QItemDelegate
public:
explicit SummaryWordDelegate(QObject *parent = 0);
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
};
}
......
......@@ -36,7 +36,7 @@ public:
VocabularyColumnsDialog(KEduVocDocument *doc, QWidget *parent);
~VocabularyColumnsDialog();
void accept() Q_DECL_OVERRIDE;
void accept() override;
private:
/**
......
......@@ -38,11 +38,11 @@ public:
explicit VocabularyDelegate(QObject *parent = 0);
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void setTranslator(Translator * translator);
static int columnType(int column);
......@@ -56,7 +56,7 @@ public:
public slots:
void setDocument(const std::shared_ptr<KEduVocDocument> &doc);
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index ) Q_DECL_OVERRIDE;
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index ) override;
private:
std::shared_ptr<KEduVocDocument> m_doc;
......@@ -74,7 +74,7 @@ class VocabularyDelegate::WordTypeBasicModel : public ReadonlyContainerModel
public:
explicit WordTypeBasicModel(QObject *parent = 0);
protected:
KEduVocContainer * rootContainer() const Q_DECL_OVERRIDE;
KEduVocContainer * rootContainer() const override;
};
}
......
......@@ -50,7 +50,7 @@ public:
QModelIndexList getSelectedIndexes() const;
public slots:
void reset() Q_DECL_OVERRIDE;
void reset() override;
void appendEntry();
/** Delete the currently selected entries */
......@@ -96,10 +96,10 @@ private slots:
private:
void selectIndex(const QModelIndex &index);
// trap enter presses at the end of the document to add a new entry instead of moving to the first cell
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) override;
// Make this private to avoid inadvertent use. Instead use setFilter() which is public.
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE {
void setModel(QAbstractItemModel *model) override {
Q_UNUSED(model)
}
......
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