musredit: if save cannot write file, popup an error message dialog.

This commit is contained in:
suter_a 2020-09-10 15:04:19 +02:00
parent 6747e5c1ca
commit 18424fe149

View File

@ -1342,8 +1342,10 @@ void PTextEdit::fileSave()
fileSaveAs();
} else {
QFile file( *fFilenames.find( currentEditor() ) );
if ( !file.open( QIODevice::WriteOnly ) )
if ( !file.open( QIODevice::WriteOnly ) ) {
QMessageBox::critical(this, "**ERROR**", "Couldn't save the file!\nDisk full?\nNo write access?");
return;
}
QTextStream ts( &file );
ts << currentEditor()->toPlainText();