Fix build of tst_qqmlecmascript
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 13 May 2013 14:59:40 +0000 (16:59 +0200)
committerLars Knoll <lars.knoll@digia.com>
Wed, 15 May 2013 21:40:14 +0000 (23:40 +0200)
Comment out v8 persistent and weak reference handling related bits and
tests. Otherwise this auto test contains a lot of stuff we need.

Change-Id: Ieafd9c8ea5200e5429d6354243ccaddba4f4772e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qqmlecmascript/testtypes.cpp
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp

index 8b02783..ee801ef 100644 (file)
@@ -104,7 +104,7 @@ public:
     void setWidth(int) { }
 };
 
-void MyQmlObject::v8function(QQmlV8Function *)
+void MyQmlObject::v8function(QQmlV4Function *)
 {
     const char *error = "Exception thrown from within QObject slot";
     v8::ThrowException(v8::Exception::Error(v8::String::New(error)));
@@ -299,8 +299,10 @@ void registerTypes()
     qRegisterMetaType<MyQmlObject::MyEnum2>("MyEnum2");
     qRegisterMetaType<Qt::MouseButtons>("Qt::MouseButtons");
 
+#if 0
     qmlRegisterType<CircularReferenceObject>("Qt.test", 1, 0, "CircularReferenceObject");
     qmlRegisterType<CircularReferenceHandle>("Qt.test", 1, 0, "CircularReferenceHandle");
+#endif
 
     qmlRegisterType<MyDynamicCreationDestructionObject>("Qt.test", 1, 0, "MyDynamicCreationDestructionObject");
     qmlRegisterType<WriteCounter>("Qt.test", 1, 0, "WriteCounter");
index e4dd1e3..ca8f97a 100644 (file)
@@ -265,7 +265,7 @@ public slots:
     void myinvokable(MyQmlObject *o) { myinvokableObject = o; }
     void variantMethod(const QVariant &v) { m_variant = v; }
     void qjsvalueMethod(const QJSValue &v) { m_qjsvalue = v; }
-    void v8function(QQmlV8Function*);
+    void v8function(QQmlV4Function*);
     void registeredFlagMethod(Qt::MouseButtons v) { m_buttons = v; }
 
 private:
@@ -1172,6 +1172,7 @@ private:
     int m_value;
 };
 
+#if 0
 class CircularReferenceObject : public QObject,
                                 public QV8GCCallback::Node
 {
@@ -1285,6 +1286,7 @@ private:
     QV8Engine* m_engine;
 };
 Q_DECLARE_METATYPE(CircularReferenceHandle*)
+#endif
 
 class MyDynamicCreationDestructionObject : public QObject
 {
index 364359f..5c0e277 100644 (file)
@@ -156,8 +156,10 @@ private slots:
     void singletonTypeCaching();
     void singletonTypeImportOrder();
     void singletonTypeResolution();
+#if 0
     void importScripts_data();
     void importScripts();
+#endif
     void scarceResources();
     void scarceResources_data();
     void scarceResources_other();
@@ -173,13 +175,13 @@ private slots:
     void propertyVarReparentNullContext();
     void propertyVarCircular();
     void propertyVarCircular2();
-    void propertyVarInheritance();
-    void propertyVarInheritance2();
+//    void propertyVarInheritance();
+//    void propertyVarInheritance2();
     void elementAssign();
     void objectPassThroughSignals();
     void objectConversion();
     void booleanConversion();
-    void handleReferenceManagement();
+//    void handleReferenceManagement();
     void stringArg();
     void readonlyDeclaration();
     void sequenceConversionRead();
@@ -291,8 +293,8 @@ private slots:
     void stringParsing();
 
 private:
-    static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
-    static void verifyContextLifetime(QQmlContextData *ctxt);
+//    static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
+//    static void verifyContextLifetime(QQmlContextData *ctxt);
     QQmlEngine engine;
 };
 
@@ -3767,6 +3769,7 @@ void tst_qqmlecmascript::singletonTypeResolution()
     delete object;
 }
 
+#if 0
 void tst_qqmlecmascript::verifyContextLifetime(QQmlContextData *ctxt) {
     QQmlContextData *childCtxt = ctxt->childContexts;
 
@@ -3797,7 +3800,9 @@ void tst_qqmlecmascript::verifyContextLifetime(QQmlContextData *ctxt) {
         childCtxt = childCtxt->nextChild;
     }
 }
+#endif
 
+#if 0
 void tst_qqmlecmascript::importScripts_data()
 {
     QTest::addColumn<QUrl>("testfile");
@@ -4040,6 +4045,7 @@ void tst_qqmlecmascript::importScripts()
 
     engine.setImportPathList(importPathList);
 }
+#endif
 
 void tst_qqmlecmascript::scarceResources_other()
 {
@@ -4840,6 +4846,7 @@ void tst_qqmlecmascript::propertyVarCircular2()
     delete object;
 }
 
+#if 0
 void tst_qqmlecmascript::propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter)
 {
     *(int*)(parameter) += 1;
@@ -4923,6 +4930,7 @@ void tst_qqmlecmascript::propertyVarInheritance2()
     QVERIFY(propertyVarWeakRefCallbackCount == 1);                 // should have been collected now.
     delete object;
 }
+#endif
 
 // Ensure that QObject type conversion works on binding assignment
 void tst_qqmlecmascript::elementAssign()
@@ -4986,6 +4994,7 @@ void tst_qqmlecmascript::booleanConversion()
     delete object;
 }
 
+#if 0
 void tst_qqmlecmascript::handleReferenceManagement()
 {
 
@@ -5304,6 +5313,7 @@ void tst_qqmlecmascript::handleReferenceManagement()
         delete object;
     }
 }
+#endif
 
 void tst_qqmlecmascript::stringArg()
 {