Use early return on error in the open method

It was done like that for consistency with QFile, probably, but it is not a good
style in Qt overall.

Change-Id: I5233a7f0f03cab947b061520fe2ec64585632920
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>