From e5c70545a4c8479a9bc6ee1bae296d39e1a35d2e Mon Sep 17 00:00:00 2001 From: Frank Meerkoetter Date: Thu, 30 Jul 2015 22:16:29 +0200 Subject: [PATCH] Mark methods as overrides Let the compiler help to catch interface changes Change-Id: Ic4add183ca95ef287df41f35bd25c3e9eb15032f Reviewed-by: Simon Hausmann --- src/quick/util/qquickglobal.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp index d7f1158a6..55544b1ea 100644 --- a/src/quick/util/qquickglobal.cpp +++ b/src/quick/util/qquickglobal.cpp @@ -397,7 +397,7 @@ public: return 0; } - bool init(int type, QVariant& dst) + bool init(int type, QVariant& dst) Q_DECL_OVERRIDE { switch (type) { case QMetaType::QColor: @@ -427,7 +427,7 @@ public: return false; } - bool create(int type, int argc, const void *argv[], QVariant *v) + bool create(int type, int argc, const void *argv[], QVariant *v) Q_DECL_OVERRIDE { switch (type) { case QMetaType::QFont: // must specify via js-object. @@ -490,7 +490,7 @@ public: return true; } - bool createFromString(int type, const QString &s, void *data, size_t dataSize) + bool createFromString(int type, const QString &s, void *data, size_t dataSize) Q_DECL_OVERRIDE { bool ok = false; @@ -521,7 +521,7 @@ public: return false; } - bool createStringFrom(int type, const void *data, QString *s) + bool createStringFrom(int type, const void *data, QString *s) Q_DECL_OVERRIDE { if (type == QMetaType::QColor) { const QColor *color = reinterpret_cast(data); @@ -532,7 +532,7 @@ public: return false; } - bool variantFromString(const QString &s, QVariant *v) + bool variantFromString(const QString &s, QVariant *v) Q_DECL_OVERRIDE { QColor c(s); if (c.isValid()) { @@ -575,7 +575,7 @@ public: return false; } - bool variantFromString(int type, const QString &s, QVariant *v) + bool variantFromString(int type, const QString &s, QVariant *v) Q_DECL_OVERRIDE { bool ok = false; @@ -618,7 +618,7 @@ public: return false; } - bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) + bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) Q_DECL_OVERRIDE { QV4::Scope scope(v4); #ifndef QT_NO_DEBUG @@ -644,7 +644,7 @@ public: return (*(reinterpret_cast(lhs)) == rhs.value()); } - bool equal(int type, const void *lhs, const QVariant &rhs) + bool equal(int type, const void *lhs, const QVariant &rhs) Q_DECL_OVERRIDE { switch (type) { case QMetaType::QColor: @@ -677,7 +677,7 @@ public: return true; } - bool store(int type, const void *src, void *dst, size_t dstSize) + bool store(int type, const void *src, void *dst, size_t dstSize) Q_DECL_OVERRIDE { switch (type) { case QMetaType::QColor: @@ -730,7 +730,7 @@ public: return true; } - bool read(const QVariant &src, void *dst, int dstType) + bool read(const QVariant &src, void *dst, int dstType) Q_DECL_OVERRIDE { switch (dstType) { case QMetaType::QColor: @@ -764,7 +764,7 @@ public: return false; } - bool write(int type, const void *src, QVariant& dst) + bool write(int type, const void *src, QVariant& dst) Q_DECL_OVERRIDE { switch (type) { case QMetaType::QColor: -- 2.34.1