summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.h
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-04-08 12:54:42 (GMT)
committermae <qt-info@nokia.com>2010-04-08 13:00:35 (GMT)
commitc3a54c47048b7123f51f2a1078e156d259445221 (patch)
tree299c0dfd3c039ec5fbf36f5a64bca13c1b8b4fd7 /src/declarative/qml/qdeclarativeengine.h
parentdc2429a34e8d0168ef33f48ec0da35631be49243 (diff)
downloadQt-c3a54c47048b7123f51f2a1078e156d259445221.zip
Qt-c3a54c47048b7123f51f2a1078e156d259445221.tar.gz
Qt-c3a54c47048b7123f51f2a1078e156d259445221.tar.bz2
Tune plugin import mechanism
In shadow build environments, we cannot enforce that shared library objects for plugins are located in the same directory as the qmldir file. This makes it hard for Creator to support mixed projects (qml/c++). In order to gain more flexibility, the patch introduces a pluginPathList to QDeclarativeEngine, which completes the existing importsPathList. The pluginPathList defaults to ["."], which indicates the directory where the qmldir file is located in. The qml viewer tool gains a command line option -P to add to the pluginPathList. For consistency, the -L option ("Library") has been renamed to -I ("Import"). QDeclarativeEngine::importExtension() has been renamed to QDeclarativeEngine::importPlugin(). The documentation has been adjusted accordingly. Done with erikv. Reviewed-by: erikv
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.h')
-rw-r--r--src/declarative/qml/qdeclarativeengine.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index b861c1b..fcaddcf 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -81,7 +81,11 @@ public:
void setImportPathList(const QStringList &paths);
void addImportPath(const QString& dir);
- bool importExtension(const QString &fileName, const QString &uri);
+ QStringList pluginPathList() const;
+ void setPluginPathList(const QStringList &paths);
+ void addPluginPath(const QString& dir);
+
+ bool importPlugin(const QString &filePath, const QString &uri);
void setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory *);
QDeclarativeNetworkAccessManagerFactory *networkAccessManagerFactory() const;