| 510 | } |
| 511 | |
| 512 | void ProjectManagerViewPlugin::reloadFromContextMenu( ) |
| 513 | { |
| 514 | QList< KDevelop::ProjectFolderItem* > folders; |
| 515 | const auto items = itemsFromIndexes(d->ctxProjectItemList); |
| 516 | for (KDevelop::ProjectBaseItem* item : items) { |
| 517 | if ( item->folder() ) { |
| 518 | // since reloading should be recursive, only pass the upper-most items |
| 519 | bool found = false; |
| 520 | const auto currentFolders = folders; |
| 521 | for (KDevelop::ProjectFolderItem* existing : currentFolders) { |
| 522 | if ( existing->path().isParentOf(item->folder()->path()) ) { |
| 523 | // simply skip this child |
| 524 | found = true; |
| 525 | break; |
| 526 | } else if ( item->folder()->path().isParentOf(existing->path()) ) { |
| 527 | // remove the child in the list and add the current item instead |
| 528 | folders.removeOne(existing); |
| 529 | // continue since there could be more than one existing child |
| 530 | } |
| 531 | } |
| 532 | if ( !found ) { |
| 533 | folders << item->folder(); |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | for (KDevelop::ProjectFolderItem* folder : std::as_const(folders)) { |
| 538 | folder->project()->projectFileManager()->reload(folder); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | void ProjectManagerViewPlugin::createFolderFromContextMenu( ) |
| 543 | { |
nothing calls this directly
no test coverage detected