| 282 | } |
| 283 | |
| 284 | void ProjectTree::expandedProjectDepth(const QStandardItem *root, int depth) |
| 285 | { |
| 286 | if (!root) |
| 287 | return; |
| 288 | |
| 289 | if (d->itemDepth(root) < depth) { //满足深度 |
| 290 | expand(d->itemModel->indexFromItem(root)); |
| 291 | for (int i = 0; i < root->rowCount(); i++) { |
| 292 | QStandardItem *childitem = root->child(i); |
| 293 | if (root->hasChildren()) { |
| 294 | expandedProjectDepth(childitem, depth); |
| 295 | } |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | void ProjectTree::expandedProjectAll(const QStandardItem *root) |
| 301 | { |
nothing calls this directly
no test coverage detected