aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-05-15 17:01:33 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-05-16 18:01:48 +0200
commite10a5264d7ea7c9d303b50ef32b2847e2dd39452 (patch)
tree17d1fedb58d5acf08f880045fe0731c7c2e5d096
parentda1e5b62df576803123fc6f45db2482d0c426cdb (diff)
introduce Qt.quick.qmlImportsPath property
Task-number: QBS-578 Change-Id: I09a4396f48e40f78b665564691a2bc3eebcc77f8 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--doc/reference/modules/qt-modules.qdoc18
-rw-r--r--src/lib/qtprofilesetup/qtprofilesetup.cpp10
2 files changed, 28 insertions, 0 deletions
diff --git a/doc/reference/modules/qt-modules.qdoc b/doc/reference/modules/qt-modules.qdoc
index 7f29be65a..1e350b4c1 100644
--- a/doc/reference/modules/qt-modules.qdoc
+++ b/doc/reference/modules/qt-modules.qdoc
@@ -408,6 +408,15 @@
Specifies whether QML debugging support should be compiled into your binaries.
+ \section3 qmlImportsPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li set by \c{qbs-setup-qt}
+ \endtable
+
+ The absolute path to the directory where Qt's QML imports are installed.
+
\section2 gui Properties
\section3 uicName
@@ -430,4 +439,13 @@
Specifies whether QML debugging support should be compiled into your binaries.
+ \section3 qmlImportsPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li set by \c{qbs-setup-qt}
+ \endtable
+
+ The absolute path to the directory where Qt's QML imports are installed.
+
*/
diff --git a/src/lib/qtprofilesetup/qtprofilesetup.cpp b/src/lib/qtprofilesetup/qtprofilesetup.cpp
index 3b4d5551f..b920d711d 100644
--- a/src/lib/qtprofilesetup/qtprofilesetup.cpp
+++ b/src/lib/qtprofilesetup/qtprofilesetup.cpp
@@ -119,6 +119,13 @@ static void addDesignerComponentsModule(QList<QtModuleInfo> &modules)
modules << module;
}
+static QString quotedPath(const QString &str)
+{
+ return QLatin1Char('"')
+ + QDir::fromNativeSeparators(str).replace(QLatin1Char('"'), QLatin1String("\\\""))
+ + QLatin1Char('"');
+}
+
static void createModules(Profile &profile, Settings *settings,
const QtEnvironment &qtEnvironment)
{
@@ -318,6 +325,9 @@ static void createModules(Profile &profile, Settings *settings,
s << "property bool qmlDebugging: false" << endl
<< indent << "cpp.defines: "
<< "qmlDebugging ? base.concat('" + debugMacro + "') : base" << endl;
+
+ s << indent << "property string qmlImportsPath: "
+ << quotedPath(qtEnvironment.qmlImportPath);
}
content.replace("### special properties", propertiesString);
moduleFile.resize(0);