Set the error in the same method where the check against failure is done


This is done for consistency with other QIODevice subclasses, like in QtNetwork.
It also makes the code shorter due to the eliminated unnecessary Q_Q macro
usage.

Change-Id: Ibbd2be08e7aeff2bd0687d542cb256efb05f59bc
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
commit3e4005ce3ca38b04abfdbd30a3badcd844b2ac2d
parent6f2d8d95891f6c96d4287e747b58d137ec70cc30
authorLaszlo Papp <lpapp@kde.org>
committerThe Qt Project <gerrit-noreply@qt-project.org>
commit timeWed, 30 Oct 2013 09:05:08 +0100