summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2016-12-04 14:33:25 (GMT)
committerPino Toscano <pino@kde.org>2016-12-04 14:34:44 (GMT)
commit48f4a55c4822b8e10c0e9212679559c0d97e5bfa (patch)
tree883bce522559351816e68c25c27ed00cab20c53e
parentc40a2c04a2367343eb82989b5231c501600a7cd9 (diff)
Use KStandardGuiItem more
... instead of creating the KGuiItem's from scratch
-rw-r--r--src/templatemanagementdialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/templatemanagementdialog.cpp b/src/templatemanagementdialog.cpp
index 281b05b..788ef08 100644
--- a/src/templatemanagementdialog.cpp
+++ b/src/templatemanagementdialog.cpp
@@ -42,6 +42,7 @@
#include <QInputDialog>
#include <KMessageBox>
#include <KLocalizedString>
+#include <KStandardGuiItem>
#include <QTimer>
#include <QDialogButtonBox>
@@ -122,7 +123,7 @@ void TemplateManagementDialog::slotAddTemplate()
int rc = KMessageBox::warningContinueCancel(
this,
i18n("A template with that name already exists, do you want to overwrite it?"),
- i18n("Duplicate Template Name"), KGuiItem(i18n("Overwrite")));
+ i18n("Duplicate Template Name"), KStandardGuiItem::overwrite());
if (rc == KMessageBox::Cancel) {
QTimer::singleShot(0, this, &TemplateManagementDialog::slotAddTemplate);
return;
@@ -157,7 +158,7 @@ void TemplateManagementDialog::slotRemoveTemplate()
int rc = KMessageBox::warningContinueCancel(
this,
i18n("Are you sure that you want to remove the template <b>%1</b>?", item->text()),
- i18n("Remove Template"), KGuiItem(i18n("Remove")));
+ i18n("Remove Template"), KStandardGuiItem::remove());
if (rc == KMessageBox::Cancel) {
return;