Declare QJSValue as a metatype where it is defined.
authorStephen Kelly <stephen.kelly@kdab.com>
Tue, 4 Dec 2012 13:24:43 +0000 (14:24 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 4 Dec 2012 15:14:19 +0000 (16:14 +0100)
Instead of in multiple different TUs, therefore causing ODR violations.

Change-Id: I08d3624d3ed5a995e96488361665afa197fb9fc9
Reviewed-by: JÄ™drzej Nowacki <jedrzej.nowacki@digia.com>

17 files changed:
src/qml/qml/qqmlcompiler.cpp
src/qml/qml/qqmlproperty.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/qml/v4/qv4bindings.cpp
src/qml/qml/v4/qv4compiler.cpp
src/qml/qml/v4/qv4irbuilder.cpp
src/qml/qml/v8/qjsengine.cpp
src/qml/qml/v8/qjsvalue.h
src/qml/qml/v8/qv8engine.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
tests/auto/qml/qjsvalue/tst_qjsvalue.h
tests/auto/qml/qjsvalueiterator/tst_qjsvalueiterator.cpp
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmllanguage/testtypes.h
tests/benchmarks/qml/js/qjsengine/tst_qjsengine.cpp
tests/benchmarks/qml/js/qjsvalue/tst_qjsvalue.cpp

index 0b22228..06a91e3 100644 (file)
@@ -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
 
index a2bd374..62539b7 100644 (file)
@@ -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>)
index fd3fc4a..9922a82 100644 (file)
@@ -61,8 +61,6 @@
 #  pragma warning( disable : 4200 )
 #endif
 
-Q_DECLARE_METATYPE(QJSValue)
-
 QT_BEGIN_NAMESPACE
 
 #define Q_INT16_MAX 32767
index 14d25b6..8dc9943 100644 (file)
@@ -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)
index 84bdbfd..48b2ad9 100644 (file)
@@ -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 )
index 2b01acb..c12d59d 100644 (file)
@@ -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)
index 29abd51..567906b 100644 (file)
@@ -48,8 +48,6 @@
 
 DEFINE_BOOL_CONFIG_OPTION(qmlVerboseCompiler, QML_VERBOSE_COMPILER)
 
-Q_DECLARE_METATYPE(QJSValue)
-
 QT_BEGIN_NAMESPACE
 
 using namespace QQmlJS;
index 5bb6db1..9698ed5 100644 (file)
@@ -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>)
 
index 9223e57..d13be2b 100644 (file)
@@ -155,6 +155,8 @@ private:
 
 QT_END_NAMESPACE
 
+Q_DECLARE_METATYPE(QJSValue)
+
 QT_END_HEADER
 
 #endif
index 1544b07..806e369 100644 (file)
@@ -63,7 +63,6 @@
 #include <QtCore/qjsonobject.h>
 #include <QtCore/qjsonvalue.h>
 
-Q_DECLARE_METATYPE(QJSValue)
 Q_DECLARE_METATYPE(QList<int>)
 
 
index 60b81e0..eac8c93 100644 (file)
@@ -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)
index fa0aad7..ab9a5ed 100644 (file)
@@ -49,7 +49,6 @@
 #include <QtTest/QtTest>
 
 Q_DECLARE_METATYPE(QVariant)
-Q_DECLARE_METATYPE(QJSValue)
 
 class tst_QJSValue : public QObject
 {
index 7648836..987f060 100644 (file)
@@ -46,8 +46,6 @@
 #include <QJSValue>
 #include <QJSValueIterator>
 
-Q_DECLARE_METATYPE(QJSValue);
-
 class tst_QJSValueIterator : public QObject
 {
     Q_OBJECT
index aa00115..a3a76bf 100644 (file)
@@ -696,7 +696,6 @@ public:
     }
 };
 
-Q_DECLARE_METATYPE(QJSValue);
 class MyInvokableBaseObject : public QObject
 {
     Q_OBJECT
index 1f9a849..bd6205c 100644 (file)
@@ -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);
index fb68468..587d9d4 100644 (file)
@@ -43,9 +43,6 @@
 #include <QtQml/qjsvalue.h>
 #include <QtQml/qjsengine.h>
 
-
-Q_DECLARE_METATYPE(QJSValue)
-
 class tst_QJSEngine : public QObject
 {
     Q_OBJECT
index 738bdf6..7b2dc3a 100644 (file)
@@ -43,8 +43,6 @@
 #include <QtQml/qjsvalue.h>
 #include <QtQml/qjsengine.h>
 
-Q_DECLARE_METATYPE(QJSValue)
-
 class tst_QJSValue : public QObject
 {
     Q_OBJECT