diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-10-15 14:01:59 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-19 17:38:19 +0100 |
commit | 7cdd8ce8bd4c68b21e7953a1e4101986f27461f9 (patch) | |
tree | b685cc6a4e8fe64adcbbf491c628bda895d9cbd0 /src | |
parent | 0c74cbcccb52e296667c6bc171084f4946daef61 (diff) |
Use the new QLibraryInfo::Qml2ImportsPath path for QML 2.
Also change the environment variable to be QML2_IMPORT_PATH. This
splits the imports from QML 1 (the QtDeclarative library).
Change-Id: Icadbf96283b1cf071ed0deb04e8c8476da664009
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/doc/src/modules/identifiedmodules.qdoc | 4 | ||||
-rw-r--r-- | src/qml/doc/src/syntax/imports.qdoc | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/doc/src/modules/identifiedmodules.qdoc b/src/qml/doc/src/modules/identifiedmodules.qdoc index 87d4c42d6d..4972e038d7 100644 --- a/src/qml/doc/src/modules/identifiedmodules.qdoc +++ b/src/qml/doc/src/modules/identifiedmodules.qdoc @@ -175,13 +175,13 @@ An identified module has several restrictions upon it: \endlist For example, if an identified module is installed into -\c{$QML_IMPORT_PATH/ExampleModule}, the module identifier directive must be: +\c{$QML2_IMPORT_PATH/ExampleModule}, the module identifier directive must be: \code module ExampleModule \endcode If the strict module is installed into -\c{$QML_IMPORT_PATH/com/example/CustomUi}, the module identifier directive +\c{$QML2_IMPORT_PATH/com/example/CustomUi}, the module identifier directive must be: \code module com.example.CustomUi diff --git a/src/qml/doc/src/syntax/imports.qdoc b/src/qml/doc/src/syntax/imports.qdoc index e449f3b61a..db934f39a6 100644 --- a/src/qml/doc/src/syntax/imports.qdoc +++ b/src/qml/doc/src/syntax/imports.qdoc @@ -289,12 +289,12 @@ default locations to be searched by the engine. By default, this list contains: \list \li The directory of the current file -\li The location specified by QLibraryInfo::ImportsPath -\li Paths specified by the \c QML_IMPORT_PATH environment variable +\li The location specified by QLibraryInfo::Qml2ImportsPath +\li Paths specified by the \c QML2_IMPORT_PATH environment variable \endlist Additional import paths can be added through QQmlEngine::addImportPath() or the -\c QML_IMPORT_PATH environment variable. When running the +\c QML2_IMPORT_PATH environment variable. When running the \l{Prototyping with qmlscene}{qmlscene} tool, you can also use the \c -I option to add an import path. diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index b4962a6b1d..f0bf6e4e20 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1670,8 +1670,8 @@ void QQmlEngine::addImportPath(const QString& path) type version mapping and possibly QML extensions plugins. By default, the list contains the directory of the application executable, - paths specified in the \c QML_IMPORT_PATH environment variable, - and the builtin \c ImportsPath from QLibraryInfo. + paths specified in the \c QML2_IMPORT_PATH environment variable, + and the builtin \c Qml2ImportsPath from QLibraryInfo. \sa addImportPath(), setImportPathList() */ @@ -1686,8 +1686,8 @@ QStringList QQmlEngine::importPathList() const installed modules in a URL-based directory structure. By default, the list contains the directory of the application executable, - paths specified in the \c QML_IMPORT_PATH environment variable, - and the builtin \c ImportsPath from QLibraryInfo. + paths specified in the \c QML2_IMPORT_PATH environment variable, + and the builtin \c Qml2ImportsPath from QLibraryInfo. \sa importPathList(), addImportPath() */ diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 0b07705cec..7a2f4eaf34 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1320,13 +1320,13 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) { filePluginPath << QLatin1String("."); - // Search order is applicationDirPath(), $QML_IMPORT_PATH, QLibraryInfo::ImportsPath + // Search order is applicationDirPath(), $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); addImportPath(installImportsPath); // env import paths - QByteArray envImportPath = qgetenv("QML_IMPORT_PATH"); + QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); if (!envImportPath.isEmpty()) { #if defined(Q_OS_WIN) QLatin1Char pathSep(';'); |