From ce85fb709170faa91664d822cb2e0cf271ecbeb4 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 Aug 2009 11:34:16 +1000 Subject: Fix imports. --- tests/auto/declarative/qmlbindengine/bindingLoop.txt | 2 ++ .../qmlbindengine/boolPropertiesEvaluateAsBool.1.txt | 2 ++ .../qmlbindengine/boolPropertiesEvaluateAsBool.2.txt | 2 ++ tests/auto/declarative/qmlbindengine/deferredProperties.txt | 2 ++ tests/auto/declarative/qmlbindengine/extensionObjects.txt | 2 ++ .../auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt | 3 +++ tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt | 3 +++ tests/auto/declarative/qmlbindengine/methods.1.txt | 2 ++ tests/auto/declarative/qmlbindengine/methods.2.txt | 2 ++ tests/auto/declarative/qmlbindengine/signalAssignment.1.txt | 2 ++ tests/auto/declarative/qmlbindengine/signalAssignment.2.txt | 2 ++ tests/auto/declarative/qmlbindengine/testtypes.cpp | 10 +++++----- 12 files changed, 29 insertions(+), 5 deletions(-) diff --git a/tests/auto/declarative/qmlbindengine/bindingLoop.txt b/tests/auto/declarative/qmlbindengine/bindingLoop.txt index e27a76c..9603805 100644 --- a/tests/auto/declarative/qmlbindengine/bindingLoop.txt +++ b/tests/auto/declarative/qmlbindengine/bindingLoop.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlContainer { children : [ MyQmlObject { diff --git a/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.1.txt b/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.1.txt index 7368ff6..df14f4a 100644 --- a/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.1.txt +++ b/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.1.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { stringProperty: trueProperty?'pass':'fail' } diff --git a/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.2.txt b/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.2.txt index c74493e..6a7b865 100644 --- a/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.2.txt +++ b/tests/auto/declarative/qmlbindengine/boolPropertiesEvaluateAsBool.2.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { stringProperty: falseProperty?'fail':'pass' } diff --git a/tests/auto/declarative/qmlbindengine/deferredProperties.txt b/tests/auto/declarative/qmlbindengine/deferredProperties.txt index 41aa891..ac0a6c8 100644 --- a/tests/auto/declarative/qmlbindengine/deferredProperties.txt +++ b/tests/auto/declarative/qmlbindengine/deferredProperties.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyDeferredObject { value: 10 objectProperty: MyQmlObject {} diff --git a/tests/auto/declarative/qmlbindengine/extensionObjects.txt b/tests/auto/declarative/qmlbindengine/extensionObjects.txt index 4c33de4..1342779 100644 --- a/tests/auto/declarative/qmlbindengine/extensionObjects.txt +++ b/tests/auto/declarative/qmlbindengine/extensionObjects.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyExtendedObject { baseProperty: baseExtendedProperty diff --git a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt index 2687465..65bc335 100644 --- a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt +++ b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt @@ -1,3 +1,6 @@ +import Test 1.0 +import Qt 4.6 + MyQmlObject { objectProperty: if(1) OtherObject diff --git a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt index 4aa20ae..f6f2e0a 100644 --- a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt +++ b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt @@ -1,3 +1,6 @@ +import Test 1.0 +import Qt 4.6 + MyQmlObject { objectProperty: OtherObject diff --git a/tests/auto/declarative/qmlbindengine/methods.1.txt b/tests/auto/declarative/qmlbindengine/methods.1.txt index 35279e0..df4354f 100644 --- a/tests/auto/declarative/qmlbindengine/methods.1.txt +++ b/tests/auto/declarative/qmlbindengine/methods.1.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { id: MyObject onBasicSignal: MyObject.method() diff --git a/tests/auto/declarative/qmlbindengine/methods.2.txt b/tests/auto/declarative/qmlbindengine/methods.2.txt index 352913a..b75ed28 100644 --- a/tests/auto/declarative/qmlbindengine/methods.2.txt +++ b/tests/auto/declarative/qmlbindengine/methods.2.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { id: MyObject onBasicSignal: MyObject.method(163) diff --git a/tests/auto/declarative/qmlbindengine/signalAssignment.1.txt b/tests/auto/declarative/qmlbindengine/signalAssignment.1.txt index ca682fa..511db74 100644 --- a/tests/auto/declarative/qmlbindengine/signalAssignment.1.txt +++ b/tests/auto/declarative/qmlbindengine/signalAssignment.1.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { onBasicSignal: setString('pass') } diff --git a/tests/auto/declarative/qmlbindengine/signalAssignment.2.txt b/tests/auto/declarative/qmlbindengine/signalAssignment.2.txt index 5efd583..eb913d1 100644 --- a/tests/auto/declarative/qmlbindengine/signalAssignment.2.txt +++ b/tests/auto/declarative/qmlbindengine/signalAssignment.2.txt @@ -1,3 +1,5 @@ +import Test 1.0 + MyQmlObject { onArgumentSignal: setString('pass ' + a + ' ' + b + ' ' + c) } diff --git a/tests/auto/declarative/qmlbindengine/testtypes.cpp b/tests/auto/declarative/qmlbindengine/testtypes.cpp index 2f83f58..e094fd1 100644 --- a/tests/auto/declarative/qmlbindengine/testtypes.cpp +++ b/tests/auto/declarative/qmlbindengine/testtypes.cpp @@ -32,10 +32,10 @@ private: int m_value; }; -QML_DEFINE_TYPE(MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(MyDeferredObject,MyDeferredObject); -QML_DEFINE_TYPE(MyQmlContainer,MyQmlContainer); -QML_DEFINE_EXTENDED_TYPE(MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); -QML_DEFINE_EXTENDED_TYPE(MyExtendedObject,MyExtendedObject,ExtensionObject); +QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,0,MyDeferredObject,MyDeferredObject); +QML_DEFINE_TYPE(Test,1,0,0,MyQmlContainer,MyQmlContainer); +QML_DEFINE_EXTENDED_TYPE(Test,1,0,0,MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); +QML_DEFINE_EXTENDED_TYPE(Test,1,0,0,MyExtendedObject,MyExtendedObject,ExtensionObject); #include "testtypes.moc" -- cgit v0.12 From 85c2e491bee23c274ad2b4d67ab065c2a91893b5 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 Aug 2009 11:36:57 +1000 Subject: Fix imports. Still a FAIL. --- tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp index e35a006..65d061e 100644 --- a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp +++ b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp @@ -12,7 +12,7 @@ public: }; QML_DECLARE_TYPE(MyQmlObject); -QML_DEFINE_TYPE(MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); class MyContainer : public QObject { @@ -31,7 +31,7 @@ private: }; QML_DECLARE_TYPE(MyContainer); -QML_DEFINE_TYPE(MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); class tst_QmlMetaProperty : public QObject { @@ -52,7 +52,7 @@ private: void tst_QmlMetaProperty::writeObjectToList() { - QmlComponent containerComponent(&engine, "MyContainer { children: MyQmlObject {} }"); + QmlComponent containerComponent(&engine, "import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl()); MyContainer *container = qobject_cast(containerComponent.create()); QVERIFY(container != 0); QVERIFY(container->children()->size() == 1); @@ -67,7 +67,7 @@ void tst_QmlMetaProperty::writeObjectToList() Q_DECLARE_METATYPE(QList); void tst_QmlMetaProperty::writeListToList() { - QmlComponent containerComponent(&engine, "MyContainer { children: MyQmlObject {} }"); + QmlComponent containerComponent(&engine, "import Test 1.0\nMyContainer { children: MyQmlObject {} }", QUrl()); MyContainer *container = qobject_cast(containerComponent.create()); QVERIFY(container != 0); QVERIFY(container->children()->size() == 1); @@ -87,7 +87,7 @@ void tst_QmlMetaProperty::writeListToList() void tst_QmlMetaProperty::writeObjectToQmlList() { - QmlComponent containerComponent(&engine, "MyContainer { qmlChildren: MyQmlObject {} }"); + QmlComponent containerComponent(&engine, "import Test 1.0\nMyContainer { qmlChildren: MyQmlObject {} }", QUrl()); MyContainer *container = qobject_cast(containerComponent.create()); QVERIFY(container != 0); QVERIFY(container->qmlChildren()->size() == 1); -- cgit v0.12 From 73707576e8c257a428f4456813feb34da6895565 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 Aug 2009 15:10:42 +1000 Subject: Remove spurious warning. --- src/declarative/util/qmlconnection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp index d506782..24bb61f 100644 --- a/src/declarative/util/qmlconnection.cpp +++ b/src/declarative/util/qmlconnection.cpp @@ -193,7 +193,9 @@ void QmlConnection::connectIfValid() } } if (sigIdx < 0) { - qWarning() << "signal" << d->signal << "not found"; + // Cannot usefully warn, since could be in middle of + // changing sender and signal. + // XXX need state change transactions to do better return; } -- cgit v0.12