diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-05 03:57:09 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-05 03:57:09 (GMT) |
commit | d39ec85b7e5d8702c2888cdad4ccdae72531c199 (patch) | |
tree | f38aa46e3c0d9c6432d9175d1511f1ac0d4de940 /tests/auto/declarative | |
parent | 43163cec2bcf9012944b445b393f6f8a6e895138 (diff) | |
parent | deca6c1c9885554e4e51ebd6dafdd78a424904e4 (diff) | |
download | Qt-d39ec85b7e5d8702c2888cdad4ccdae72531c199.zip Qt-d39ec85b7e5d8702c2888cdad4ccdae72531c199.tar.gz Qt-d39ec85b7e5d8702c2888cdad4ccdae72531c199.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative')
7 files changed, 32 insertions, 45 deletions
diff --git a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp index 6ae2112..262ddda 100644 --- a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp +++ b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp @@ -90,11 +90,7 @@ void tst_animatedimage::setFrame() void tst_animatedimage::frameCount() { - QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/stickman.qml")); - QmlGraphicsAnimatedImageItem *anim = qobject_cast<QmlGraphicsAnimatedImageItem *>(component.create()); - QVERIFY(anim); - QCOMPARE(anim->frameCount(), 299); + // GIF doesn't support frameCount until first pass through } QTEST_MAIN(tst_animatedimage) diff --git a/tests/auto/declarative/qmlecmascript/testtypes.cpp b/tests/auto/declarative/qmlecmascript/testtypes.cpp index 9af8ed7..df0cb18 100644 --- a/tests/auto/declarative/qmlecmascript/testtypes.cpp +++ b/tests/auto/declarative/qmlecmascript/testtypes.cpp @@ -72,11 +72,11 @@ private: int m_value; }; -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyDeferredObject,MyDeferredObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyQmlContainer,MyQmlContainer); -QML_DEFINE_EXTENDED_TYPE(Qt.test, 1, 0, 0, MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); -QML_DEFINE_EXTENDED_TYPE(Qt.test, 1, 0, 0, MyExtendedObject,MyExtendedObject,ExtensionObject); -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyTypeObject, MyTypeObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyDeferredObject,MyDeferredObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyQmlContainer,MyQmlContainer); +QML_DEFINE_EXTENDED_TYPE(Qt.test, 1,0, MyBaseExtendedObject,MyBaseExtendedObject,BaseExtensionObject); +QML_DEFINE_EXTENDED_TYPE(Qt.test, 1,0, MyExtendedObject,MyExtendedObject,ExtensionObject); +QML_DEFINE_TYPE(Qt.test, 1,0, MyTypeObject, MyTypeObject); #include "testtypes.moc" diff --git a/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir index ba0b42a..30c2d4e 100644 --- a/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir +++ b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/qmldir @@ -1,3 +1,3 @@ -InstalledTest 1.0-3 InstalledTest.qml -InstalledTest 1.4 InstalledTest2.qml Rectangle 1.5 InstalledTest2.qml +InstalledTest 1.4 InstalledTest2.qml +InstalledTest 1.0 InstalledTest.qml diff --git a/tests/auto/declarative/qmllanguage/testtypes.cpp b/tests/auto/declarative/qmllanguage/testtypes.cpp index 8b1ab59..c370c09 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.cpp +++ b/tests/auto/declarative/qmllanguage/testtypes.cpp @@ -41,10 +41,10 @@ #include "testtypes.h" QML_DEFINE_INTERFACE(MyInterface); -QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(Test,1,0,0,MyTypeObject,MyTypeObject); -QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); -QML_DEFINE_TYPE(Test,1,0,0,MyPropertyValueSource,MyPropertyValueSource); -QML_DEFINE_TYPE(Test,1,0,0,MyDotPropertyObject,MyDotPropertyObject); -QML_DEFINE_TYPE(Test,1,0,0,MyNamespacedType,MyNamespace::MyNamespacedType); +QML_DEFINE_TYPE(Test,1,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,MyTypeObject,MyTypeObject); +QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource); +QML_DEFINE_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject); +QML_DEFINE_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType); QML_DEFINE_NOCREATE_TYPE(MyGroupedObject); diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index c82aa4d..0fa36a1 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -890,11 +890,11 @@ void tst_qmllanguage::testType(const QString& qml, const QString& type) QML_DECLARE_TYPE(TestType) QML_DECLARE_TYPE(TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 0, 3, Test, TestType) -QML_DEFINE_TYPE(com.nokia.Test, 1, 5, 7, Test, TestType) -QML_DEFINE_TYPE(com.nokia.Test, 1, 8, 9, Test, TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 12, 13, Test, TestType2) -QML_DEFINE_TYPE(com.nokia.Test, 1, 9, 11, OldTest, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 0, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 5, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 8, Test, TestType2) +QML_DEFINE_TYPE(com.nokia.Test, 1, 9, OldTest, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 12, Test, TestType2) // Import tests (QT-558) @@ -937,10 +937,6 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.3\n" "Test {}" << "TestType"; - QTest::newRow("not in version 1.4") - << "import com.nokia.Test 1.4\n" - "Test {}" - << ""; QTest::newRow("in version 1.5") << "import com.nokia.Test 1.5\n" "Test {}" @@ -949,11 +945,7 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.8\n" "Test {}" << "TestType2"; - QTest::newRow("not in version 1.10") - << "import com.nokia.Test 1.10\n" - "Test {}" - << ""; - QTest::newRow("back in version 1.12") + QTest::newRow("in version 1.12") << "import com.nokia.Test 1.12\n" "Test {}" << "TestType2"; @@ -965,10 +957,6 @@ void tst_qmllanguage::importsBuiltin_data() << "import com.nokia.Test 1.11\n" "OldTest {}" << "TestType"; - QTest::newRow("no old in version 1.12") - << "import com.nokia.Test 1.12\n" - "OldTest {}" - << ""; QTest::newRow("multiversion 1") << "import com.nokia.Test 1.11\n" "import com.nokia.Test 1.12\n" @@ -989,11 +977,6 @@ void tst_qmllanguage::importsBuiltin_data() "import com.nokia.Test 1.8 as T8\n" "T8.Test {}" << "TestType2"; - QTest::newRow("qualified multiversion 5") - << "import com.nokia.Test 1.0 as T0\n" - "import com.nokia.Test 1.10 as T10\n" - "T10.Test {}" - << ""; } void tst_qmllanguage::importsBuiltin() @@ -1069,9 +1052,17 @@ void tst_qmllanguage::importsInstalled_data() "InstalledTest {}" << "QmlGraphicsRectangle"; QTest::newRow("installed import 2") + << "import com.nokia.installedtest 1.3\n" + "InstalledTest {}" + << "QmlGraphicsRectangle"; + QTest::newRow("installed import 3") << "import com.nokia.installedtest 1.4\n" "InstalledTest {}" << "QmlGraphicsText"; + QTest::newRow("installed import 4") + << "import com.nokia.installedtest 1.10\n" + "InstalledTest {}" + << "QmlGraphicsText"; QTest::newRow("installed import visibility") // QT-614 << "import com.nokia.installedtest 1.4\n" "PrivateType {}" diff --git a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp index 7fbffdb..d6e88b5 100644 --- a/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp +++ b/tests/auto/declarative/qmlmetaproperty/tst_qmlmetaproperty.cpp @@ -54,7 +54,7 @@ public: }; QML_DECLARE_TYPE(MyQmlObject); -QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,MyQmlObject,MyQmlObject); class MyContainer : public QObject { @@ -73,7 +73,7 @@ private: }; QML_DECLARE_TYPE(MyContainer); -QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); class tst_qmlmetaproperty : public QObject { diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp index a215ed8..f67c737 100644 --- a/tests/auto/declarative/states/tst_states.cpp +++ b/tests/auto/declarative/states/tst_states.cpp @@ -317,7 +317,7 @@ Q_SIGNALS: }; QML_DECLARE_TYPE(MyRect) -QML_DEFINE_TYPE(Qt.test, 1, 0, 0, MyRectangle,MyRect); +QML_DEFINE_TYPE(Qt.test, 1, 0, MyRectangle,MyRect); void tst_states::signalOverride() { |