| 131 | } |
| 132 | |
| 133 | void 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` */ |
| 152 | QStandardItem* findItemChild(const QStandardItem* parent, const QVariant& value, int role = Qt::DisplayRole) |
nothing calls this directly
no test coverage detected