summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjkobus <jaroslaw.kobus@theqtcompany.com>2014-12-18 15:47:36 +0100
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-01-21 11:50:08 +0100
commitb46be1dc52d27e5df0ee098eeda6f69a989ab243 (patch)
treebb1b81f63b6a1d356d93ca181a3b2edc02c5e631 /src
parent7b584f55c2fee55aabd852aa836d6d8295ee1b22 (diff)
Show "Forced" component as enabled, but without checkbox
The indication that it will be installed will be shown in second column. Task-number: QTIFW-491 Change-Id: I23407fe9376a375e62a7b56a0284b12e42c83f81 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/component.cpp2
-rw-r--r--src/libs/installer/componentmodel.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index 86388cc2e..153e02cb0 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -277,7 +277,6 @@ void Component::loadDataFromPackage(const LocalPackage &package)
setValue(scForcedInstallation, package.forcedInstallation ? scTrue : scFalse);
if (package.forcedInstallation & !PackageManagerCore::noForceInstallation()) {
- setEnabled(false);
setCheckable(false);
setCheckState(Qt::Checked);
}
@@ -317,7 +316,6 @@ void Component::loadDataFromPackage(const Package &package)
forced = scFalse;
setValue(scForcedInstallation, forced);
if (forced == scTrue) {
- setEnabled(false);
setCheckable(false);
setCheckState(Qt::Checked);
}
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index d2537dea0..aed8f06d0 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -216,6 +216,8 @@ 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();
return component->data(role);
}
return QVariant();