| 312 | } |
| 313 | |
| 314 | void ProjectTree::restoreExpandState(QStandardItem *item) |
| 315 | { |
| 316 | QModelIndex index = d->itemModel->indexFromItem(item); |
| 317 | if (!index.isValid()) |
| 318 | return; |
| 319 | |
| 320 | bool expanded = item->data(Project::ItemExpandedRole).toBool(); |
| 321 | if (!expanded) { |
| 322 | collapse(index); |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | expand(index); |
| 327 | for (int i = 0; i < item->rowCount(); ++i) { |
| 328 | restoreExpandState(item->child(i)); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | void ProjectTree::selectProjectFile(const QString &file) |
| 333 | { |
no test coverage detected