| 187 | } |
| 188 | |
| 189 | bool KDevelop::copyUrl(const KDevelop::IProject* project, const QUrl& source, const QUrl& target) |
| 190 | { |
| 191 | IPlugin* vcsplugin=project->versionControlPlugin(); |
| 192 | if(vcsplugin) { |
| 193 | auto* vcs=vcsplugin->extension<IBasicVersionControl>(); |
| 194 | |
| 195 | // We have a vcs and the file/folder is controller, need to make the rename through vcs |
| 196 | if(vcs->isVersionControlled(source)) { |
| 197 | VcsJob* job=vcs->copy(source, target); |
| 198 | if(job) { |
| 199 | return job->exec(); |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | // Fallback for the case of no vcs, or not-vcs-managed file/folder |
| 205 | auto job = KIO::copy(source, target); |
| 206 | KJobWidgets::setWindow(job, QApplication::activeWindow()); |
| 207 | return job->exec(); |
| 208 | } |
| 209 | |
| 210 | bool KDevelop::copyPath(const KDevelop::IProject* project, const KDevelop::Path& source, const KDevelop::Path& target) |
| 211 | { |
nothing calls this directly
no test coverage detected