| 71 | } |
| 72 | |
| 73 | void VcsOverlayProxyModel::addProject(IProject* p) |
| 74 | { |
| 75 | IPlugin* plugin = p->versionControlPlugin(); |
| 76 | if(!plugin) |
| 77 | return; |
| 78 | |
| 79 | // TODO: Show revision in case we're in "detached" state |
| 80 | auto* branchingExtension = plugin->extension<KDevelop::IBranchingVersionControl>(); |
| 81 | if(branchingExtension) { |
| 82 | const QUrl url = p->path().toUrl(); |
| 83 | branchingExtension->registerRepositoryForCurrentBranchChanges(url, this); |
| 84 | //can't use new signal/slot syntax here, IBranchingVersionControl is not a QObject |
| 85 | connect(plugin, SIGNAL(repositoryBranchChanged(QUrl)), SLOT(repositoryBranchChanged(QUrl)), |
| 86 | Qt::UniqueConnection); |
| 87 | repositoryBranchChanged(url); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | void VcsOverlayProxyModel::repositoryBranchChanged(const QUrl& url) |
| 92 | { |
nothing calls this directly
no test coverage detected