added log messages for creating/updating libraries

This commit is contained in:
Luis Ángel San Martín
2013-11-15 19:54:42 +01:00
parent e51480469f
commit f75d0abef0
5 changed files with 32 additions and 7 deletions

View File

@ -56,7 +56,7 @@ struct SevenZipInterface {
//SevenZipInterface * szInterface;
CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) :
QObject(parent),sevenzLib(0)
QObject(parent),sevenzLib(0),valid(false)
{
szInterface = new SevenZipInterface;
//load functions
@ -90,7 +90,7 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
if (szInterface->archive->Open(file, 0, openCallback) == S_OK)
{
formatFound = true;
valid = formatFound = true;
break;
}
}
@ -165,6 +165,11 @@ QList<QString> CompressedArchive::getFileNames()
return files;
}
bool CompressedArchive::isValid()
{
return valid;
}
int CompressedArchive::getNumFiles()
{
quint32 numItems = 0;
@ -211,4 +216,4 @@ QByteArray CompressedArchive::getRawDataAtIndex(int index)
return QByteArray((char *)extractCallbackSpec->data,extractCallbackSpec->newFileSize);
}
return QByteArray();
}
}

View File

@ -40,10 +40,12 @@ public slots:
QList<QByteArray> getAllData(const QVector<quint32> & indexes, ExtractDelegate * delegate = 0);
QByteArray getRawDataAtIndex(int index);
QList<QString> getFileNames();
bool isValid();
private:
SevenZipInterface * szInterface;
QLibrary * sevenzLib;
void loadFunctions();
bool valid;
};