I needed to do this:
QuaZip zip(ioDevice);
zip.open(QuaZip::mdUnzip);
// first, we need some information about archive itself
QString comment
= zip.
getComment();
qDebug() << "comment: " << comment;
// and now we are going to access files inside it
QuaZipFile file(&zip);
for(bool more=zip.goToFirstFile(); more; more=zip.goToNextFile()) {
file.close();
dstFileCopy = ba.data();
file.close();
}
zip.close();
return dstFileCopy;
QString dstFileCopy;
QuaZip zip(ioDevice);
zip.open(QuaZip::mdUnzip);
// first, we need some information about archive itself
QString comment = zip.getComment();
qDebug() << "comment: " << comment;
// and now we are going to access files inside it
QuaZipFile file(&zip);
for(bool more=zip.goToFirstFile(); more; more=zip.goToNextFile()) {
file.open(QIODevice::ReadOnly);
QByteArray ba = file.readAll();
file.close();
dstFileCopy = ba.data();
file.close();
}
zip.close();
return dstFileCopy;
To copy to clipboard, switch view to plain text mode
Bookmarks