From 97c589b44677733fb2b2aa7ba521faebf3241f3b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 15 May 2014 17:02:15 +0200 Subject: introduce Qt.quick.qmlPath property Task-number: QBS-578 Change-Id: I116987d3232a832137781d4d5ac90adf4bd7ed88 Reviewed-by: Christian Kandeler --- doc/reference/modules/qt-modules.qdoc | 20 ++++++++++++++++++++ src/app/qbs-setup-qt/setupqt.cpp | 1 + src/lib/qtprofilesetup/qtprofilesetup.cpp | 6 ++++++ src/lib/qtprofilesetup/qtprofilesetup.h | 1 + 4 files changed, 28 insertions(+) diff --git a/doc/reference/modules/qt-modules.qdoc b/doc/reference/modules/qt-modules.qdoc index 1e350b4c1..01e2226b9 100644 --- a/doc/reference/modules/qt-modules.qdoc +++ b/doc/reference/modules/qt-modules.qdoc @@ -417,6 +417,16 @@ The absolute path to the directory where Qt's QML imports are installed. + \section3 qmlPath + + \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 files are installed. + This property is undefined for Qt4. + \section2 gui Properties \section3 uicName @@ -448,4 +458,14 @@ The absolute path to the directory where Qt's QML imports are installed. + \section3 qmlPath + + \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 files are installed. + This property is undefined for Qt4. + */ diff --git a/src/app/qbs-setup-qt/setupqt.cpp b/src/app/qbs-setup-qt/setupqt.cpp index b36272713..c7b1ea16d 100644 --- a/src/app/qbs-setup-qt/setupqt.cpp +++ b/src/app/qbs-setup-qt/setupqt.cpp @@ -180,6 +180,7 @@ QtEnvironment SetupQt::fetchEnvironment(const QString &qmakePath) qtEnvironment.binaryPath = pathQueryValue(queryOutput, "QT_INSTALL_BINS"); qtEnvironment.documentationPath = pathQueryValue(queryOutput, "QT_INSTALL_DOCS"); qtEnvironment.pluginPath = pathQueryValue(queryOutput, "QT_INSTALL_PLUGINS"); + qtEnvironment.qmlPath = pathQueryValue(queryOutput, "QT_INSTALL_QML"); qtEnvironment.qmlImportPath = pathQueryValue(queryOutput, "QT_INSTALL_IMPORTS"); qtEnvironment.qtVersion = QString::fromLocal8Bit(queryOutput.value("QT_VERSION")); diff --git a/src/lib/qtprofilesetup/qtprofilesetup.cpp b/src/lib/qtprofilesetup/qtprofilesetup.cpp index b920d711d..d7672c9fd 100644 --- a/src/lib/qtprofilesetup/qtprofilesetup.cpp +++ b/src/lib/qtprofilesetup/qtprofilesetup.cpp @@ -326,6 +326,12 @@ static void createModules(Profile &profile, Settings *settings, << indent << "cpp.defines: " << "qmlDebugging ? base.concat('" + debugMacro + "') : base" << endl; + s << indent << "property string qmlPath"; + if (qtEnvironment.qmlPath.isEmpty()) + s << endl; + else + s << ": " << quotedPath(qtEnvironment.qmlPath) << endl; + s << indent << "property string qmlImportsPath: " << quotedPath(qtEnvironment.qmlImportPath); } diff --git a/src/lib/qtprofilesetup/qtprofilesetup.h b/src/lib/qtprofilesetup/qtprofilesetup.h index a2283202a..88e56d2c9 100644 --- a/src/lib/qtprofilesetup/qtprofilesetup.h +++ b/src/lib/qtprofilesetup/qtprofilesetup.h @@ -43,6 +43,7 @@ public: QString libraryPath; QString includePath; QString binaryPath; + QString qmlPath; QString qmlImportPath; QString documentationPath; QString dataPath; -- cgit v1.2.3