aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-07-28 17:10:36 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-08-03 07:22:57 +0000
commit91226f396c4080f34f7af1f09e5d301e17fa2ab8 (patch)
tree2951bfb233e6f03d5dc02ec92eff1829def1f6d0 /src/lib/corelib/api
parent0a2f8da44f1c8aecb17c0352ad1585c93e599992 (diff)
Centralize conversion of multiplex id to human-readable string
... and use it to construct a unique product display name that can be used in error messages and so on. [ChangeLog][API] Introduced ProductData::fullDisplayName() Change-Id: I9a35765d3694a8f24741f1506b00d499a1aa23a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/lib/corelib/api')
-rw-r--r--src/lib/corelib/api/projectdata.cpp11
-rw-r--r--src/lib/corelib/api/projectdata.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/corelib/api/projectdata.cpp b/src/lib/corelib/api/projectdata.cpp
index 987bd24a4..9d49a5c0e 100644
--- a/src/lib/corelib/api/projectdata.cpp
+++ b/src/lib/corelib/api/projectdata.cpp
@@ -40,6 +40,7 @@
#include "projectdata_p.h"
#include "propertymap_p.h"
+#include <language/language.h>
#include <language/propertymapinternal.h>
#include <tools/fileinfo.h>
#include <tools/jsliterals.h>
@@ -451,6 +452,16 @@ QString ProductData::name() const
}
/*!
+ The name of the product as given in the qbs source file, plus information
+ about which properties it was multiplexed on and the values of these properties.
+ If the product was not multiplexed, the returned value is the same as \c name().
+ */
+QString ProductData::fullDisplayName() const
+{
+ return Internal::ResolvedProduct::fullDisplayName(name(), multiplexConfigurationId());
+}
+
+/*!
* \brief The base name of the product's target file as given in the qbs source file.
*/
QString ProductData::targetName() const
diff --git a/src/lib/corelib/api/projectdata.h b/src/lib/corelib/api/projectdata.h
index 335c7c4f3..91bcf7d9d 100644
--- a/src/lib/corelib/api/projectdata.h
+++ b/src/lib/corelib/api/projectdata.h
@@ -186,6 +186,7 @@ public:
QStringList type() const;
QStringList dependencies() const;
QString name() const;
+ QString fullDisplayName() const;
QString targetName() const;
QString version() const;
QString profile() const;