summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/componentmodel.cpp
diff options
context:
space:
mode:
authorRiho Pihlak <rpihlak@gmail.com>2017-12-05 02:27:56 +0200
committerKatja Marttila <katja.marttila@qt.io>2018-01-03 07:51:26 +0000
commit0797935d299d0da007cae0ab89ee9ceadc41d670 (patch)
tree1399cbdb213c5b9aeeca886c928e46d3cedd2df0 /src/libs/installer/componentmodel.cpp
parent977610bfb490690310d72a7f8a0a02cf4e5ea278 (diff)
Enable expanding items by default
An item can be expanded by default in component tree by setting ExpandedByDefault to true in package.xml file. Change-Id: Ib324327cf6ef6e2dda3271e704f3ced523c6579c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/componentmodel.cpp')
-rw-r--r--src/libs/installer/componentmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index e0cc3fcd8..0f8a47c38 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -227,6 +227,9 @@ QVariant ComponentModel::data(const QModelIndex &index, int role) const
if (!component->autoDependencies().isEmpty())
return QVariant();
}
+ if (role == ComponentModelHelper::ExpandedByDefault) {
+ return component->isExpandedByDefault();
+ }
return component->data(role);
}
return QVariant();