[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [incidenceeditor/Applications/16.12] src: Use KStandardGuiItem more
From: Pino Toscano <pino () kde ! org>
Date: 2016-12-04 14:35:11
Message-ID: E1cDXsl-00057R-HU () code ! kde ! org
[Download RAW message or body]
Git commit 48f4a55c4822b8e10c0e9212679559c0d97e5bfa by Pino Toscano.
Committed on 04/12/2016 at 14:34.
Pushed by pino into branch 'Applications/16.12'.
Use KStandardGuiItem more
... instead of creating the KGuiItem's from scratch
M +3 -2 src/templatemanagementdialog.cpp
https://commits.kde.org/incidenceeditor/48f4a55c4822b8e10c0e9212679559c0d97e5bfa
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic