Check for write error in save() if the disk is full

Authored by djarvie on Jun 7 2020, 4:08 PM.

Description

Check for write error in save() if the disk is full

QSaveFile::write() doesn't return an error if the write fails because
the disk is full, at least on Linux when writing to an unnamed
temporary file. This fix works around this by checking that the
buffered write can be flushed to disk and if not, returning an error.

BUG: 370708