[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [konqueror/Applications/16.12] plugins: Use KStandardGuiItem::overwrite()
From: Pino Toscano <pino () kde ! org>
Date: 2016-12-10 7:54:37
Message-ID: E1cFcUP-0000uA-Oo () code ! kde ! org
[Download RAW message or body]
Git commit ae23ee15ffd9be9a9e4d2fb29d972cae41b949a4 by Pino Toscano.
Committed on 10/12/2016 at 07:54.
Pushed by pino into branch 'Applications/16.12'.
Use KStandardGuiItem::overwrite()
... instead of creating it from scratch
M +1 -1 plugins/domtreeviewer/domtreeview.cpp
M +2 -1 plugins/webarchiver/plugin_webarchiver.cpp
https://commits.kde.org/konqueror/ae23ee15ffd9be9a9e4d2fb29d972cae41b949a4
diff --git a/plugins/domtreeviewer/domtreeview.cpp \
b/plugins/domtreeviewer/domtreeview.cpp index cd9efc841..0b918bc75 100644
--- a/plugins/domtreeviewer/domtreeview.cpp
+++ b/plugins/domtreeviewer/domtreeview.cpp
@@ -585,7 +585,7 @@ void DOMTreeView::slotSaveClicked()
if (file.exists()) {
const QString title = i18nc("@title:window", "File Exists");
const QString text = i18n("Do you really want to overwrite: \n%1?", \
url.url());
- if (KMessageBox::Continue != KMessageBox::warningContinueCancel(this, \
text, title, i18n("Overwrite"))) { + if (KMessageBox::Continue != \
KMessageBox::warningContinueCancel(this, text, title, KStandardGuiItem::overwrite())) \
{ return;
}
}
diff --git a/plugins/webarchiver/plugin_webarchiver.cpp \
b/plugins/webarchiver/plugin_webarchiver.cpp index c5751b449..517f5656c 100644
--- a/plugins/webarchiver/plugin_webarchiver.cpp
+++ b/plugins/webarchiver/plugin_webarchiver.cpp
@@ -45,6 +45,7 @@
#include <kdebug.h>
#include <kpluginfactory.h>
#include <kactioncollection.h>
+#include <kstandardguiitem.h>
#include <QStandardPaths>
#include "plugin_webarchiver.h"
#include "archivedialog.h"
@@ -119,7 +120,7 @@ void PluginWebArchiver::slotSaveToArchive()
if (file.exists()) {
const QString title = i18nc("@title:window", "File Exists");
const QString text = i18n("Do you really want to overwrite:\n%1?", \
url.toDisplayString());
- if (KMessageBox::Continue != \
KMessageBox::warningContinueCancel(part->widget(), text, title, \
KGuiItem(i18n("Overwrite")))) { + if (KMessageBox::Continue != \
KMessageBox::warningContinueCancel(part->widget(), text, title, \
KStandardGuiItem::overwrite())) { return;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic