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

Method removeProject

plugins/git/repostatusmodel.cpp:133–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void RepoStatusModel::removeProject(const IProject* p)
134{
135 // when the project is closed before it was fully populated, we won't ever see a
136 // projectOpened signal - handle this gracefully by just ignoring the remove request
137 // Also, we need to ignore this for projects which don't have a git VCS and thus were
138 // never added
139 if (auto it = findProject(p)) {
140 removeRow(it->row());
141 }
142
143 if (auto* const plugin = p->versionControlPlugin()) {
144 if (auto* const gitPlugin = plugin->extension<GitPlugin>()) {
145 const auto pathUrl = p->path().toUrl();
146 gitPlugin->unregisterRepositoryForCurrentBranchChanges(pathUrl, this);
147 }
148 }
149}
150
151/* Finds the immediate child of a `parent` item whose data with role `role` has value `value` */
152QStandardItem* findItemChild(const QStandardItem* parent, const QVariant& value, int role = Qt::DisplayRole)

Callers

nothing calls this directly

Calls 6

findProjectFunction · 0.85
versionControlPluginMethod · 0.80
rowMethod · 0.45
toUrlMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected