| 92 | } |
| 93 | |
| 94 | void ProjectChangesModel::removeProject(IProject* p) |
| 95 | { |
| 96 | QStandardItem* it=projectItem(p); |
| 97 | if (!it) { |
| 98 | // when the project is closed before it was fully populated, we won't ever see a |
| 99 | // projectOpened signal - handle this gracefully by just ignoring the remove request |
| 100 | return; |
| 101 | } |
| 102 | removeRow(it->row()); |
| 103 | |
| 104 | if (auto* const plugin = p->versionControlPlugin()) { |
| 105 | if (auto* const branchingExtension = plugin->extension<KDevelop::IBranchingVersionControl>()) { |
| 106 | const auto pathUrl = p->path().toUrl(); |
| 107 | branchingExtension->unregisterRepositoryForCurrentBranchChanges(pathUrl, this); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | QStandardItem* findItemChild(QStandardItem* parent, const QVariant& value, int role = Qt::DisplayRole) |
| 113 | { |
nothing calls this directly
no test coverage detected