diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-01-05 03:57:17 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-01-05 03:57:17 (GMT) |
commit | ffd499eb6ff64df1833625f64dbbf92e0e0746d4 (patch) | |
tree | cb1dcd382fe2e76638cf853c96cf0316cce65636 /tests/auto/declarative/qdeclarativelanguage/data | |
parent | 3f80a24c5d375dd173d18c2a4227301f1afba2e3 (diff) | |
download | Qt-ffd499eb6ff64df1833625f64dbbf92e0e0746d4.zip Qt-ffd499eb6ff64df1833625f64dbbf92e0e0746d4.tar.gz Qt-ffd499eb6ff64df1833625f64dbbf92e0e0746d4.tar.bz2 |
Support property/method versions in QML
Use metaobject revisioning to exclude properties/revisions added in
later versions from interfering with earlier versions.
Task-number: QTBUG-13451
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage/data')
11 files changed, 84 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt new file mode 100644 index 0000000..6ad6bfa --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt @@ -0,0 +1 @@ +7:5:Property "prop2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml new file mode 100644 index 0000000..4662d5e --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + prop1: 1 + prop2: 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt new file mode 100644 index 0000000..92ccd9a --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt @@ -0,0 +1 @@ +6:5:Signal "onSignal2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml new file mode 100644 index 0000000..8da7a25 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyRevisionedClass +{ + onSignal1: prop1 = 2 + onSignal2: prop1 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt new file mode 100644 index 0000000..b3c33c4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt @@ -0,0 +1 @@ +9:5:Property "propD" not available in Test/MyRevisionedClass 1.1 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml new file mode 100644 index 0000000..195be21 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml @@ -0,0 +1,10 @@ +import Test 1.1 + +MyRevisionedClass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is in rev 1 of MyRevisionedClassUnregistered, but not registered in 1.1 + propD: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml new file mode 100644 index 0000000..c4974cf --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + property real prop2: 10 + prop1: 1 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml new file mode 100644 index 0000000..4d3d7d2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedClass +{ + prop1: 1 + prop2: 10 + + onSignal2: prop2 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml new file mode 100644 index 0000000..57d76b1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml @@ -0,0 +1,16 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is not registered in 1.1 + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml new file mode 100644 index 0000000..b5de4a3 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedSubclass +{ + property real prop4: 10 + property real prop2: 10 + prop1: 5 + prop3: 7 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml new file mode 100644 index 0000000..f107356 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml @@ -0,0 +1,12 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} |