| 314 | } |
| 315 | |
| 316 | void 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 | |
| 338 | void GrepOutputView::showDialog() |
| 339 | { |
nothing calls this directly
no test coverage detected