| 568 | } |
| 569 | |
| 570 | bool AbstractFileManagerPlugin::removeFilesAndFolders(const QList<ProjectBaseItem*> &items) |
| 571 | { |
| 572 | Q_D(AbstractFileManagerPlugin); |
| 573 | |
| 574 | bool success = true; |
| 575 | for (ProjectBaseItem* item : items) { |
| 576 | Q_ASSERT(item->folder() || item->file()); |
| 577 | |
| 578 | ProjectFolderItem* parent = parentFolder(item); |
| 579 | d->stopWatcher(parent); |
| 580 | |
| 581 | success &= removeUrl(parent->project(), item->path().toUrl(), true); |
| 582 | if ( success ) { |
| 583 | if (item->file()) { |
| 584 | emit fileRemoved(item->file()); |
| 585 | } else { |
| 586 | Q_ASSERT(item->folder()); |
| 587 | emit folderRemoved(item->folder()); |
| 588 | } |
| 589 | delete item; |
| 590 | } |
| 591 | |
| 592 | d->continueWatcher(parent); |
| 593 | if ( !success ) |
| 594 | break; |
| 595 | } |
| 596 | return success; |
| 597 | } |
| 598 | |
| 599 | bool AbstractFileManagerPlugin::moveFilesAndFolders(const QList< ProjectBaseItem* >& items, ProjectFolderItem* newParent) |
| 600 | { |