From a736f72ad2ef3d5b72d9396c314570643cec8220 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 28 Nov 2011 13:11:25 +1000 Subject: Explain the implications of QML versions a little more Change-Id: I2b1667333a18daebba5224e210f219721096bc91 Reviewed-by: Martin Jones --- doc/src/declarative/extending.qdoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index e29223da6f..c1c7547ec2 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -123,8 +123,8 @@ a type; see qmlRegisterModuleApi() for more information. \section1 QML Type Versioning -In C++ adding a new method or property cannot break old applications. -In QML, however, new methods and properties can change what a name previously +In C++ adding a new class, method or property cannot break old applications. +In QML, however, new elements, methods and properties can change what a name previously resolved to to within a scope chain. For example, consider these two QML files @@ -189,6 +189,9 @@ qmlRegisterType("MyModule", 1, 1, "CppItem") \c root is only available when MyModule 1.1 is imported. +For the same reason, new elements introduced in later versions should use the minor version argument of qmlRegisterType. + +This feature of the language allows for behavioural changes to be made without breaking existing applications. Consequently QML module authors should always remember to document what changed between minor versions, and QML module users should check that their application still runs correctly before deploying an updated import statement. \section1 Object and List Property Types -- cgit v1.2.3