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

Method removeScript

plugins/externalscript/externalscriptview.cpp:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void ExternalScriptView::removeScript()
139{
140 ExternalScriptItem* item = currentItem();
141 if (!item) {
142 return;
143 }
144
145 int ret = KMessageBox::questionTwoActions(
146 this,
147 i18n("<p>Do you really want to remove the external script configuration for <i>%1</i>?</p>"
148 "<p><i>Note:</i> The script itself will not be removed.</p>",
149 item->text()),
150 i18nc("@title:window", "Confirm External Script Removal"),
151 KGuiItem(i18nc("@action:button", "Remove"), QStringLiteral("document-close")), KStandardGuiItem::cancel());
152 if (ret == KMessageBox::PrimaryAction) {
153 m_plugin->model()->removeRow(
154 m_plugin->model()->indexFromItem(item).row()
155 );
156 }
157}
158
159void ExternalScriptView::editScript()
160{

Callers

nothing calls this directly

Calls 5

removeRowMethod · 0.80
indexFromItemMethod · 0.80
textMethod · 0.45
modelMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected