mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 23:15:14 -04:00
added log messages for creating/updating libraries
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user