| 577 | } |
| 578 | |
| 579 | void RepoStatusModel::repositoryBranchChanged(const QUrl& url) |
| 580 | { |
| 581 | IProject* project = ICore::self()->projectController()->findProjectForUrl(url); |
| 582 | if (findProject(project)) { |
| 583 | IPlugin* v = project->versionControlPlugin(); |
| 584 | Q_ASSERT(v); |
| 585 | auto* branching = v->extension<IBranchingVersionControl>(); |
| 586 | Q_ASSERT(branching); |
| 587 | VcsJob* job = branching->currentBranch(url); |
| 588 | connect(job, &VcsJob::resultsReady, this, &RepoStatusModel::branchNameReady); |
| 589 | job->setProperty("project", QVariant::fromValue<QObject*>(project)); |
| 590 | ICore::self()->runController()->registerJob(job); |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | void RepoStatusModel::branchNameReady(VcsJob* job) |
| 595 | { |
nothing calls this directly
no test coverage detected