aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2017-06-15 14:36:56 +0200
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2017-06-16 11:00:17 +0000
commit5935488d46d2e78d72b4ff61a56bc5e7448c2002 (patch)
tree9864b4a4bf36b6938b90e02546f72778d2f7eae4 /src/qml/doc/src
parenteeb320bbd8763f3e72f79369cc3908e999a0da3c (diff)
Doc: Avoid copyright text in the codeblock by using \snippet
Change-Id: Ib6f1a1e796a085d0f274c7e87d4ed1314e958a06 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r--src/qml/doc/src/cppintegration/topic.qdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/doc/src/cppintegration/topic.qdoc b/src/qml/doc/src/cppintegration/topic.qdoc
index 22115395b1..183af25297 100644
--- a/src/qml/doc/src/cppintegration/topic.qdoc
+++ b/src/qml/doc/src/cppintegration/topic.qdoc
@@ -46,13 +46,13 @@ BackEnd, in a QML application:
\li Add a new C++ class called \c BackEnd to the project and replace its header
file contents with:
-\quotefile code/backend/backend.h
+\snippet code/backend/backend.h backend_header
The \c Q_PROPERTY macro declares a property that could be accessed from QML.
\li Replace its C++ file contents with:
-\quotefile code/backend/backend.cpp
+\snippet code/backend/backend.cpp backend_cpp
The \c setUserName function emits the \c userNameChanged signal every time
\c m_userName value changes. The signal can be handled from QML using the
@@ -61,14 +61,14 @@ The \c setUserName function emits the \c userNameChanged signal every time
\li Include \c "backend.h" in \c main.cpp and register the class as a QML type
under a import URL as shown below:
-\quotefile code/backend/main.cpp
+\snippet code/backend/main.cpp main_cpp
The BackEnd class is registered as a type, which is accessible from QML by
importing the URL, "\c{io.qt.examples.backend 1.0}".
\li Replace the contents of \c main.qml with the following code:
-\quotefile code/backend/main.qml
+\snippet code/backend/main.qml main_qml
The \c BackEnd instance lets you access the \c userName property, which
is updated when the TextField's \c text property changes.