summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-31 12:27:29 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-31 12:27:29 (GMT)
commit50b38658ce59f577b1f2c321b71ecd05ace7bc87 (patch)
treeeb68bca7092afbec3bd668b31e1c66e8b7e1ef79
parentc62dd4794741fb2c52b75e21a7b064ada9b616b9 (diff)
Minor optimization
-rw-r--r--src/ksieveui/widgets/managesievewidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ksieveui/widgets/managesievewidget.cpp b/src/ksieveui/widgets/managesievewidget.cpp
index ddfd5ed..a22b173 100644
--- a/src/ksieveui/widgets/managesievewidget.cpp
+++ b/src/ksieveui/widgets/managesievewidget.cpp
@@ -403,15 +403,16 @@ void ManageSieveWidget::slotDeleteScript()
return;
}
- u = u.adjusted(QUrl::RemoveFilename);
- u.setPath(u.path() + QLatin1Char('/') + currentItem->text(0));
-
- if (KMessageBox::warningContinueCancel(this, i18n("Really delete script \"%1\" from the server?", u.fileName()),
+ if (KMessageBox::warningContinueCancel(this, i18n("Really delete script \"%1\" from the server?", currentItem->text(0)),
i18n("Delete Sieve Script Confirmation"),
KStandardGuiItem::del())
!= KMessageBox::Continue) {
return;
}
+
+ u = u.adjusted(QUrl::RemoveFilename);
+ u.setPath(u.path() + QLatin1Char('/') + currentItem->text(0));
+
KManageSieve::SieveJob *job = KManageSieve::SieveJob::del(u);
connect(job, &KManageSieve::SieveJob::result, this, &ManageSieveWidget::slotDeleteResult);
Q_EMIT scriptDeleted(u);