Sync data to clipboard when saving
Ensure that data is completely flushed before other apps can access it. To do this, use QSaveFile, and commit the output when fully written, also ensuring to flush it.
This fix solves the the case where a big screenshot would be pasted partially empty resulting in corrupted images, if not waiting enough.