summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorjkobus <jaroslaw.kobus@theqtcompany.com>2014-12-19 15:28:27 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2015-01-23 16:54:22 +0100
commitbe29f64b57b8b6dc8ff59ec213b51319cc658555 (patch)
treebf29edb865df32bbbb6365bd5a7f4f84e26c0d97 /src/libs/installer/componentmodel.cpp
parent0b30136b0ea55b1532ca6eca9bfed8c21c96aa41 (diff)
Don't show checkbox for autodependent components
Change-Id: Ia954f6337c188453f05b37725975be98a28d564f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index aed8f06d0..b19aa807d 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -216,8 +216,12 @@ QVariant ComponentModel::data(const QModelIndex &index, int role) const
if (role == Qt::EditRole || role == Qt::DisplayRole || role == Qt::ToolTipRole)
return component->data(Qt::UserRole + index.column());
}
- if (role == Qt::CheckStateRole && !component->isCheckable())
- return QVariant();
+ if (role == Qt::CheckStateRole) {
+ if (!component->isCheckable())
+ return QVariant();
+ if (!component->autoDependencies().isEmpty())
+ return QVariant();
+ }
return component->data(role);
}
return QVariant();