dfaure added a comment.

  Yeah that's the problem.
  
  The way I see it, the QIODevice API assumes that one will call errorString() 
only after some method returns an error, e.g. after QAbstractSocket::error() is 
emitted, or after socket.waitForEncrypted() returns false.
  
  QFile[Device] and QAbstractSocket add their own errorcode enums on top of 
that, but that's not part of the base QIODevice API, which is all we have in 
KCompressionDevice.
  
  Ideally QIODevice::close() would return a bool, and I'm more and more 
thinking that this should be done for Qt 6.
  But pending that, I'm afraid that we'll have to downcast to 
KCompressionDevice to call a new error() accessor after close()...

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D14890

To: cullmann, dhaumann, dfaure
Cc: dfaure, kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, 
bruns, demsking, cullmann, sars, dhaumann

Reply via email to