Commit 046d532d authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Switch from Q_DECL_OVERRIDE to override keyword

parent a812bc06
......@@ -51,14 +51,14 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setProfileManager(ProfileManager *profileManager);
ProfileManager * profileManager() const;
void setLearner(Learner *learner);
Learner * learner() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Q_INVOKABLE QVariant learningGoal(int index) const;
Q_SIGNALS:
......
......@@ -33,8 +33,8 @@ public:
explicit QtMultimediaBackend(QObject *parent, const QList< QVariant >&);
virtual ~QtMultimediaBackend();
CaptureBackendInterface * captureBackend() const Q_DECL_OVERRIDE;
OutputBackendInterface * outputBackend() const Q_DECL_OVERRIDE;
CaptureBackendInterface * captureBackend() const override;
OutputBackendInterface * outputBackend() const override;
private:
QtMultimediaCaptureBackend *m_captureBackend;
......
......@@ -36,12 +36,12 @@ public:
explicit QtMultimediaCaptureBackend(QObject *parent);
virtual ~QtMultimediaCaptureBackend();
void startCapture(const QString &filePath) Q_DECL_OVERRIDE;
void stopCapture() Q_DECL_OVERRIDE;
CaptureDeviceController::State captureState() const Q_DECL_OVERRIDE;
void startCapture(const QString &filePath) override;
void stopCapture() override;
CaptureDeviceController::State captureState() const override;
QStringList devices() const Q_DECL_OVERRIDE;
void setDevice(const QString &deviceIdentifier) Q_DECL_OVERRIDE;
QStringList devices() const override;
void setDevice(const QString &deviceIdentifier) override;
private:
QAudioRecorder *m_recorder;
......
......@@ -31,19 +31,19 @@ public:
explicit QtMultimediaOutputBackend(QObject *parent = nullptr);
virtual ~QtMultimediaOutputBackend();
void setUri(const QString & uri) Q_DECL_OVERRIDE;
void setUri(const QString & uri) override;
/**
* volume as cubic value
*/
int volume() const Q_DECL_OVERRIDE;
int volume() const override;
OutputDeviceController::State state() const Q_DECL_OVERRIDE;
OutputDeviceController::State state() const override;
public Q_SLOTS:
void play() Q_DECL_OVERRIDE;
void pause() Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
void setVolume(int volume) Q_DECL_OVERRIDE;
void play() override;
void pause() override;
void stop() override;
void setVolume(int volume) override;
private:
QMediaPlayer *m_player;
......
......@@ -49,17 +49,17 @@ public:
/**
* \return unique identifier
*/
QString identifier() Q_DECL_OVERRIDE;
QString identifier() override;
/**
* \return human readable localized title
*/
QString title() Q_DECL_OVERRIDE;
QString title() override;
/**
* \return human readable title in English
*/
QString i18nTitle() Q_DECL_OVERRIDE;
QString i18nTitle() override;
/**
* \return language identifier of this course
......@@ -69,14 +69,14 @@ public:
/**
* \return type of resource
*/
Type type() const Q_DECL_OVERRIDE;
Type type() const override;
/**
* \return true if resource is loaded, otherwise false
*/
bool isOpen() const Q_DECL_OVERRIDE;
bool isOpen() const override;
void sync() Q_DECL_OVERRIDE;
void sync() override;
/**
* export course as <course-id>.tar.bz2 file in the specified folder.
......@@ -86,18 +86,18 @@ public:
/**
* close resource without writing changes back to file
*/
void close() Q_DECL_OVERRIDE;
void close() override;
/**
* \return path to resource file
*/
QUrl path() const Q_DECL_OVERRIDE;
QUrl path() const override;
/**
* \return reference to the loaded resource
* if resource is not open yet, it will be loaded
*/
QObject * resource() Q_DECL_OVERRIDE;
QObject * resource() override;
/**
* \return reference to the loaded course resource
......
......@@ -41,43 +41,43 @@ public:
/**
* \return unique identifier
*/
QString identifier() Q_DECL_OVERRIDE;
QString identifier() override;
/**
* \return human readable localized title
*/
QString title() Q_DECL_OVERRIDE;
QString title() override;
/**
* \return human readable title in English
*/
QString i18nTitle() Q_DECL_OVERRIDE;
QString i18nTitle() override;
/**
* \return type of resource
*/
Type type() const Q_DECL_OVERRIDE;
Type type() const override;
/**
* \return true if resource is loaded, otherwise false
*/
bool isOpen() const Q_DECL_OVERRIDE;
bool isOpen() const override;
/**
* close resource without writing changes back to file
*/
void close() Q_DECL_OVERRIDE;
void close() override;
/**
* \return path to resource file
*/
QUrl path() const Q_DECL_OVERRIDE;
QUrl path() const override;
/**
* \return reference to the loaded resource
* if resource is not open yet, it will be loaded
*/
QObject * resource() Q_DECL_OVERRIDE;
QObject * resource() override;
/**
* \return reference to the loaded language resource
......
......@@ -50,47 +50,47 @@ public:
/**
* \return unique identifier
*/
QString identifier() Q_DECL_OVERRIDE;
QString identifier() override;
/**
* \return human readable localized title
*/
QString title() Q_DECL_OVERRIDE;
QString title() override;
/**
* \return human readable title in English
*/
QString i18nTitle() Q_DECL_OVERRIDE;
QString i18nTitle() override;
/**
* \return type of resource
*/
Type type() const Q_DECL_OVERRIDE;
Type type() const override;
/**
* \return true if resource is loaded, otherwise false
*/
bool isOpen() const Q_DECL_OVERRIDE;
bool isOpen() const override;
/**
* close resource without writing changes back to file
*/
void close() Q_DECL_OVERRIDE;
void close() override;
void sync() Q_DECL_OVERRIDE;
void sync() override;
void reload() Q_DECL_OVERRIDE;
void reload() override;
/**
* \return path to resource file
*/
QUrl path() const Q_DECL_OVERRIDE;
QUrl path() const override;
/**
* \return reference to the loaded resource
* if resource is not open yet, it will be loaded
*/
QObject * resource() Q_DECL_OVERRIDE;
QObject * resource() override;
/**
* \return reference to the loaded skeleton resource
......
......@@ -42,7 +42,7 @@ public:
* Writes course object back to file and set \ref modified state to false.
* If no file is set, no operation is performed.
*/
Q_INVOKABLE void sync() Q_DECL_OVERRIDE;
Q_INVOKABLE void sync() override;
private:
Q_DISABLE_COPY(Skeleton)
......
......@@ -52,9 +52,9 @@ public:
void setupActions();
QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(1000, 700); }
QSize sizeHint() const override { return QSize(1000, 700); }
bool queryClose() Q_DECL_OVERRIDE;
bool queryClose() override;
public Q_SLOTS:
void showSettingsDialog();
......
......@@ -45,8 +45,8 @@ public:
CourseModel * courseModel() const;
void setCourseModel(CourseModel* courseModel);
int filteredCount() const;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const Q_DECL_OVERRIDE;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
void setView(CourseResourceView view);
CourseResourceView view() const;
Q_INVOKABLE QVariant course(int row) const;
......
......@@ -45,7 +45,7 @@ public:
explicit LanguageModel(QObject *parent = nullptr);
LanguageResourceModel * resourceModel() const;
void setResourceModel(LanguageResourceModel *resourceModel);
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
void setView(LanguageResourceView view);
LanguageResourceView view() const;
Q_INVOKABLE QVariant language(int index) const;
......
......@@ -47,12 +47,12 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setResourceManager(ResourceManager *resourceManager);
ResourceManager * resourceManager() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
void setView(LanguageModel::LanguageResourceView view);
LanguageModel::LanguageResourceView view() const;
......
......@@ -45,15 +45,15 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setSession(TrainingSession *session);
TrainingSession * session() const;
int maximumTries() const;
int maximumPhrasesPerTry() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Q_SIGNALS:
void sessionChanged();
......
......@@ -43,12 +43,12 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setCourse(Course *course);
Course * course() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
signals:
void phonemeGroupChanged(int index);
......
......@@ -44,12 +44,12 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setLanguage(Language *language);
Language * language() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Q_SIGNALS:
void phonemeChanged(int index);
......
......@@ -49,14 +49,14 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setCourse(Course *course);
Course * course() const;
void setPhonemeGroup(PhonemeGroup *phonemeGroup);
PhonemeGroup * phonemeGroup() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int count() const;
Q_SIGNALS:
......
......@@ -48,8 +48,8 @@ public:
void setSortOption(SortOption option = Id);
SortOption sortOption() const;
int filteredCount() const;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const Q_DECL_OVERRIDE;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
void setHideExcluded(bool hide=true);
bool isHideExcluded() const;
void setHideNotRecorded(bool hide=true);
......
......@@ -47,12 +47,12 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setUnit(Unit *unit);
Unit * unit() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
/**
* Count phrases in current model view. If this number is changed, signal
......
......@@ -40,15 +40,15 @@ public:
};
explicit PhraseModel(QObject *parent = nullptr);
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setCourse(Course *course);
Course * course() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QModelIndex parent(const QModelIndex &child) const override;
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Q_INVOKABLE bool isPhrase(const QModelIndex &index) const;
Q_INVOKABLE Phrase * phrase(const QModelIndex &index) const;
Q_INVOKABLE Unit * unit(const QModelIndex &index) const;
......
......@@ -46,12 +46,12 @@ public:
/**
* Reimplemented from QAbstractListModel::roleNames()
*/
virtual QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
virtual QHash<int,QByteArray> roleNames() const override;
void setProfileManager(LearnerProfile::ProfileManager *profileManager);
LearnerProfile::ProfileManager * profileManager() const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Q_SIGNALS:
void profileChanged(int index);
......
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