summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-02-28 09:54:22 +0200
committerKatja Marttila <katja.marttila@qt.io>2018-04-05 06:54:21 +0000
commitd2ae9c16c3427c272d41e9a471f705ad8947a97a (patch)
tree4ed6b3cafd28b11f02ef4f4faa6164bcfbd85b63 /src/libs/installer/componentmodel.cpp
parent6664ca85f09d6ae195ac30f83a60d53c2355da0f (diff)
Add attribute to mark parts of install tree unstable
This commit adds new AllowUnstableComponents configuration. Setting AllowUnstablecomponents to true in config.xml will * allow installing other components when there are errors in scripts * allow installing other components when there are missing dependencies * will mark the 'broken' components uninstallable in treeview Task-number: QTIFW-930 Change-Id: I8d28cf9c4b0401e0bb76795e87d581f39b64f128 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 0f8a47c38..078afc50a 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -222,14 +222,15 @@ QVariant ComponentModel::data(const QModelIndex &index, int role) const
return component->data(Qt::UserRole + index.column());
}
if (role == Qt::CheckStateRole) {
- if (!component->isCheckable())
- return QVariant();
- if (!component->autoDependencies().isEmpty())
+ if (!component->isCheckable() || !component->autoDependencies().isEmpty() || component->isUnstable())
return QVariant();
}
if (role == ComponentModelHelper::ExpandedByDefault) {
return component->isExpandedByDefault();
}
+ if (component->isUnstable() && role == Qt::ForegroundRole) {
+ return QVariant(QColor(Qt::lightGray));
+ }
return component->data(role);
}
return QVariant();