QmakeProjectManager: Differentiate between different types of projects

... by using different icons in the tree.
So far, Qmake project nodes looked annoyingly uniform, which was a
hindrance to understanding their structure. We now use the same
differentiation as in qbs, that is "project" (SUBDIRS pro file),
"product" (app/lib/other) and "group" (pri file), which conveys much
more information at a quick glance.

Change-Id: I04ca2aeccb9240876c0fb5cd1310e0b199eb3e97
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christian Kandeler
2020-04-29 17:03:26 +02:00
parent 732b17a2c4
commit ce428cfeef
10 changed files with 28 additions and 14 deletions

View File

@@ -73,7 +73,7 @@ const QbsProductNode *parentQbsProductNode(const ProjectExplorer::Node *node)
QbsGroupNode::QbsGroupNode(const QJsonObject &grp) : ProjectNode(FilePath()), m_groupData(grp)
{
static QIcon groupIcon = QIcon(QString(Constants::QBS_GROUP_ICON));
static QIcon groupIcon = QIcon(QString(ProjectExplorer::Constants::FILEOVERLAY_GROUP));
setIcon(groupIcon);
setDisplayName(grp.value("name").toString());
setEnabled(grp.value("is-enabled").toBool());
@@ -109,7 +109,7 @@ QVariant QbsGroupNode::data(Core::Id role) const
QbsProductNode::QbsProductNode(const QJsonObject &prd) : ProjectNode(FilePath()), m_productData(prd)
{
static QIcon productIcon = Core::FileIconProvider::directoryIcon(
Constants::QBS_PRODUCT_OVERLAY_ICON);
ProjectExplorer::Constants::FILEOVERLAY_PRODUCT);
setIcon(productIcon);
if (prd.value("is-runnable").toBool()) {
setProductType(ProductType::App);