Fix codec error checks
QStringEncoder returns a lazily evaluated result type, until we force that to a QByteArray the encoding process doesn't actually run and any error check before that wont reflect reality.
QStringEncoder returns a lazily evaluated result type, until we force that to a QByteArray the encoding process doesn't actually run and any error check before that wont reflect reality.