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

Method stageSelectedFiles

plugins/git/committoolview.cpp:423–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void CommitToolView::stageSelectedFiles ( const QList<QUrl>& urls )
424{
425 IProject* project = ICore::self()->projectController()->findProjectForUrl(urls.front());
426 IBasicVersionControl* vcs = vcsPluginForUrl(urls.front());
427 if (vcs) {
428 VcsJob* job = vcs->add(urls, IBasicVersionControl::NonRecursive);
429 job->setProperty("urls", QVariant::fromValue<QList<QUrl>>(urls));
430 job->setProperty("project", QVariant::fromValue(project));
431 connect(job, &VcsJob::resultsReady, this, [=]() {
432 // Close the document tabs showing diffs for the urls
433 for (const auto& url : urls) {
434 emit updateUrlDiffs(url);
435 }
436 });
437 ICore::self()->runController()->registerJob(job);
438 }
439}
440
441void CommitToolView::unstageSelectedFiles(const QList<QUrl>& urls)
442{

Callers

nothing calls this directly

Calls 6

findProjectForUrlMethod · 0.80
projectControllerMethod · 0.80
setPropertyMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected