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

Method deleteBranch

kdevplatform/vcs/dvcs/ui/branchmanager.cpp:134–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void BranchManager::deleteBranch()
135{
136 QString baseBranch = m_ui->branchView->selectionModel()->selection().indexes().first().data().toString();
137
138 if (baseBranch == m_model->currentBranch())
139 {
140 KMessageBox::error(this, i18n("Currently at the branch \"%1\".\n"
141 "To delete it, please change to another branch.",
142 baseBranch));
143 return;
144 }
145
146 int ret = KMessageBox::warningTwoActions(
147 this, i18n("Are you sure you want to irreversibly delete the branch '%1'?", baseBranch), {},
148 KStandardGuiItem::del(), KStandardGuiItem::cancel());
149 if (ret == KMessageBox::PrimaryAction)
150 m_model->removeBranch(baseBranch);
151}
152
153void BranchManager::renameBranch()
154{

Callers 1

removeBranchMethod · 0.45

Calls 6

removeBranchMethod · 0.80
toStringMethod · 0.45
dataMethod · 0.45
firstMethod · 0.45
selectionMethod · 0.45
currentBranchMethod · 0.45

Tested by

no test coverage detected