aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypes/testtypes.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-11 11:12:51 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-11 22:08:30 +0200
commit0d28805cc7790511b9414a900be57f3b2d8d63a8 (patch)
tree7024857bab292b347a48d77f1831bf37e5e23f28 /tests/auto/qml/qqmlvaluetypes/testtypes.h
parent2181ef9d29c71273accab710a68907c5d42771db (diff)
Mark overrides in tests to silence compiler warnings
Pick-to: 6.1 Change-Id: Ieed929dcd7b550a1dc365d34b6f20f2f0e2d057f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlvaluetypes/testtypes.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/testtypes.h b/tests/auto/qml/qqmlvaluetypes/testtypes.h
index 78797f06b1..5b1b3ce7fd 100644
--- a/tests/auto/qml/qqmlvaluetypes/testtypes.h
+++ b/tests/auto/qml/qqmlvaluetypes/testtypes.h
@@ -196,7 +196,7 @@ class MyConstantValueSource : public QObject, public QQmlPropertyValueSource
Q_OBJECT
Q_INTERFACES(QQmlPropertyValueSource)
public:
- virtual void setTarget(const QQmlProperty &p) { p.write(3345); }
+ void setTarget(const QQmlProperty &p) override { p.write(3345); }
};
class MyOffsetValueInterceptor : public QObject, public QQmlPropertyValueInterceptor
@@ -204,8 +204,8 @@ class MyOffsetValueInterceptor : public QObject, public QQmlPropertyValueInterce
Q_OBJECT
Q_INTERFACES(QQmlPropertyValueInterceptor)
public:
- virtual void setTarget(const QQmlProperty &p) { prop = p; }
- virtual void write(const QVariant &value) { QQmlPropertyPrivate::write(prop, value.toInt() + 13, QQmlPropertyData::BypassInterceptor); }
+ void setTarget(const QQmlProperty &p) override { prop = p; }
+ void write(const QVariant &value) override { QQmlPropertyPrivate::write(prop, value.toInt() + 13, QQmlPropertyData::BypassInterceptor); }
private:
QQmlProperty prop;
@@ -217,8 +217,8 @@ class MyColorInterceptor : public QObject, public QQmlPropertyValueInterceptor
Q_OBJECT
Q_INTERFACES(QQmlPropertyValueInterceptor)
public:
- virtual void setTarget(const QQmlProperty &p) { prop = p; }
- virtual void write(const QVariant &v)
+ void setTarget(const QQmlProperty &p) override { prop = p; }
+ void write(const QVariant &v) override
{
QColor c = v.value<QColor>();
@@ -238,8 +238,8 @@ class MyFloatSetInterceptor : public QObject, public QQmlPropertyValueIntercepto
Q_OBJECT
Q_INTERFACES(QQmlPropertyValueInterceptor)
public:
- virtual void setTarget(const QQmlProperty &p) { prop = p; }
- virtual void write(const QVariant &)
+ void setTarget(const QQmlProperty &p) override { prop = p; }
+ void write(const QVariant &) override
{
QQmlPropertyPrivate::write(prop, 0.0f, QQmlPropertyData::BypassInterceptor);
}
@@ -253,8 +253,8 @@ class MyFloatIgnoreInterceptor : public QObject, public QQmlPropertyValueInterce
Q_OBJECT
Q_INTERFACES(QQmlPropertyValueInterceptor)
public:
- virtual void setTarget(const QQmlProperty &) {}
- virtual void write(const QVariant &) {}
+ void setTarget(const QQmlProperty &) override {}
+ void write(const QVariant &) override {}
};
class MyColorObject : public QObject