QtQml: document QQmlExtensionPlugin::baseUrl
authorShawn Rutledge <shawn.rutledge@digia.com>
Wed, 26 Jun 2013 14:37:23 +0000 (16:37 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Jun 2013 14:43:06 +0000 (16:43 +0200)
It was added here https://codereview.qt-project.org/#change,47532
without documentation.  Also updated \since because for now qdoc
seems to interpret \since 5.0 as QtQml 5.0.

Task-number: QTBUG-31928
Change-Id: I652e9471f1ad8e83b355bffc8498a6565dc9aa2b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
dist/changes-5.1.0
src/qml/doc/src/whatsnew.qdoc
src/qml/qml/qqmlextensionplugin.cpp

index 528260e..141c9a9 100644 (file)
@@ -85,6 +85,8 @@ QtQml
    static data generated by previous qmlRegisterType calls.
  - New qmlRegisteredType function in qqml.h, allowing the registration of
    composite types from C++.
+ - New baseUrl() accessor in QQmlExtensionPlugin, in case a plugin
+   needs to load QML or other assets from the same directory.
 
 QtQuick
 ------
index f1c6916..9ad8c23 100644 (file)
@@ -115,6 +115,8 @@ has now been replaced by the new \l {Qt QML} and \l {Qt Quick} modules. See the
 \list
 \li Arbitrary functionality may be provided in a namespace through a singleton type.  See qmlRegisterSingletonType() for more information.
 \li JavaScript (.js) files may now import QML modules and other JavaScript files using the ".import" syntax.
+\li Plugins may now use QQmlExtensionPlugin::baseUrl to get the directory from which the plugin is loaded.
+    This will be useful if the plugin needs to load QML or other assets from the same directory.
 \endlist
 
 \section2 Other
index f77b176..30eca7b 100644 (file)
@@ -45,7 +45,7 @@
 QT_BEGIN_NAMESPACE
 
 /*!
-    \since 5.0
+    \since Qt 5.0
     \inmodule QtQml
     \class QQmlExtensionPlugin
     \brief The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins.
@@ -156,6 +156,13 @@ QQmlExtensionPlugin::~QQmlExtensionPlugin()
 {
 }
 
+/*!
+    \since Qt 5.1
+    \brief Returns the URL of the directory from which the extension is loaded.
+
+    This is useful when the plugin also needs to load QML files or other
+    assets from the same directory.
+*/
 QUrl QQmlExtensionPlugin::baseUrl() const
 {
     Q_D(const QQmlExtensionPlugin);