GitPlugin::copy()->exec() did always return true, even on failure.
Details
Copy-paste files/folders inside a Git root without write permissions on the destination folder is expected to fail. ProjectManagerViewPlugin::pasteFromContextMenu() will display a warning dialog in this case.
Diff Detail
- Repository
- R33 KDevPlatform
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Are you sure this doesn't change the behvior in other areas? now it's calling emitResult and it didn't use to.
Here is the exhaustive list of code paths that use gitplugin's class StandardJob:
- KDevelop::copyUrl() -> IBasicVersionControl::copy() implemented in GitPlugin::copy() -> return new StandardJob(...)
- KDevelop::renameUrl() -> IBasicVersionControl::move() implemented in GitPlugin::move() -> return new StandardJob(...)
(I've grepped kdevelop.git and kdevplatform.git for all calls to move() and copy() to be sure.)
In both KDevelop::renameUrl and KDevelop::copyUrl the obtained StandardJob object is only used to call exec() on it and then it's abandoned (I hope it's also deleted by DeleteLater). Since I manually tested renameUrl/copyUrl in one scenario (cut/copy-paste), those should work for all.