From: Stephen Kelly Date: Tue, 4 Dec 2012 13:24:43 +0000 (+0100) Subject: Declare QJSValue as a metatype where it is defined. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=964d9496ad0cb9af5a75d3f2588ece3d6a5f9062;p=konrad%2Fqtdeclarative.git 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 --- diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 0b22228..06a91e3 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -76,7 +76,6 @@ Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(QJSValue) QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index a2bd374..62539b7 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -64,7 +64,6 @@ #include -Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index fd3fc4a..9922a82 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 14d25b6..8dc9943 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -53,8 +53,6 @@ #include #include -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 84bdbfd..48b2ad9 100644 --- a/src/qml/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -68,8 +68,6 @@ #include #include // ::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 2b01acb..c12d59d 100644 --- a/src/qml/qml/v4/qv4compiler.cpp +++ b/src/qml/qml/v4/qv4compiler.cpp @@ -50,8 +50,6 @@ #include #include -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 29abd51..567906b 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 5bb6db1..9698ed5 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) diff --git a/src/qml/qml/v8/qjsvalue.h b/src/qml/qml/v8/qjsvalue.h index 9223e57..d13be2b 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 1544b07..806e369 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -63,7 +63,6 @@ #include #include -Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QList) diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index 60b81e0..eac8c93 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -62,8 +62,6 @@ #include #include -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 fa0aad7..ab9a5ed 100644 --- a/tests/auto/qml/qjsvalue/tst_qjsvalue.h +++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.h @@ -49,7 +49,6 @@ #include 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 7648836..987f060 100644 --- a/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp +++ b/tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp @@ -46,8 +46,6 @@ #include #include -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 aa00115..a3a76bf 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 1f9a849..bd6205c 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 fb68468..587d9d4 100644 --- a/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp +++ b/tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp @@ -43,9 +43,6 @@ #include #include - -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 738bdf6..7b2dc3a 100644 --- a/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp +++ b/tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp @@ -43,8 +43,6 @@ #include #include -Q_DECLARE_METATYPE(QJSValue) - class tst_QJSValue : public QObject { Q_OBJECT