D14913: KCompressionDevice: propagate errors from QIODevice::close()BUG: 397545

Christoph Cullmann noreply at phabricator.kde.org
Sat Aug 18 10:30:34 BST 2018


cullmann added a comment.


  Hmm, actually, that has other issues.
  You can't check errorString().isEmpty() for checking if an error is there.
  I just commited my other patch with the addition of that code (and was to dumb to run make test)
  
  e.g. even after constructing a QFile, you already have:
  
    const KCompressionDevice::CompressionType type = KFilterDev::compressionTypeForMimeType(m_mimeTypeForFilterDev);
     QScopedPointer<QIODevice> saveFile((type == KCompressionDevice::None) ? static_cast<QIODevice*>(new QFile(filename)) : static_cast<QIODevice*>(new KCompressionDevice(filename, type)));
  
  qDebug() << "lalal file " << filename << "failed with error" << saveFile->errorString();
  
  >
  =
  
  lalal file  "/home/cullmann/kde/build/frameworks/ktexteditor/jsdklfjsdklffsf" failed with error "Unknown error"

REPOSITORY
  R243 KArchive

BRANCH
  master

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

To: dfaure, cullmann
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180818/50883d8e/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list