diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-12-04 14:24:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-04 16:14:19 +0100 |
commit | 964d9496ad0cb9af5a75d3f2588ece3d6a5f9062 (patch) | |
tree | 56001e211e2a38d58efc510daaf7a12fdd325875 | |
parent | 4d6fcff41fa1bedd9f9af68a77ae56792d42d995 (diff) |
Declare QJSValue as a metatype where it is defined.
Instead of in multiple different TUs, therefore causing ODR violations.
Change-Id: I08d3624d3ed5a995e96488361665afa197fb9fc9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmlproperty.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v4/qv4bindings.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v4/qv4compiler.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v4/qv4irbuilder.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v8/qjsengine.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/v8/qjsvalue.h | 2 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8qobjectwrapper.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qjsvalue/tst_qjsvalue.h | 1 | ||||
-rw-r--r-- | tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.h | 1 | ||||
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.h | 2 | ||||
-rw-r--r-- | tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp | 3 | ||||
-rw-r--r-- | tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp | 2 |
17 files changed, 2 insertions, 27 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 0b22228034..06a91e39b3 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -76,7 +76,6 @@ Q_DECLARE_METATYPE(QList<qreal>) Q_DECLARE_METATYPE(QList<bool>) Q_DECLARE_METATYPE(QList<QString>) Q_DECLARE_METATYPE(QList<QUrl>) -Q_DECLARE_METATYPE(QJSValue) QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index a2bd3742aa..62539b71e9 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -64,7 +64,6 @@ #include <math.h> -Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QList<int>) Q_DECLARE_METATYPE(QList<qreal>) Q_DECLARE_METATYPE(QList<bool>) diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index fd3fc4a356..9922a82c3d 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -61,8 +61,6 @@ # pragma warning( disable : 4200 ) #endif -Q_DECLARE_METATYPE(QJSValue) - QT_BEGIN_NAMESPACE #define Q_INT16_MAX 32767 diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 14d25b6a5e..8dc9943ddc 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -53,8 +53,6 @@ #include <private/qv8variantresource_p.h> #include <private/qqmlglobal_p.h> -Q_DECLARE_METATYPE(QJSValue); - QT_BEGIN_NAMESPACE QQmlVMEVariantQObjectPtr::QQmlVMEVariantQObjectPtr(bool isVar) diff --git a/src/qml/qml/v4/qv4bindings.cpp b/src/qml/qml/v4/qv4bindings.cpp index 84bdbfda7a..48b2ad948a 100644 --- a/src/qml/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -68,8 +68,6 @@ #include <QtCore/qmath.h> #include <math.h> // ::fmod -Q_DECLARE_METATYPE(QJSValue) - #ifdef Q_CC_MSVC // MSVC2010 warns about 'unreferenced formal parameter', even if it's used in p->~T() # pragma warning( disable : 4100 ) diff --git a/src/qml/qml/v4/qv4compiler.cpp b/src/qml/qml/v4/qv4compiler.cpp index 2b01acbddf..c12d59d420 100644 --- a/src/qml/qml/v4/qv4compiler.cpp +++ b/src/qml/qml/v4/qv4compiler.cpp @@ -50,8 +50,6 @@ #include <private/qqmlaccessors_p.h> #include <private/qqmljsengine_p.h> -Q_DECLARE_METATYPE(QJSValue) - QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP) diff --git a/src/qml/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp index 29abd51a81..567906b1be 100644 --- a/src/qml/qml/v4/qv4irbuilder.cpp +++ b/src/qml/qml/v4/qv4irbuilder.cpp @@ -48,8 +48,6 @@ DEFINE_BOOL_CONFIG_OPTION(qmlVerboseCompiler, QML_VERBOSE_COMPILER) -Q_DECLARE_METATYPE(QJSValue) - QT_BEGIN_NAMESPACE using namespace QQmlJS; diff --git a/src/qml/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp index 5bb6db16e0..9698ed5e8a 100644 --- a/src/qml/qml/v8/qjsengine.cpp +++ b/src/qml/qml/v8/qjsengine.cpp @@ -68,7 +68,6 @@ #define Q_D(blah) #define Q_Q(blah) -Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QObjectList) Q_DECLARE_METATYPE(QList<int>) diff --git a/src/qml/qml/v8/qjsvalue.h b/src/qml/qml/v8/qjsvalue.h index 9223e57ee4..d13be2b8cc 100644 --- a/src/qml/qml/v8/qjsvalue.h +++ b/src/qml/qml/v8/qjsvalue.h @@ -155,6 +155,8 @@ private: QT_END_NAMESPACE +Q_DECLARE_METATYPE(QJSValue) + QT_END_HEADER #endif diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 1544b0717b..806e3690b3 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -63,7 +63,6 @@ #include <QtCore/qjsonobject.h> #include <QtCore/qjsonvalue.h> -Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QList<int>) diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index 60b81e02e2..eac8c93c08 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -62,8 +62,6 @@ #include <QtCore/qtimer.h> #include <QtCore/qatomic.h> -Q_DECLARE_METATYPE(QJSValue); - QT_BEGIN_NAMESPACE #if defined(__GNUC__) && !defined(__INTEL_COMPILER) diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.h b/tests/auto/qml/qjsvalue/tst_qjsvalue.h index fa0aad7a51..ab9a5ed771 100644 --- a/tests/auto/qml/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.h @@ -49,7 +49,6 @@ #include <QtTest/QtTest> Q_DECLARE_METATYPE(QVariant) -Q_DECLARE_METATYPE(QJSValue) class tst_QJSValue : public QObject { diff --git a/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp b/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp index 7648836b54..987f060b20 100644 --- a/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp +++ b/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp @@ -46,8 +46,6 @@ #include <QJSValue> #include <QJSValueIterator> -Q_DECLARE_METATYPE(QJSValue); - class tst_QJSValueIterator : public QObject { Q_OBJECT diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index aa00115f5e..a3a76bf4f1 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -696,7 +696,6 @@ public: } }; -Q_DECLARE_METATYPE(QJSValue); class MyInvokableBaseObject : public QObject { Q_OBJECT diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 1f9a8492d9..bd6205cbdf 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -66,8 +66,6 @@ public: int id; }; -Q_DECLARE_METATYPE(QJSValue) - QT_BEGIN_NAMESPACE #define MyInterface_iid "org.qt-project.Qt.Test.MyInterface" Q_DECLARE_INTERFACE(MyInterface, MyInterface_iid); diff --git a/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp b/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp index fb684685c3..587d9d47e9 100644 --- a/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp +++ b/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp @@ -43,9 +43,6 @@ #include <QtQml/qjsvalue.h> #include <QtQml/qjsengine.h> - -Q_DECLARE_METATYPE(QJSValue) - class tst_QJSEngine : public QObject { Q_OBJECT diff --git a/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp b/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp index 738bdf619a..7b2dc3a08d 100644 --- a/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp +++ b/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp @@ -43,8 +43,6 @@ #include <QtQml/qjsvalue.h> #include <QtQml/qjsengine.h> -Q_DECLARE_METATYPE(QJSValue) - class tst_QJSValue : public QObject { Q_OBJECT |