summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2016-12-04 13:11:11 (GMT)
committerPino Toscano <pino@kde.org>2016-12-04 13:11:11 (GMT)
commit1969e97bd24d8e9508a4afc7d3dc11e315bc4a8e (patch)
tree5f8fabf5502a7fdd86c9151c70d32c705ee08ca6
parent47c1985703fd2b8f092e0f4ea713bd288aa75240 (diff)
Use KStandardGuiItem::overwrite()v16.12.2v16.12.1v16.12.0
... instead of creating the KGuiItem from scratch
-rw-r--r--kmplot/kparametereditor.cpp2
-rw-r--r--kmplot/maindlg.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/kmplot/kparametereditor.cpp b/kmplot/kparametereditor.cpp
index 6a0976b..88ed28d 100644
--- a/kmplot/kparametereditor.cpp
+++ b/kmplot/kparametereditor.cpp
@@ -282,7 +282,7 @@ void KParameterEditor::cmdExport_clicked()
if ( url.isEmpty() )
return;
- if( !KIO::NetAccess::exists( url, KIO::NetAccess::DestinationSide, this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.toDisplayString()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue )
+ if( !KIO::NetAccess::exists( url, KIO::NetAccess::DestinationSide, this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.toDisplayString()), i18n( "Overwrite File?" ), KStandardGuiItem::overwrite() ) == KMessageBox::Continue )
{
if ( !url.isLocalFile() )
{
diff --git a/kmplot/maindlg.cpp b/kmplot/maindlg.cpp
index 9270ff1..a8f4857 100644
--- a/kmplot/maindlg.cpp
+++ b/kmplot/maindlg.cpp
@@ -525,7 +525,7 @@ void MainDlg::slotSaveas()
{
// check if file exists and overwriting is ok.
- int answer = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) );
+ int answer = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KStandardGuiItem::overwrite() );
if ( answer != KMessageBox::Continue )
return;
@@ -556,7 +556,7 @@ void MainDlg::slotExport()
{
// check if file exists and overwriting is ok.
- int answer = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) );
+ int answer = KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?", url.url()), i18n( "Overwrite File?" ), KStandardGuiItem::overwrite() );
if ( answer != KMessageBox::Continue )
return;