musredit: if save cannot write file, popup an error message dialog.
This commit is contained in:
parent
6747e5c1ca
commit
18424fe149
@ -1342,8 +1342,10 @@ void PTextEdit::fileSave()
|
|||||||
fileSaveAs();
|
fileSaveAs();
|
||||||
} else {
|
} else {
|
||||||
QFile file( *fFilenames.find( currentEditor() ) );
|
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;
|
return;
|
||||||
|
}
|
||||||
QTextStream ts( &file );
|
QTextStream ts( &file );
|
||||||
ts << currentEditor()->toPlainText();
|
ts << currentEditor()->toPlainText();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user