diff options
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/compiler/derivedclass.h | 2 | ||||
-rw-r--r-- | tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h | 24 | ||||
-rw-r--r-- | tests/auto/other/qobjectrace/tst_qobjectrace.cpp | 12 |
3 files changed, 20 insertions, 18 deletions
diff --git a/tests/auto/other/compiler/derivedclass.h b/tests/auto/other/compiler/derivedclass.h index eab7963236..99d970f4ec 100644 --- a/tests/auto/other/compiler/derivedclass.h +++ b/tests/auto/other/compiler/derivedclass.h @@ -33,7 +33,7 @@ class DerivedClass : public BaseClass { public: - void wasAPureVirtualFunction(); + void wasAPureVirtualFunction() override; }; #endif diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h index 0807ffbe94..e28575e50b 100644 --- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h +++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h @@ -41,12 +41,12 @@ class DynamicTreeModel : public QAbstractItemModel public: DynamicTreeModel(QObject *parent = 0); - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &index) const; - int rowCount(const QModelIndex &index = QModelIndex()) const; - int columnCount(const QModelIndex &index = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex &index) const override; + int rowCount(const QModelIndex &index = QModelIndex()) const override; + int columnCount(const QModelIndex &index = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; void clear(); @@ -137,7 +137,7 @@ public: { } - virtual void doCommand(); + virtual void doCommand() override; }; class ModelMoveCommand : public ModelChangeCommand @@ -153,7 +153,7 @@ public: virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow); - virtual void doCommand(); + virtual void doCommand() override; virtual void emitPostSignal(); @@ -184,8 +184,8 @@ public: virtual ~ModelResetCommand(); virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, - const QModelIndex &destParent, int destRow); - virtual void emitPostSignal(); + const QModelIndex &destParent, int destRow) override; + virtual void emitPostSignal() override; }; /** @@ -200,8 +200,8 @@ public: virtual ~ModelResetCommandFixed(); virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, - const QModelIndex &destParent, int destRow); - virtual void emitPostSignal(); + const QModelIndex &destParent, int destRow) override; + virtual void emitPostSignal() override; }; class ModelChangeChildrenLayoutsCommand : public ModelChangeCommand @@ -214,7 +214,7 @@ public: { } - virtual void doCommand(); + virtual void doCommand() override; void setSecondAncestorRowNumbers(QList<int> rows) { diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp index dba1fddb76..119a658471 100644 --- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp +++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp @@ -104,7 +104,8 @@ public: QThread::start(); } - void run() { + void run() override + { QTimer zeroTimer; connect(&zeroTimer, SIGNAL(timeout()), object, SLOT(theSlot())); connect(&zeroTimer, SIGNAL(timeout()), this, SLOT(checkStopWatch()), Qt::DirectConnection); @@ -219,7 +220,8 @@ public: objects[i]->moveToThread(this); } - void run() { + void run() override + { for (int i = number-1; i >= 0; --i) { /* Do some more connection and disconnection between object in this thread that have not been destroyed yet */ @@ -417,7 +419,7 @@ public: { } - void run() + void run() override { while (!isInterruptionRequested()) { QMetaObject::Connection conn = connect(sender, &DisconnectRaceSenderObject::theSignal, @@ -441,7 +443,7 @@ public: { } - void run() + void run() override { while (!isInterruptionRequested()) { emit sender->theSignal(); @@ -490,7 +492,7 @@ public: { } - void run() + void run() override { QScopedPointer<DeleteReceiverRaceReceiver> receiver(new DeleteReceiverRaceReceiver(sender)); exec(); |