| 635 | } |
| 636 | |
| 637 | bool AbstractFileManagerPlugin::copyFilesAndFolders(const Path::List& items, ProjectFolderItem* newParent) |
| 638 | { |
| 639 | Q_D(AbstractFileManagerPlugin); |
| 640 | |
| 641 | bool success = true; |
| 642 | for (const Path& item : items) { |
| 643 | d->stopWatcher(newParent); |
| 644 | |
| 645 | success &= copyUrl(newParent->project(), item.toUrl(), newParent->path().toUrl()); |
| 646 | if ( success ) { |
| 647 | auto* const readJob = d->eventuallyReadFolder(newParent); |
| 648 | // reload first level synchronously, deeper levels will run async |
| 649 | // this is required for code that expects the new item to exist after |
| 650 | // this method finished |
| 651 | readJob->exec(); |
| 652 | } |
| 653 | |
| 654 | d->continueWatcher(newParent); |
| 655 | if ( !success ) |
| 656 | break; |
| 657 | } |
| 658 | return success; |
| 659 | } |
| 660 | |
| 661 | bool AbstractFileManagerPlugin::isValid( const Path& path, const bool isFolder, |
| 662 | IProject* project ) const |
no test coverage detected