| 1247 | } |
| 1248 | |
| 1249 | void ProjectExplorer::collapseParents(const QModelIndex& index, const QList<QModelIndex>& expanded) { |
| 1250 | if (index.column() == 0 && index.row() == 0) { // root/project index, doesn't have any parent |
| 1251 | if (expanded.indexOf(index) == -1) |
| 1252 | m_treeView->collapse(index); |
| 1253 | } else { |
| 1254 | const auto& parent = index.parent(); |
| 1255 | if (parent != QModelIndex() && expanded.indexOf(parent) == -1) |
| 1256 | m_treeView->collapse(parent); |
| 1257 | } |
| 1258 | } |
nothing calls this directly
no test coverage detected