aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-07 14:48:46 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-07 13:49:02 +0000
commitcc2bd9708b4134dcc04d0d84685622b113c0056a (patch)
treedc50e8d11ea82294152201c64c89088b337761f2 /src
parentb6412090f37aa855525ec7615c5d28e94b4d40c9 (diff)
Qml: add missing 'override'
... and drop redundant 'virtual' Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/animations/qanimationgroupjob_p.h2
-rw-r--r--src/qml/animations/qparallelanimationgroupjob_p.h12
-rw-r--r--src/qml/jit/qv4regalloc.cpp124
-rw-r--r--src/qml/qml/ftw/qqmlthread.cpp6
-rw-r--r--src/qml/qml/ftw/qqmlthread_p.h24
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
-rw-r--r--src/qml/qml/qqmlengine.h2
-rw-r--r--src/qml/qml/qqmlexpression_p.h4
-rw-r--r--src/qml/qml/qqmlextensionplugin.h2
-rw-r--r--src/qml/qml/qqmlfileselector_p.h2
-rw-r--r--src/qml/qml/qqmlincubator.cpp2
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h4
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h4
-rw-r--r--src/qml/qml/qqmlproxymetaobject_p.h4
-rw-r--r--src/qml/qml/qqmltypeloader.cpp4
-rw-r--r--src/qml/qml/qqmltypeloader_p.h32
-rw-r--r--src/qml/qml/qqmlvaluetype_p.h6
-rw-r--r--src/qml/types/qqmlbind_p.h6
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h4
-rw-r--r--src/qml/types/qqmllistmodel_p_p.h2
-rw-r--r--src/qml/types/qqmltimer.cpp4
-rw-r--r--src/qml/types/qquickworkerscript.cpp4
-rw-r--r--src/qml/util/qqmlpropertymap.cpp8
23 files changed, 135 insertions, 131 deletions
diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h
index 9bcd63127a..26965c0264 100644
--- a/src/qml/animations/qanimationgroupjob_p.h
+++ b/src/qml/animations/qanimationgroupjob_p.h
@@ -75,7 +75,7 @@ public:
//called by QAbstractAnimationJob
virtual void uncontrolledAnimationFinished(QAbstractAnimationJob *animation);
protected:
- void topLevelAnimationLoopChanged();
+ void topLevelAnimationLoopChanged() override;
virtual void animationInserted(QAbstractAnimationJob*) { }
virtual void animationRemoved(QAbstractAnimationJob*, QAbstractAnimationJob*, QAbstractAnimationJob*);
diff --git a/src/qml/animations/qparallelanimationgroupjob_p.h b/src/qml/animations/qparallelanimationgroupjob_p.h
index 3e914c3e76..358b95ce53 100644
--- a/src/qml/animations/qparallelanimationgroupjob_p.h
+++ b/src/qml/animations/qparallelanimationgroupjob_p.h
@@ -62,14 +62,14 @@ public:
QParallelAnimationGroupJob();
~QParallelAnimationGroupJob();
- int duration() const;
+ int duration() const override;
protected:
- void updateCurrentTime(int currentTime);
- void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState);
- void updateDirection(QAbstractAnimationJob::Direction direction);
- void uncontrolledAnimationFinished(QAbstractAnimationJob *animation);
- void debugAnimation(QDebug d) const;
+ void updateCurrentTime(int currentTime) override;
+ void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override;
+ void updateDirection(QAbstractAnimationJob::Direction direction) override;
+ void uncontrolledAnimationFinished(QAbstractAnimationJob *animation) override;
+ void debugAnimation(QDebug d) const override;
private:
bool shouldAnimationStart(QAbstractAnimationJob *animation, bool startIfAtEnd) const;
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index 406b9096ea..63d542b5c8 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -272,32 +272,32 @@ public:
}
protected: // IRDecoder
- virtual void callBuiltinInvalid(IR::Name *, IR::ExprList *, IR::Expr *) {}
- virtual void callBuiltinTypeofQmlContextProperty(IR::Expr *, IR::Member::MemberKind, int, IR::Expr *) {}
- virtual void callBuiltinTypeofMember(IR::Expr *, const QString &, IR::Expr *) {}
- virtual void callBuiltinTypeofSubscript(IR::Expr *, IR::Expr *, IR::Expr *) {}
- virtual void callBuiltinTypeofName(const QString &, IR::Expr *) {}
- virtual void callBuiltinTypeofValue(IR::Expr *, IR::Expr *) {}
- virtual void callBuiltinDeleteMember(IR::Expr *, const QString &, IR::Expr *) {}
- virtual void callBuiltinDeleteSubscript(IR::Expr *, IR::Expr *, IR::Expr *) {}
- virtual void callBuiltinDeleteName(const QString &, IR::Expr *) {}
- virtual void callBuiltinDeleteValue(IR::Expr *) {}
- virtual void callBuiltinThrow(IR::Expr *) {}
- virtual void callBuiltinReThrow() {}
- virtual void callBuiltinUnwindException(IR::Expr *) {}
- virtual void callBuiltinPushCatchScope(const QString &) {};
- virtual void callBuiltinForeachIteratorObject(IR::Expr *, IR::Expr *) {}
+ void callBuiltinInvalid(IR::Name *, IR::ExprList *, IR::Expr *) override {}
+ void callBuiltinTypeofQmlContextProperty(IR::Expr *, IR::Member::MemberKind, int, IR::Expr *) override {}
+ void callBuiltinTypeofMember(IR::Expr *, const QString &, IR::Expr *) override {}
+ void callBuiltinTypeofSubscript(IR::Expr *, IR::Expr *, IR::Expr *) override {}
+ void callBuiltinTypeofName(const QString &, IR::Expr *) override {}
+ void callBuiltinTypeofValue(IR::Expr *, IR::Expr *) override {}
+ void callBuiltinDeleteMember(IR::Expr *, const QString &, IR::Expr *) override {}
+ void callBuiltinDeleteSubscript(IR::Expr *, IR::Expr *, IR::Expr *) override {}
+ void callBuiltinDeleteName(const QString &, IR::Expr *) override {}
+ void callBuiltinDeleteValue(IR::Expr *) override {}
+ void callBuiltinThrow(IR::Expr *) override {}
+ void callBuiltinReThrow() override {}
+ void callBuiltinUnwindException(IR::Expr *) override {}
+ void callBuiltinPushCatchScope(const QString &) override {};
+ void callBuiltinForeachIteratorObject(IR::Expr *, IR::Expr *) override {}
virtual void callBuiltinForeachNextProperty(IR::Temp *, IR::Temp *) {}
- virtual void callBuiltinForeachNextPropertyname(IR::Expr *, IR::Expr *) {}
- virtual void callBuiltinPushWithScope(IR::Expr *) {}
- virtual void callBuiltinPopScope() {}
- virtual void callBuiltinDeclareVar(bool , const QString &) {}
- virtual void callBuiltinDefineArray(IR::Expr *, IR::ExprList *) {}
- virtual void callBuiltinDefineObjectLiteral(IR::Expr *, int, IR::ExprList *, IR::ExprList *, bool) {}
- virtual void callBuiltinSetupArgumentObject(IR::Expr *) {}
- virtual void callBuiltinConvertThisToObject() {}
+ void callBuiltinForeachNextPropertyname(IR::Expr *, IR::Expr *) override {}
+ void callBuiltinPushWithScope(IR::Expr *) override {}
+ void callBuiltinPopScope() override {}
+ void callBuiltinDeclareVar(bool , const QString &) override {}
+ void callBuiltinDefineArray(IR::Expr *, IR::ExprList *) override {}
+ void callBuiltinDefineObjectLiteral(IR::Expr *, int, IR::ExprList *, IR::ExprList *, bool) override {}
+ void callBuiltinSetupArgumentObject(IR::Expr *) override {}
+ void callBuiltinConvertThisToObject() override {}
- virtual void callValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result)
+ void callValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result) override
{
addDef(result);
if (IR::Temp *tempValue = value->asTemp())
@@ -306,7 +306,8 @@ protected: // IRDecoder
addCall();
}
- virtual void callQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int propertyIndex, IR::ExprList *args, IR::Expr *result)
+ void callQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int propertyIndex,
+ IR::ExprList *args, IR::Expr *result) override
{
Q_UNUSED(propertyIndex)
@@ -316,8 +317,8 @@ protected: // IRDecoder
addCall();
}
- virtual void callProperty(IR::Expr *base, const QString &name, IR::ExprList *args,
- IR::Expr *result)
+ void callProperty(IR::Expr *base, const QString &name, IR::ExprList *args,
+ IR::Expr *result) override
{
Q_UNUSED(name)
@@ -327,8 +328,8 @@ protected: // IRDecoder
addCall();
}
- virtual void callSubscript(IR::Expr *base, IR::Expr *index, IR::ExprList *args,
- IR::Expr *result)
+ void callSubscript(IR::Expr *base, IR::Expr *index, IR::ExprList *args,
+ IR::Expr *result) override
{
addDef(result);
addUses(base->asTemp(), Use::CouldHaveRegister);
@@ -337,7 +338,7 @@ protected: // IRDecoder
addCall();
}
- virtual void convertType(IR::Expr *source, IR::Expr *target)
+ void convertType(IR::Expr *source, IR::Expr *target) override
{
addDef(target);
@@ -410,14 +411,14 @@ protected: // IRDecoder
addHint(target->asTemp(), sourceTemp);
}
- virtual void constructActivationProperty(IR::Name *, IR::ExprList *args, IR::Expr *result)
+ void constructActivationProperty(IR::Name *, IR::ExprList *args, IR::Expr *result) override
{
addDef(result);
addUses(args, Use::CouldHaveRegister);
addCall();
}
- virtual void constructProperty(IR::Expr *base, const QString &, IR::ExprList *args, IR::Expr *result)
+ void constructProperty(IR::Expr *base, const QString &, IR::ExprList *args, IR::Expr *result) override
{
addDef(result);
addUses(base, Use::CouldHaveRegister);
@@ -425,7 +426,7 @@ protected: // IRDecoder
addCall();
}
- virtual void constructValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result)
+ void constructValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result) override
{
addDef(result);
addUses(value, Use::CouldHaveRegister);
@@ -433,24 +434,24 @@ protected: // IRDecoder
addCall();
}
- virtual void loadThisObject(IR::Expr *temp)
+ void loadThisObject(IR::Expr *temp) override
{
addDef(temp);
}
- virtual void loadQmlContext(IR::Expr *temp)
+ void loadQmlContext(IR::Expr *temp) override
{
addDef(temp);
addCall();
}
- virtual void loadQmlImportedScripts(IR::Expr *temp)
+ void loadQmlImportedScripts(IR::Expr *temp) override
{
addDef(temp);
addCall();
}
- virtual void loadQmlSingleton(const QString &/*name*/, Expr *temp)
+ void loadQmlSingleton(const QString &/*name*/, Expr *temp) override
{
Q_UNUSED(temp);
@@ -458,21 +459,21 @@ protected: // IRDecoder
addCall();
}
- virtual void loadConst(IR::Const *sourceConst, Expr *targetTemp)
+ void loadConst(IR::Const *sourceConst, Expr *targetTemp) override
{
Q_UNUSED(sourceConst);
addDef(targetTemp);
}
- virtual void loadString(const QString &str, Expr *targetTemp)
+ void loadString(const QString &str, Expr *targetTemp) override
{
Q_UNUSED(str);
addDef(targetTemp);
}
- virtual void loadRegexp(IR::RegExp *sourceRegexp, Expr *targetTemp)
+ void loadRegexp(IR::RegExp *sourceRegexp, Expr *targetTemp) override
{
Q_UNUSED(sourceRegexp);
@@ -480,19 +481,19 @@ protected: // IRDecoder
addCall();
}
- virtual void getActivationProperty(const IR::Name *, Expr *temp)
+ void getActivationProperty(const IR::Name *, Expr *temp) override
{
addDef(temp);
addCall();
}
- virtual void setActivationProperty(IR::Expr *source, const QString &)
+ void setActivationProperty(IR::Expr *source, const QString &) override
{
addUses(source->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void initClosure(IR::Closure *closure, Expr *target)
+ void initClosure(IR::Closure *closure, Expr *target) override
{
Q_UNUSED(closure);
@@ -500,49 +501,52 @@ protected: // IRDecoder
addCall();
}
- virtual void getProperty(IR::Expr *base, const QString &, Expr *target)
+ void getProperty(IR::Expr *base, const QString &, Expr *target) override
{
addDef(target);
addUses(base->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void setProperty(IR::Expr *source, IR::Expr *targetBase, const QString &)
+ void setProperty(IR::Expr *source, IR::Expr *targetBase, const QString &) override
{
addUses(source->asTemp(), Use::CouldHaveRegister);
addUses(targetBase->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase, IR::Member::MemberKind /*kind*/, int /*propertyIndex*/)
+ void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase,
+ IR::Member::MemberKind /*kind*/, int /*propertyIndex*/) override
{
addUses(source->asTemp(), Use::CouldHaveRegister);
addUses(targetBase->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int /*propertyIndex*/)
+ void setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int /*propertyIndex*/) override
{
addUses(source->asTemp(), Use::CouldHaveRegister);
addUses(targetBase->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int /*index*/, bool /*captureRequired*/, IR::Expr *target)
+ void getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int /*index*/,
+ bool /*captureRequired*/, IR::Expr *target) override
{
addDef(target);
addUses(base->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void getQObjectProperty(IR::Expr *base, int /*propertyIndex*/, bool /*captureRequired*/, bool /*isSingleton*/, int /*attachedPropertiesId*/, IR::Expr *target)
+ void getQObjectProperty(IR::Expr *base, int /*propertyIndex*/, bool /*captureRequired*/,
+ bool /*isSingleton*/, int /*attachedPropertiesId*/, IR::Expr *target) override
{
addDef(target);
addUses(base->asTemp(), Use::CouldHaveRegister);
addCall();
}
- virtual void getElement(IR::Expr *base, IR::Expr *index, Expr *target)
+ void getElement(IR::Expr *base, IR::Expr *index, Expr *target) override
{
addDef(target);
addUses(base->asTemp(), Use::CouldHaveRegister);
@@ -550,7 +554,7 @@ protected: // IRDecoder
addCall();
}
- virtual void setElement(IR::Expr *source, IR::Expr *targetBase, IR::Expr *targetIndex)
+ void setElement(IR::Expr *source, IR::Expr *targetBase, IR::Expr *targetIndex) override
{
addUses(source->asTemp(), Use::CouldHaveRegister);
addUses(targetBase->asTemp(), Use::CouldHaveRegister);
@@ -558,7 +562,7 @@ protected: // IRDecoder
addCall();
}
- virtual void copyValue(Expr *source, Expr *target)
+ void copyValue(Expr *source, Expr *target) override
{
addDef(target);
Temp *sourceTemp = source->asTemp();
@@ -570,13 +574,13 @@ protected: // IRDecoder
addHint(targetTemp, sourceTemp);
}
- virtual void swapValues(Expr *, Expr *)
+ void swapValues(Expr *, Expr *) override
{
// Inserted by the register allocator, so it cannot occur here.
Q_UNREACHABLE();
}
- virtual void unop(AluOp oper, Expr *source, Expr *target)
+ void unop(AluOp oper, Expr *source, Expr *target) override
{
addDef(target);
@@ -612,7 +616,7 @@ protected: // IRDecoder
}
}
- virtual void binop(AluOp oper, Expr *leftSource, Expr *rightSource, Expr *target)
+ void binop(AluOp oper, Expr *leftSource, Expr *rightSource, Expr *target) override
{
bool needsCall = true;
@@ -675,8 +679,8 @@ protected: // IRDecoder
}
}
- virtual void visitJump(IR::Jump *) {}
- virtual void visitCJump(IR::CJump *s)
+ void visitJump(IR::Jump *) override {}
+ void visitCJump(IR::CJump *s) override
{
if (Temp *t = s->cond->asTemp()) {
#if 0 // TODO: change masm to generate code
@@ -696,10 +700,10 @@ protected: // IRDecoder
}
}
- virtual void visitRet(IR::Ret *s)
+ void visitRet(IR::Ret *s) override
{ addUses(s->expr->asTemp(), Use::CouldHaveRegister); }
- virtual void visitPhi(IR::Phi *s)
+ void visitPhi(IR::Phi *s) override
{
addDef(s->targetTemp, true);
for (int i = 0, ei = s->incoming.size(); i < ei; ++i) {
@@ -716,7 +720,7 @@ protected: // IRDecoder
}
protected:
- virtual void callBuiltin(IR::Call *c, IR::Expr *result)
+ void callBuiltin(IR::Call *c, IR::Expr *result) override
{
addDef(result);
addUses(c->base, Use::CouldHaveRegister);
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp
index 1523817c9e..ffa6e29290 100644
--- a/src/qml/qml/ftw/qqmlthread.cpp
+++ b/src/qml/qml/ftw/qqmlthread.cpp
@@ -55,7 +55,7 @@ public:
QQmlThreadPrivate(QQmlThread *);
QQmlThread *q;
- virtual void run();
+ void run() override;
inline void lock() { _mutex.lock(); }
inline void unlock() { _mutex.unlock(); }
@@ -81,12 +81,12 @@ public:
void threadEvent();
protected:
- virtual bool event(QEvent *);
+ bool event(QEvent *) override;
private:
struct MainObject : public QObject {
MainObject(QQmlThreadPrivate *p);
- virtual bool event(QEvent *e);
+ bool event(QEvent *e) override;
QQmlThreadPrivate *p;
};
MainObject m_mainObject;
diff --git a/src/qml/qml/ftw/qqmlthread_p.h b/src/qml/qml/ftw/qqmlthread_p.h
index 9f180b1f14..295235e255 100644
--- a/src/qml/qml/ftw/qqmlthread_p.h
+++ b/src/qml/qml/ftw/qqmlthread_p.h
@@ -142,7 +142,7 @@ void QQmlThread::callMethodInThread(void (O::*Member)())
struct I : public Message {
void (O::*Member)();
I(void (O::*Member)()) : Member(Member) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)();
}
@@ -157,7 +157,7 @@ void QQmlThread::callMethodInThread(void (O::*Member)(V), const T &arg)
void (O::*Member)(V);
T arg;
I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg);
}
@@ -173,7 +173,7 @@ void QQmlThread::callMethodInThread(void (O::*Member)(V, V2), const T &arg, cons
T arg;
T2 arg2;
I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg, arg2);
}
@@ -187,7 +187,7 @@ void QQmlThread::callMethodInMain(void (O::*Member)())
struct I : public Message {
void (O::*Member)();
I(void (O::*Member)()) : Member(Member) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)();
}
@@ -202,7 +202,7 @@ void QQmlThread::callMethodInMain(void (O::*Member)(V), const T &arg)
void (O::*Member)(V);
T arg;
I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg);
}
@@ -218,7 +218,7 @@ void QQmlThread::callMethodInMain(void (O::*Member)(V, V2), const T &arg, const
T arg;
T2 arg2;
I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg, arg2);
}
@@ -232,7 +232,7 @@ void QQmlThread::postMethodToThread(void (O::*Member)())
struct I : public Message {
void (O::*Member)();
I(void (O::*Member)()) : Member(Member) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)();
}
@@ -247,7 +247,7 @@ void QQmlThread::postMethodToThread(void (O::*Member)(V), const T &arg)
void (O::*Member)(V);
T arg;
I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg);
}
@@ -263,7 +263,7 @@ void QQmlThread::postMethodToThread(void (O::*Member)(V, V2), const T &arg, cons
T arg;
T2 arg2;
I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg, arg2);
}
@@ -277,7 +277,7 @@ void QQmlThread::postMethodToMain(void (O::*Member)())
struct I : public Message {
void (O::*Member)();
I(void (O::*Member)()) : Member(Member) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)();
}
@@ -292,7 +292,7 @@ void QQmlThread::postMethodToMain(void (O::*Member)(V), const T &arg)
void (O::*Member)(V);
T arg;
I(void (O::*Member)(V), const T &arg) : Member(Member), arg(arg) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg);
}
@@ -308,7 +308,7 @@ void QQmlThread::postMethodToMain(void (O::*Member)(V, V2), const T &arg, const
T arg;
T2 arg2;
I(void (O::*Member)(V, V2), const T &arg, const T2 &arg2) : Member(Member), arg(arg), arg2(arg2) {}
- virtual void call(QQmlThread *thread) {
+ void call(QQmlThread *thread) override {
O *me = static_cast<O *>(thread);
(me->*Member)(arg, arg2);
}
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 6eda23c4c3..b78028dcf9 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1098,13 +1098,13 @@ public:
, incubatorObject(inc)
{}
- virtual void statusChanged(Status s) {
+ void statusChanged(Status s) override {
QV4::Scope scope(incubatorObject->internalClass->engine);
QV4::Scoped<QV4::QmlIncubatorObject> i(scope, incubatorObject);
i->statusChanged(s);
}
- virtual void setInitialState(QObject *o) {
+ void setInitialState(QObject *o) override {
QV4::Scope scope(incubatorObject->internalClass->engine);
QV4::Scoped<QV4::QmlIncubatorObject> i(scope, incubatorObject);
i->setInitialState(o);
diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h
index bbb9c36ce9..3111d1013e 100644
--- a/src/qml/qml/qqmlengine.h
+++ b/src/qml/qml/qqmlengine.h
@@ -151,7 +151,7 @@ public:
static ObjectOwnership objectOwnership(QObject *);
protected:
QQmlEngine(QQmlEnginePrivate &dd, QObject *p);
- virtual bool event(QEvent *);
+ bool event(QEvent *) override;
Q_SIGNALS:
void quit();
diff --git a/src/qml/qml/qqmlexpression_p.h b/src/qml/qml/qqmlexpression_p.h
index 809a57b169..81a749e017 100644
--- a/src/qml/qml/qqmlexpression_p.h
+++ b/src/qml/qml/qqmlexpression_p.h
@@ -85,8 +85,8 @@ public:
bool expressionFunctionValid:1;
// Inherited from QQmlJavaScriptExpression
- virtual QString expressionIdentifier();
- virtual void expressionChanged();
+ QString expressionIdentifier() override;
+ void expressionChanged() override;
QString expression;
diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h
index de482d0352..934cf0f51a 100644
--- a/src/qml/qml/qqmlextensionplugin.h
+++ b/src/qml/qml/qqmlextensionplugin.h
@@ -64,7 +64,7 @@ public:
QUrl baseUrl() const;
virtual void registerTypes(const char *uri) = 0;
- virtual void initializeEngine(QQmlEngine *engine, const char *uri);
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
private:
Q_DISABLE_COPY(QQmlExtensionPlugin)
diff --git a/src/qml/qml/qqmlfileselector_p.h b/src/qml/qml/qqmlfileselector_p.h
index 57ef194c10..a7360f83d9 100644
--- a/src/qml/qml/qqmlfileselector_p.h
+++ b/src/qml/qml/qqmlfileselector_p.h
@@ -80,7 +80,7 @@ public:
QQmlFileSelectorInterceptor(QQmlFileSelectorPrivate* pd);
QQmlFileSelectorPrivate* d;
protected:
- virtual QUrl intercept(const QUrl &path, DataType type);
+ QUrl intercept(const QUrl &path, DataType type) override;
};
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
index 0ce769aaea..963638ca34 100644
--- a/src/qml/qml/qqmlincubator.cpp
+++ b/src/qml/qml/qqmlincubator.cpp
@@ -206,7 +206,7 @@ public:
}
protected:
- virtual void timerEvent(QTimerEvent *) {
+ void timerEvent(QTimerEvent *) override {
incubateFor(5);
}
};
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index f1562131fc..183baec941 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -122,8 +122,8 @@ public:
void emitPropertyNotification(const QByteArray &propertyName);
protected:
- virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
- virtual int createProperty(const char *, const char *);
+ int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override;
+ int createProperty(const char *, const char *) override;
virtual void propertyRead(int);
virtual void propertyWrite(int);
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 4da02037fa..c27ea796e0 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -437,8 +437,8 @@ public:
QByteArray checksum(bool *ok);
protected:
- virtual void destroy();
- virtual void clear();
+ void destroy() override;
+ void clear() override;
private:
friend class QQmlEnginePrivate;
diff --git a/src/qml/qml/qqmlproxymetaobject_p.h b/src/qml/qml/qqmlproxymetaobject_p.h
index 7083f88fa7..2b7a980361 100644
--- a/src/qml/qml/qqmlproxymetaobject_p.h
+++ b/src/qml/qml/qqmlproxymetaobject_p.h
@@ -74,10 +74,10 @@ public:
};
QQmlProxyMetaObject(QObject *, QList<ProxyData> *);
- virtual ~QQmlProxyMetaObject();
+ ~QQmlProxyMetaObject();
protected:
- virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
+ int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override;
private:
QList<ProxyData> *metaObjects;
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 7730233a93..b576366abf 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -166,7 +166,7 @@ public:
void initializeEngine(QQmlExtensionInterface *, const char *);
protected:
- virtual void shutdownThread();
+ void shutdownThread() override;
private:
void loadThread(QQmlDataBlob *b);
@@ -2891,7 +2891,7 @@ QQmlScriptData *QQmlScriptBlob::scriptData() const
struct EmptyCompilationUnit : public QV4::CompiledData::CompilationUnit
{
- virtual void linkBackendToEngine(QV4::ExecutionEngine *) {}
+ void linkBackendToEngine(QV4::ExecutionEngine *) override {}
};
void QQmlScriptBlob::dataReceived(const Data &data)
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index 5c779e450d..12c55e9179 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -242,8 +242,8 @@ public:
virtual void scriptImported(QQmlScriptBlob *, const QV4::CompiledData::Location &, const QString &, const QString &) {}
- virtual void dependencyError(QQmlDataBlob *);
- virtual void dependencyComplete(QQmlDataBlob *);
+ void dependencyError(QQmlDataBlob *) override;
+ void dependencyComplete(QQmlDataBlob *) override;
protected:
virtual QString stringAt(int) const { return QString(); }
@@ -433,14 +433,14 @@ public:
void unregisterCallback(TypeDataCallback *);
protected:
- virtual void done();
- virtual void completed();
- virtual void dataReceived(const Data &);
- virtual void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit);
- virtual void allDependenciesDone();
- virtual void downloadProgressChanged(qreal);
+ void done() override;
+ void completed() override;
+ void dataReceived(const Data &) override;
+ void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit) override;
+ void allDependenciesDone() override;
+ void downloadProgressChanged(qreal) override;
- virtual QString stringAt(int index) const;
+ QString stringAt(int index) const override;
private:
bool tryLoadFromDiskCache();
@@ -457,7 +457,7 @@ private:
const QV4::CompiledData::ResolvedTypeReferenceMap &resolvedTypeCache);
bool resolveType(const QString &typeName, int &majorVersion, int &minorVersion, TypeReference &ref);
- virtual void scriptImported(QQmlScriptBlob *blob, const QV4::CompiledData::Location &location, const QString &qualifier, const QString &nameSpace);
+ void scriptImported(QQmlScriptBlob *blob, const QV4::CompiledData::Location &location, const QString &qualifier, const QString &nameSpace) override;
qint64 m_sourceTimeStamp = 0;
@@ -509,7 +509,7 @@ public:
QV4::ReturnedValue scriptValueForContext(QQmlContextData *parentCtxt);
protected:
- virtual void clear(); // From QQmlCleanup
+ void clear() override; // From QQmlCleanup
private:
friend class QQmlScriptBlob;
@@ -545,14 +545,14 @@ public:
QQmlScriptData *scriptData() const;
protected:
- virtual void dataReceived(const Data &);
- virtual void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit);
- virtual void done();
+ void dataReceived(const Data &) override;
+ void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *unit) override;
+ void done() override;
- virtual QString stringAt(int index) const;
+ QString stringAt(int index) const override;
private:
- virtual void scriptImported(QQmlScriptBlob *blob, const QV4::CompiledData::Location &location, const QString &qualifier, const QString &nameSpace);
+ void scriptImported(QQmlScriptBlob *blob, const QV4::CompiledData::Location &location, const QString &qualifier, const QString &nameSpace) override;
void initializeFromCompilationUnit(QV4::CompiledData::CompilationUnit *unit);
QList<ScriptReference> m_scripts;
diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h
index 11e1dfdb00..0502a5d665 100644
--- a/src/qml/qml/qqmlvaluetype_p.h
+++ b/src/qml/qml/qqmlvaluetype_p.h
@@ -74,9 +74,9 @@ public:
void setValue(const QVariant &);
// ---- dynamic meta object data interface
- virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *);
- virtual void objectDestroyed(QObject *);
- virtual int metaCall(QObject *obj, QMetaObject::Call type, int _id, void **argv);
+ QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *) override;
+ void objectDestroyed(QObject *) override;
+ int metaCall(QObject *obj, QMetaObject::Call type, int _id, void **argv) override;
// ----
private:
diff --git a/src/qml/types/qqmlbind_p.h b/src/qml/types/qqmlbind_p.h
index 77939a40bc..c9dd14b58a 100644
--- a/src/qml/types/qqmlbind_p.h
+++ b/src/qml/types/qqmlbind_p.h
@@ -90,9 +90,9 @@ public:
void setDelayed(bool);
protected:
- virtual void setTarget(const QQmlProperty &);
- virtual void classBegin();
- virtual void componentComplete();
+ void setTarget(const QQmlProperty &) override;
+ void classBegin() override;
+ void componentComplete() override;
private:
void prepareEval();
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index 62c45d77f9..7031cf779c 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -190,8 +190,8 @@ public:
, incubating(0)
, vdm(l) {}
- virtual void statusChanged(Status);
- virtual void setInitialState(QObject *);
+ void statusChanged(Status) override;
+ void setInitialState(QObject *) override;
QQmlDelegateModelItem *incubating;
QQmlDelegateModelPrivate *vdm;
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h
index a6e6aaea90..f99b717c40 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qml/types/qqmllistmodel_p_p.h
@@ -124,7 +124,7 @@ public:
ModelNodeMetaObject(QObject *object, QQmlListModel *model, int elementIndex);
~ModelNodeMetaObject();
- virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *object);
+ QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *object) override;
static ModelNodeMetaObject *get(QObject *obj);
diff --git a/src/qml/types/qqmltimer.cpp b/src/qml/types/qqmltimer.cpp
index 889274b43e..7efdac4c22 100644
--- a/src/qml/types/qqmltimer.cpp
+++ b/src/qml/types/qqmltimer.cpp
@@ -60,8 +60,8 @@ public:
: interval(1000), running(false), repeating(false), triggeredOnStart(false)
, classBegun(false), componentComplete(false), firstTick(true), awaitingTick(false) {}
- virtual void animationFinished(QAbstractAnimationJob *);
- virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) { maybeTick(); }
+ void animationFinished(QAbstractAnimationJob *) override;
+ void animationCurrentLoopChanged(QAbstractAnimationJob *) override { maybeTick(); }
void maybeTick() {
Q_Q(QQmlTimer);
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 10666476fe..b77675df0e 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -145,7 +145,7 @@ public:
void init();
#ifndef QT_NO_NETWORK
- virtual QNetworkAccessManager *networkAccessManager();
+ QNetworkAccessManager *networkAccessManager() override;
#endif
QQuickWorkerScriptEnginePrivate *p;
@@ -192,7 +192,7 @@ signals:
void stopThread();
protected:
- virtual bool event(QEvent *);
+ bool event(QEvent *) override;
private:
void processMessage(int, const QByteArray &);
diff --git a/src/qml/util/qqmlpropertymap.cpp b/src/qml/util/qqmlpropertymap.cpp
index 69d3fc25e1..6e6554f2c3 100644
--- a/src/qml/util/qqmlpropertymap.cpp
+++ b/src/qml/util/qqmlpropertymap.cpp
@@ -54,10 +54,10 @@ public:
QQmlPropertyMapMetaObject(QQmlPropertyMap *obj, QQmlPropertyMapPrivate *objPriv, const QMetaObject *staticMetaObject);
protected:
- virtual QVariant propertyWriteValue(int, const QVariant &);
- virtual void propertyWritten(int index);
- virtual void propertyCreated(int, QMetaPropertyBuilder &);
- virtual int createProperty(const char *, const char *);
+ QVariant propertyWriteValue(int, const QVariant &) override;
+ void propertyWritten(int index) override;
+ void propertyCreated(int, QMetaPropertyBuilder &) override;
+ int createProperty(const char *, const char *) override;
const QString &propertyName(int index);