From 4c671c046e8140bfb8372aab2c38aabe82b102b0 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 28 May 2012 11:56:24 +1000 Subject: Fix doc snippets paths and parsing errors qtqml.qdocconf and qtquick.qdocconf now refer to the correct snippets and source directories. Snippet paths in .qdoc and .cpp files have been updated to refer to the new shortened path references, e.g. \snippet qml/file.cpp instead of \snippet doc/src/snippets/qml/file.cpp. This also deletes snippets from src/qml/doc/snippets that belonged under src/quick/doc/snippets (and were already duplicated there anyway) and restores some snippet files that shouldn't have been deleted. Also fixes some inline snippets to use \code .. \endcode instead of \qml .. \endqml as they contained javascript or partial QML snippets that were causing parsing errors from qdoc. There are still snippet errors arising from qmlintro.qdoc as the qmlintro snippets directory that it refers to cannot be located. There are also two references to a removed snippet identifier in examples/qml/cppextensions/plugins/plugin.cpp that need to be fixed in conjunction with the related docs in a later commit as the relevant code has changed and the docs are now invalid. Task-number: QTBUG-25721 Change-Id: I50c665245a74c140470c58a32546591d187dfe4b Reviewed-by: Chris Adams --- src/quick/util/qquickimageprovider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/quick/util/qquickimageprovider.cpp') diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index 5ded343195..b0bbf46489 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -154,7 +154,7 @@ QImage QQuickTextureFactory::image() const an image provider named "colors", and the images to be loaded are "yellow" and "red", respectively: - \snippet examples/declarative/cppextensions/imageprovider/imageprovider-example.qml 0 + \snippet examples/qml/cppextensions/imageprovider/imageprovider-example.qml 0 When these images are loaded by QML, it looks for a matching image provider and calls its requestImage() or requestPixmap() method (depending on its @@ -165,9 +165,9 @@ QImage QQuickTextureFactory::image() const requested by the above QML. This implementation dynamically generates QPixmap images that are filled with the requested color: - \snippet examples/declarative/cppextensions/imageprovider/imageprovider.cpp 0 + \snippet examples/qml/cppextensions/imageprovider/imageprovider.cpp 0 \codeline - \snippet examples/declarative/cppextensions/imageprovider/imageprovider.cpp 1 + \snippet examples/qml/cppextensions/imageprovider/imageprovider.cpp 1 To make this provider accessible to QML, it is registered with the QML engine with a "colors" identifier: @@ -189,7 +189,7 @@ QImage QQuickTextureFactory::image() const \image imageprovider.png A complete example is available in Qt's - \l {declarative/cppextensions/imageprovider}{examples/declarative/cppextensions/imageprovider} + \l {declarative/cppextensions/imageprovider}{examples/qml/cppextensions/imageprovider} directory. Note the example registers the provider via a \l{QQmlExtensionPlugin}{plugin} instead of registering it in the application \c main() function as shown above. -- cgit v1.2.3