| 421 | } |
| 422 | |
| 423 | void 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 | |
| 441 | void CommitToolView::unstageSelectedFiles(const QList<QUrl>& urls) |
| 442 | { |
nothing calls this directly
no test coverage detected