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

Method addProject

plugins/projectmanagerview/vcsoverlayproxymodel.cpp:73–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void 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
91void VcsOverlayProxyModel::repositoryBranchChanged(const QUrl& url)
92{

Callers

nothing calls this directly

Calls 4

versionControlPluginMethod · 0.80
toUrlMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected