Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1969e97b authored by Pino Toscano's avatar Pino Toscano

Use KStandardGuiItem::overwrite()

... instead of creating the KGuiItem from scratch
parent 47c19857
...@@ -282,7 +282,7 @@ void KParameterEditor::cmdExport_clicked() ...@@ -282,7 +282,7 @@ void KParameterEditor::cmdExport_clicked()
if ( url.isEmpty() ) if ( url.isEmpty() )
return; 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() ) if ( !url.isLocalFile() )
{ {
......
...@@ -525,7 +525,7 @@ void MainDlg::slotSaveas() ...@@ -525,7 +525,7 @@ void MainDlg::slotSaveas()
{ {
// check if file exists and overwriting is ok. // 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 ) if ( answer != KMessageBox::Continue )
return; return;
...@@ -556,7 +556,7 @@ void MainDlg::slotExport() ...@@ -556,7 +556,7 @@ void MainDlg::slotExport()
{ {
// check if file exists and overwriting is ok. // 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 ) if ( answer != KMessageBox::Continue )
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment