diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-22 12:01:14 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-05-23 13:59:09 +0200 |
commit | 0da3f04e71f6f77f47b10fef6736b1415b1960d2 (patch) | |
tree | 85d152e7f16838ca32ad1cbc8e8b07029a62e855 /src/lib/corelib/api | |
parent | e00b6c86cece5752c53f78bb439a1a21db5b7674 (diff) |
Sanitize the project setup API.
Ever since we introduced "overridden values", the setter for
the build configuration has been pretty much an empty shell, containing
only the build variant and the profile. We now make that explicit,
resulting in a less confusing API that does not expect the caller to
know how to encode profile and build variant information in a QVariantMap.
Change-Id: I60183fc1884a884c9ceba34d7eb460c261be47ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/corelib/api')
-rw-r--r-- | src/lib/corelib/api/project.cpp | 9 | ||||
-rw-r--r-- | src/lib/corelib/api/project.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp index dce270ef1..6919a1b94 100644 --- a/src/lib/corelib/api/project.cpp +++ b/src/lib/corelib/api/project.cpp @@ -664,6 +664,15 @@ bool Project::isValid() const return d && d->internalProject; } +/*! + * \brief The top-level profile for building this project. + */ +QString Project::profile() const +{ + QBS_ASSERT(isValid(), return QString()); + return d->internalProject->profile(); +} + Project &Project::operator=(const Project &other) { d = other.d; diff --git a/src/lib/corelib/api/project.h b/src/lib/corelib/api/project.h index 0118977c5..871f6210d 100644 --- a/src/lib/corelib/api/project.h +++ b/src/lib/corelib/api/project.h @@ -81,6 +81,7 @@ public: ~Project(); bool isValid() const; + QString profile() const; ProjectData projectData() const; QString targetExecutable(const ProductData &product, const InstallOptions &installoptions) const; |