From d17948b43226559626f00e1b7e377a4f8c51b00a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 15 Apr 2013 15:52:48 +0200 Subject: Make build directory available in the API. Task-number: QBS-261 Change-Id: I78623f6d49d192aeaefead38b9ed16c183b66620 Reviewed-by: Jake Petroules Reviewed-by: Tobias Hunger --- src/lib/api/project.cpp | 1 + src/lib/api/projectdata.cpp | 7 ++++++- src/lib/api/projectdata.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/api/project.cpp b/src/lib/api/project.cpp index dc5e55819..09fcf154c 100644 --- a/src/lib/api/project.cpp +++ b/src/lib/api/project.cpp @@ -201,6 +201,7 @@ ResolvedProductPtr ProjectPrivate::internalProduct(const ProductData &product) c void ProjectPrivate::retrieveProjectData() { m_projectData.m_location = internalProject->location; + m_projectData.m_buildDir = internalProject->buildDirectory; foreach (const ResolvedProductConstPtr &resolvedProduct, internalProject->products) { ProductData product; product.m_name = resolvedProduct->name; diff --git a/src/lib/api/projectdata.cpp b/src/lib/api/projectdata.cpp index d6c479623..f228f997b 100644 --- a/src/lib/api/projectdata.cpp +++ b/src/lib/api/projectdata.cpp @@ -313,10 +313,15 @@ bool operator!=(const PropertyMap &pm1, const PropertyMap &pm2) */ /*! - * \fn QString ProjectData::qbsFilePath() const + * \fn CodeLocation ProjectData::location() const * \brief The qbs source file in which the project is defined. */ +/*! + * \fn QString ProjectData::buildDirectory() const + * \brief The base directory under which the build artifacts of this project will be created. + */ + /*! * \fn QList ProjectData::products() const * \brief The products in this project. diff --git a/src/lib/api/projectdata.h b/src/lib/api/projectdata.h index 71e140d5d..e16678a21 100644 --- a/src/lib/api/projectdata.h +++ b/src/lib/api/projectdata.h @@ -142,11 +142,13 @@ public: ProjectData(); CodeLocation location() const { return m_location; } + QString buildDirectory() const { return m_buildDir; } QList products() const { return m_products; } private: CodeLocation m_location; QList m_products; + QString m_buildDir; }; QBS_EXPORT bool operator==(const ProjectData &lhs, const ProjectData &rhs); -- cgit v1.2.1