aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/javascript/imports.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/javascript/imports.qdoc')
-rw-r--r--src/qml/doc/src/javascript/imports.qdoc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/doc/src/javascript/imports.qdoc b/src/qml/doc/src/javascript/imports.qdoc
index 800091689c..809b74ed52 100644
--- a/src/qml/doc/src/javascript/imports.qdoc
+++ b/src/qml/doc/src/javascript/imports.qdoc
@@ -71,13 +71,13 @@ parameters and return values when calling such functions from QML.
\section1 Imports Within JavaScript Resources
-In QtQuick 2.0, support has been added to allow JavaScript resources to import
+In \c {QtQuick 2.0}, support has been added to allow JavaScript resources to import
other JavaScript resources and also QML type namespaces using a variation of
the standard QML import syntax (where all of the previously described rules and
qualifications apply).
Due to the ability of a JavaScript resource to import another script or QML
-module in this fashion in QtQuick 2.0, some extra semantics are defined:
+module in this fashion in \c {QtQuick 2.0}, some extra semantics are defined:
\list
\li a script with imports will not inherit imports from the QML document which imported it (so accessing Component.errorString will fail, for example)
\li a script without imports will inherit imports from the QML document which imported it (so accessing Component.errorString will succeed, for example)
@@ -125,14 +125,14 @@ When a JavaScript file is imported, it must be imported with a qualifier. The
functions in that file are then accessible from the importing script via the
qualifier (that is, as \tt{Qualifier.functionName(params)}). Sometimes it is
desirable to have the functions made available in the importing context without
-needing to qualify them, and in this circumstance the \l{QML:Qt::include()}
+needing to qualify them, and in this circumstance the \l{QtQml2::Qt::include()}
{Qt.include()} function may be used to include one JavaScript file from another.
This copies all functions from the other file into the current file's
namespace, but ignores all pragmas and imports defined in that file.
For example, the QML code below left calls \c showCalculations() in \c script.js,
which in turn can call \c factorial() in \c factorial.js, as it has included
-\c factorial.js using \l {QML:Qt::include()}{Qt.include()}.
+\c factorial.js using \l {QtQml2::Qt::include()}{Qt.include()}.
\table
\row
@@ -142,7 +142,7 @@ which in turn can call \c factorial() in \c factorial.js, as it has included
\li \snippet qml/integrating-javascript/includejs/factorial.js 0
\endtable
-Notice that calling \l {QML:Qt::include()}{Qt.include()} copies all functions
+Notice that calling \l {QtQml2::Qt::include()}{Qt.include()} copies all functions
from \c factorial.js into the \c MyScript namespace, which means the QML
component can also access \c factorial() directly as \c MyScript.factorial().