aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-01-24 17:23:03 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-01-31 10:15:52 +0000
commit1e350a8c98d9c98823dde83a6745d2f26a9c0785 (patch)
tree78653d29556a2a3570fde746d597311342e49bdf /src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
parent406ef45aaa3e84eb402a451eb4900afa17d20ea9 (diff)
Disallow registration of types beginning with lowercase letters
Allowing types with lowercase names causes ambiguity, as can be seen in QTBUG-43567 and the comment in IRBuilder::visit(), which explains that "the grammar can't distinguish between two different definitions" whose only difference is casing of the first letter. - Prevent registration (return -1 with e.g. qmlRegisterType()) when a type name doesn't begin with an uppercase letter. - Document the uppercase type name rule in more places. Change-Id: I4e522c65990f418eaafa45a256e3cb07a3e01ba4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/doc/src/qmllanguageref/syntax/basics.qdoc')
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/basics.qdoc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
index 1b645a94c0..9eb8f72cf2 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
@@ -38,6 +38,8 @@ imperative code, in the case where complex custom application behavior is needed
QML source code is generally loaded by the engine through QML \e documents, which are
standalone documents of QML code. These can be used to define \l {QML Object Types}{QML object types} that can then be reused throughout an application.
+Note that type names must begin with an uppercase letter in order
+to be declared as QML object types in a QML file.
\section1 Import Statements