diff options
-rw-r--r-- | doc/installerfw.qdoc | 16 | ||||
-rw-r--r-- | src/libs/installer/component.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/componentmodel.cpp | 8 |
3 files changed, 21 insertions, 5 deletions
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc index 283537124..60dc8a7af 100644 --- a/doc/installerfw.qdoc +++ b/doc/installerfw.qdoc @@ -563,8 +563,20 @@ \l{Component Dependencies}. \row \li AutoDependOn - \li Opposite of dependencies. Defines that this component should be - loaded if all of the specified components are loaded. + \li Comma-separated list of identifiers of components that + this component has an automatic dependency on. + The component is installed if and only if + all of the specified dependencies are fulfilled. + If a component has an automatic dependency on other components, + the check box will not be visible next to the component in the component tree. + The selection will be performed automatically. + If the component was not installed before, it will + be selected for installation only when all components + from this list are also selected for installation. + If the component was already installed, it will + be selected for uninstallation when at least one of the components + from this list is also selected for uninstallation. + For more information, see \l{Component Dependencies}. \row \li Virtual \li Set to \c true to hide the component from the installer. diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 153e02cb0..22b7143b0 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -156,7 +156,7 @@ static const QLatin1String scForcedInstallation("ForcedInstallation"); /*! \qmlproperty stringlist component::autoDependencies - Returns the value of the \c <AutoDependOn> tag in the package information file. + Returns the value of the \c <AutoDependOn> element in the package information file. */ /*! 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(); |