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

Method onApply

plugins/grepview/grepoutputview.cpp:316–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void GrepOutputView::onApply()
317{
318 if(model())
319 {
320 Q_ASSERT(model()->rowCount());
321 // ask a confirmation before an empty string replacement
322 if (replacementCombo->currentText().length() == 0
323 && KMessageBox::questionTwoActions(
324 this, i18n("Do you want to replace with an empty string?"),
325 i18nc("@title:window", "Start Replacement"),
326 KGuiItem(i18nc("@action:button", "Replace"), QStringLiteral("dialog-ok-apply")),
327 KStandardGuiItem::cancel())
328 == KMessageBox::SecondaryAction) {
329 return;
330 }
331
332 setEnabled(false);
333 model()->doReplacements();
334 setEnabled(true);
335 }
336}
337
338void GrepOutputView::showDialog()
339{

Callers

nothing calls this directly

Calls 4

modelFunction · 0.85
doReplacementsMethod · 0.80
rowCountMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected