aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlextensionplugin.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-02-11 19:07:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 10:09:39 +0100
commit0dc1c0554465d4e2546b75254371f3b8b01e957d (patch)
tree8704c83cc18b507b1ea11b38fb57ae525702b097 /src/qml/qml/qqmlextensionplugin.cpp
parent99ad368cf810723643ae76bba6a1adba3321b18f (diff)
Make the base URL available to QQmlExtensionPlugin
This is for the benefit of any plugin which needs to interact with the QML files or related assets which are also located in its import directory. Change-Id: Id23ec279b4d017bd3f620c3a7916dac9f9ac29bc Reviewed-by: Alan Alpert <aalpert@rim.com>
Diffstat (limited to 'src/qml/qml/qqmlextensionplugin.cpp')
-rw-r--r--src/qml/qml/qqmlextensionplugin.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp
index bbc0fed768..edef5a91cd 100644
--- a/src/qml/qml/qqmlextensionplugin.cpp
+++ b/src/qml/qml/qqmlextensionplugin.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qqmlextensionplugin.h"
+#include "qqmlextensionplugin_p.h"
QT_BEGIN_NAMESPACE
@@ -144,7 +145,7 @@ QT_BEGIN_NAMESPACE
explicitly.
*/
QQmlExtensionPlugin::QQmlExtensionPlugin(QObject *parent)
- : QObject(parent)
+ : QObject(*(new QQmlExtensionPluginPrivate), parent)
{
}
@@ -155,6 +156,12 @@ QQmlExtensionPlugin::~QQmlExtensionPlugin()
{
}
+QUrl QQmlExtensionPlugin::baseUrl() const
+{
+ Q_D(const QQmlExtensionPlugin);
+ return d->baseUrl;
+}
+
/*!
\fn void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)