diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-02-11 19:07:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-19 10:09:39 +0100 |
commit | 0dc1c0554465d4e2546b75254371f3b8b01e957d (patch) | |
tree | 8704c83cc18b507b1ea11b38fb57ae525702b097 /src/qml/qml/qqmlextensionplugin.h | |
parent | 99ad368cf810723643ae76bba6a1adba3321b18f (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.h')
-rw-r--r-- | src/qml/qml/qqmlextensionplugin.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h index 8568565f22..170c7915a5 100644 --- a/src/qml/qml/qqmlextensionplugin.h +++ b/src/qml/qml/qqmlextensionplugin.h @@ -43,28 +43,31 @@ #define QQMLEXTENSIONPLUGIN_H #include <QtCore/qplugin.h> - +#include <QtCore/QUrl> #include <QtQml/qqmlextensioninterface.h> QT_BEGIN_NAMESPACE - class QQmlEngine; +class QQmlExtensionPluginPrivate; -class Q_QML_EXPORT QQmlExtensionPlugin : public QObject, - public QQmlExtensionInterface +class Q_QML_EXPORT QQmlExtensionPlugin + : public QObject + , public QQmlExtensionInterface { Q_OBJECT + Q_DECLARE_PRIVATE(QQmlExtensionPlugin) Q_INTERFACES(QQmlExtensionInterface) Q_INTERFACES(QQmlTypesExtensionInterface) public: explicit QQmlExtensionPlugin(QObject *parent = 0); ~QQmlExtensionPlugin(); + QUrl baseUrl() const; + virtual void registerTypes(const char *uri) = 0; virtual void initializeEngine(QQmlEngine *engine, const char *uri); -private: Q_DISABLE_COPY(QQmlExtensionPlugin) }; |