MCPcopy Create free account
hub / github.com/KDE/kdevelop / copyFilesAndFolders

Method copyFilesAndFolders

kdevplatform/project/abstractfilemanagerplugin.cpp:637–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637bool 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
661bool AbstractFileManagerPlugin::isValid( const Path& path, const bool isFolder,
662 IProject* project ) const

Callers 2

dropEventMethod · 0.45
copyMoveItemsFunction · 0.45

Calls 7

stopWatcherMethod · 0.80
eventuallyReadFolderMethod · 0.80
execMethod · 0.80
continueWatcherMethod · 0.80
projectMethod · 0.45
toUrlMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected