Doc: Fixed a bunch of missing snippets.
authorJerome Pasion <jerome.pasion@digia.com>
Mon, 13 May 2013 11:11:05 +0000 (13:11 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 15 May 2013 07:32:58 +0000 (09:32 +0200)
-moved delegate model related snippets from Qt Quick to Qt QML.
-corrected snippet paths

Change-Id: If688f97fb9317def16f343d5502a6a54d6761e95
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
src/qml/doc/snippets/delegatemodel/visualdatagroup.qml [moved from src/quick/doc/snippets/qml/visualdatagroup.qml with 100% similarity]
src/qml/doc/snippets/delegatemodel/visualdatamodel.qml [moved from src/quick/doc/snippets/qml/visualdatamodel.qml with 100% similarity]
src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/main.cpp [moved from src/quick/doc/snippets/qml/visualdatamodel_rootindex/main.cpp with 100% similarity]
src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml [moved from src/quick/doc/snippets/qml/visualdatamodel_rootindex/view.qml with 100% similarity]
src/qml/doc/src/qmllanguageref/modules/cppplugins.qdoc
src/qml/qml/qqmlextensionplugin.cpp
src/qml/types/qqmldelegatemodel.cpp

index af2a36c..7ac1d40 100644 (file)
@@ -68,7 +68,7 @@
     as a new QML type. It provides the current time through \c hour and \c minute
     properties.
 
-    \snippet qml/plugins/plugin.cpp 0
+    \snippet plugins/plugin.cpp 0
     \dots
 
     To make this type available, we create a plugin class named \c QExampleQmlPlugin
@@ -78,7 +78,7 @@
     definition to register the plugin with the Qt meta object system using a unique
     identifier for the plugin.
 
-    \snippet qml/plugins/plugin.cpp plugin
+    \snippet plugins/plugin.cpp plugin
 
     The \c TimeModel class receives a \c{1.0} version of this plugin library, as
     a QML type called \c Time. The Q_ASSERT() macro can ensure the type namespace is
     that is built by the project (as shown above in the \c .pro file) so both of these
     need to be specified in the \c qmldir file:
 
-    \quotefile qml/plugins/imports/TimeExample/qmldir
+    \quotefile plugins/imports/TimeExample/qmldir
 
     Once the project is built and installed, the new \c Time component is
     accessible by any QML component that imports the \c TimeExample
     module
 
-    \snippet qml/plugins/plugins.qml 0
+    \snippet plugins/plugins.qml 0
 
     The full source code is available in the \l {qml/plugins}{plugins example}.
 
index b87c16c..f77b176 100644 (file)
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
     These extensions allow custom QML types to be made available to the QML engine.
 
     To write a QML extension plugin:
-    
+
     \list
     \li Subclass QQmlExtensionPlugin, implement registerTypes() method to register types
     using qmlRegisterType(), and export the class using the Q_PLUGIN_METADATA() macro
@@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE
     as a new QML element. It provides the current time through \c hour and \c minute
     properties, like this:
 
-    \snippet qml/plugins/plugin.cpp 0
+    \snippet plugins/plugin.cpp 0
     \dots
 
     To make this class available as a QML type, create a plugin that registers
@@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
     module will be named \c TimeExample (as defined in the project
     file further below).
 
-    \snippet qml/plugins/plugin.cpp plugin
+    \snippet plugins/plugin.cpp plugin
 
     This registers the \c TimeModel class with the 1.0 version of this
     plugin library, as a QML type called \c Time. The Q_ASSERT statement
@@ -109,12 +109,12 @@ QT_BEGIN_NAMESPACE
     should be bundled with the plugin, so it needs to be specified in the \c qmldir
     file:
 
-    \quotefile qml/plugins/imports/TimeExample/qmldir
+    \quotefile plugins/imports/TimeExample/qmldir
 
     Once the project is built and installed, the new \c Time element can be
     used by any QML component that imports the \c TimeExample module:
 
-    \snippet qml/plugins/plugins.qml 0
+    \snippet plugins/plugins.qml 0
 
     The full source code is available in the \l {qml/plugins}{plugins example}.
 
index 5e36be1..06ee588 100644 (file)
@@ -157,7 +157,7 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent)
 
     The example below illustrates using a DelegateModel with a ListView.
 
-    \snippet qml/visualdatamodel.qml 0
+    \snippet delegatemodel/visualdatamodel.qml 0
 */
 
 QQmlDelegateModelPrivate::QQmlDelegateModelPrivate(QQmlContext *ctxt)
@@ -397,10 +397,10 @@ void QQmlDelegateModel::setDelegate(QQmlComponent *delegate)
     the new directory's contents.
 
     \c main.cpp:
-    \snippet qml/visualdatamodel_rootindex/main.cpp 0
+    \snippet delegatemodel/visualdatamodel_rootindex/main.cpp 0
 
     \c view.qml:
-    \snippet qml/visualdatamodel_rootindex/view.qml 0
+    \snippet delegatemodel/visualdatamodel_rootindex/view.qml 0
 
     If the \l model is a QAbstractItemModel subclass, the delegate can also
     reference a \c hasModelChildren property (optionally qualified by a
@@ -604,7 +604,7 @@ QQmlDelegateModelGroup *QQmlDelegateModelPrivate::group_at(
 
     The following example illustrates using groups to select items in a model.
 
-    \snippet qml/visualdatagroup.qml 0
+    \snippet delegatemodel/visualdatagroup.qml 0
 */
 
 QQmlListProperty<QQmlDelegateModelGroup> QQmlDelegateModel::groups()