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

Method copyUrl

kdevplatform/project/helper.cpp:189–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189bool 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
210bool KDevelop::copyPath(const KDevelop::IProject* project, const KDevelop::Path& source, const KDevelop::Path& target)
211{

Callers

nothing calls this directly

Calls 4

versionControlPluginMethod · 0.80
execMethod · 0.80
isVersionControlledMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected