The doc for QuaZip::close() states:
The underlying QIODevice is also closed, regardless of whether it was set explicitly or not.
An explicitly set QIODevice should not be closed on QuaZip::close(). At least the caller should be allowed to override an 'autoClose' property of sorts.
While this is generally true imho, QSaveFile for example does not have a public close() function at all and thus cannot be used as an explicit QuaZip device. (I would agree though that changing the visibility of close() is doubtful to say the least.)
This may have to be sync'd with QuaZip::open() somehow:
If the ZIP file is accessed via explicitly set QIODevice, then this device is opened in the necessary mode. If the device was already opened by some other means, then the behaviour is defined by the device implementation, but generally it is not a very good idea. For example, QFile will at least issue a warning.
Log in to post a comment.