delete object;
}
+#if defined(Q_CC_GNU)
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
+#define pop_gcc_flags
+#pragma GCC push_options
+#pragma GCC optimize ("O0")
+#endif
+#endif
+
void tst_qqmlecmascript::propertyVarInheritance()
{
// enforce behaviour regarding element inheritance - ensure handle disposal.
{
// XXX NOTE: this is very implementation dependent. QDVMEMO->vmeProperty() is the only
// public function which can return us a handle to something in the varProperties array.
- icoCanaryHandle = icovmemo->vmeProperty(ico5->metaObject()->indexOfProperty("circ"));
- ccoCanaryHandle = ccovmemo->vmeProperty(cco5->metaObject()->indexOfProperty("circ"));
+ QV4::Value tmp = icovmemo->vmeProperty(ico5->metaObject()->indexOfProperty("circ"));
+ icoCanaryHandle = tmp;
+ tmp = ccovmemo->vmeProperty(cco5->metaObject()->indexOfProperty("circ"));
+ ccoCanaryHandle = tmp;
+ tmp = QV4::Value::nullValue();
QVERIFY(!icoCanaryHandle.isEmpty());
QVERIFY(!ccoCanaryHandle.isEmpty());
gc(engine);
QCOMPARE(childObject->property("textCanary").toInt(), 10);
QV4::WeakValue childObjectVarArrayValueHandle;
{
- childObjectVarArrayValueHandle = QQmlVMEMetaObject::get(childObject)->vmeProperty(childObject->metaObject()->indexOfProperty("vp"));
+ QV4::Value tmp = QQmlVMEMetaObject::get(childObject)->vmeProperty(childObject->metaObject()->indexOfProperty("vp"));
+ childObjectVarArrayValueHandle = tmp;
+ tmp = QV4::Value::nullValue();
QVERIFY(!childObjectVarArrayValueHandle.isEmpty());
gc(engine);
QVERIFY(!childObjectVarArrayValueHandle.isEmpty()); // should not have been collected yet.
delete object;
}
+#if defined(pop_gcc_flags)
+#pragma GCC pop_options
+#endif
+
+
// Ensure that QObject type conversion works on binding assignment
void tst_qqmlecmascript::elementAssign()
{