Skip to content

Commit

Permalink
Fix bad merge pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 3, 2018
1 parent f46c713 commit 56024af
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/app/qgisapp.cpp
Expand Up @@ -7463,17 +7463,10 @@ void QgisApp::saveAsVectorFileGeneral( QgsVectorLayer *vlayer, bool symbologyOpt
} );

// when an error occurs:
connect( writerTask, &QgsVectorFileWriterTask::errorOccurred, this, [ = ]( int error, const QString & errorMessage )
connect( writerTask, &QgsVectorFileWriterTask::errorOccurred, this, [onFailure]( int error, const QString & errorMessage )
{
if ( error != QgsVectorFileWriter::Canceled )
{
QgsMessageViewer *m = new QgsMessageViewer( nullptr );
m->setWindowTitle( tr( "Save Error" ) );
m->setMessageAsPlainText( tr( "Export to vector file failed.\nError: %1" ).arg( errorMessage ) );
m->exec();
}
}
);
onFailure( error, errorMessage );
} );

QgsApplication::taskManager()->addTask( writerTask );
}
Expand Down

0 comments on commit 56024af

Please sign in to comment.