mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Use Qt::endl instead of endl
This commit is contained in:
parent
f300bc3aa0
commit
b07ec73ccc
@ -206,11 +206,11 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
// GUID uuid = supportedFileFormats[i];
|
// GUID uuid = supportedFileFormats[i];
|
||||||
// qDebug() << "trying : " << uuid << endl;
|
// qDebug() << "trying : " << uuid << endl;
|
||||||
if (szInterface->createObjectFunc(&supportedFileFormats[i], &IID_InArchive, (void **)&szInterface->archive) == S_OK) {
|
if (szInterface->createObjectFunc(&supportedFileFormats[i], &IID_InArchive, (void **)&szInterface->archive) == S_OK) {
|
||||||
// qDebug() << "Can not open archive file : " + filePath << endl;
|
// qDebug() << "Can not open archive file : " + filePath << Qt::endl;
|
||||||
|
|
||||||
if (szInterface->archive->Open(file, 0, openCallback) == S_OK) {
|
if (szInterface->archive->Open(file, 0, openCallback) == S_OK) {
|
||||||
valid = formatFound = true;
|
valid = formatFound = true;
|
||||||
qDebug() << "Opened archive file : " + filePath << endl;
|
qDebug() << "Opened archive file : " + filePath << Qt::endl;
|
||||||
setupFilesNames();
|
setupFilesNames();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (!formatFound) {
|
if (!formatFound) {
|
||||||
qDebug() << "Can not open archive" << endl;
|
qDebug() << "Can not open archive" << Qt::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
qDebug() << "Error opening rar file :" + filePath;
|
qDebug() << "Error opening rar file :" + filePath;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// qDebug() << "Can not open archive file : " + filePath << endl;
|
// qDebug() << "Can not open archive file : " + filePath << Qt::endl;
|
||||||
|
|
||||||
if (szInterface->archive->Open(file, 0, openCallback) == S_OK) {
|
if (szInterface->archive->Open(file, 0, openCallback) == S_OK) {
|
||||||
valid = formatFound = true;
|
valid = formatFound = true;
|
||||||
@ -311,7 +311,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!rarLib->load()) {
|
if (!rarLib->load()) {
|
||||||
qDebug() << "Error Loading Rar.so : " + rarLib->errorString() << endl;
|
qDebug() << "Error Loading Rar.so : " + rarLib->errorString() << Qt::endl;
|
||||||
QCoreApplication::exit(700); // TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
QCoreApplication::exit(700); // TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -328,34 +328,34 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!sevenzLib->load()) {
|
if (!sevenzLib->load()) {
|
||||||
qDebug() << "Error Loading 7z.dll : " + sevenzLib->errorString() << endl;
|
qDebug() << "Error Loading 7z.dll : " + sevenzLib->errorString() << Qt::endl;
|
||||||
QCoreApplication::exit(700); // TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
QCoreApplication::exit(700); // TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Loading functions" << endl;
|
qDebug() << "Loading functions" << Qt::endl;
|
||||||
|
|
||||||
if ((szInterface->createObjectFunc = (CreateObjectFunc)sevenzLib->resolve("CreateObject")) == 0)
|
if ((szInterface->createObjectFunc = (CreateObjectFunc)sevenzLib->resolve("CreateObject")) == 0)
|
||||||
qDebug() << "fail loading function : CreateObject" << endl;
|
qDebug() << "fail loading function : CreateObject" << Qt::endl;
|
||||||
if ((szInterface->getMethodPropertyFunc = (GetMethodPropertyFunc)sevenzLib->resolve("GetMethodProperty")) == 0)
|
if ((szInterface->getMethodPropertyFunc = (GetMethodPropertyFunc)sevenzLib->resolve("GetMethodProperty")) == 0)
|
||||||
qDebug() << "fail loading function : GetMethodProperty" << endl;
|
qDebug() << "fail loading function : GetMethodProperty" << Qt::endl;
|
||||||
if ((szInterface->getNumberOfMethodsFunc = (GetNumberOfMethodsFunc)sevenzLib->resolve("GetNumberOfMethods")) == 0)
|
if ((szInterface->getNumberOfMethodsFunc = (GetNumberOfMethodsFunc)sevenzLib->resolve("GetNumberOfMethods")) == 0)
|
||||||
qDebug() << "fail loading function : GetNumberOfMethods" << endl;
|
qDebug() << "fail loading function : GetNumberOfMethods" << Qt::endl;
|
||||||
if ((szInterface->getNumberOfFormatsFunc = (GetNumberOfFormatsFunc)sevenzLib->resolve("GetNumberOfFormats")) == 0)
|
if ((szInterface->getNumberOfFormatsFunc = (GetNumberOfFormatsFunc)sevenzLib->resolve("GetNumberOfFormats")) == 0)
|
||||||
qDebug() << "fail loading function : GetNumberOfFormats" << endl;
|
qDebug() << "fail loading function : GetNumberOfFormats" << Qt::endl;
|
||||||
if ((szInterface->getHandlerPropertyFunc = (GetHandlerPropertyFunc)sevenzLib->resolve("GetHandlerProperty")) == 0)
|
if ((szInterface->getHandlerPropertyFunc = (GetHandlerPropertyFunc)sevenzLib->resolve("GetHandlerProperty")) == 0)
|
||||||
qDebug() << "fail loading function : GetHandlerProperty" << endl;
|
qDebug() << "fail loading function : GetHandlerProperty" << Qt::endl;
|
||||||
if ((szInterface->getHandlerPropertyFunc2 = (GetHandlerPropertyFunc2)sevenzLib->resolve("GetHandlerProperty2")) == 0)
|
if ((szInterface->getHandlerPropertyFunc2 = (GetHandlerPropertyFunc2)sevenzLib->resolve("GetHandlerProperty2")) == 0)
|
||||||
qDebug() << "fail loading function : GetHandlerProperty2" << endl;
|
qDebug() << "fail loading function : GetHandlerProperty2" << Qt::endl;
|
||||||
if ((szInterface->setLargePageModeFunc = (SetLargePageModeFunc)sevenzLib->resolve("SetLargePageMode")) == 0)
|
if ((szInterface->setLargePageModeFunc = (SetLargePageModeFunc)sevenzLib->resolve("SetLargePageMode")) == 0)
|
||||||
qDebug() << "fail loading function : SetLargePageMode" << endl;
|
qDebug() << "fail loading function : SetLargePageMode" << Qt::endl;
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
if ((szInterface->createObjectFuncRar = (CreateObjectFunc)rarLib->resolve("CreateObject")) == 0)
|
if ((szInterface->createObjectFuncRar = (CreateObjectFunc)rarLib->resolve("CreateObject")) == 0)
|
||||||
qDebug() << "fail loading function (rar) : CreateObject" << endl;
|
qDebug() << "fail loading function (rar) : CreateObject" << Qt::endl;
|
||||||
if ((szInterface->getMethodPropertyFuncRar = (GetMethodPropertyFunc)rarLib->resolve("GetMethodProperty")) == 0)
|
if ((szInterface->getMethodPropertyFuncRar = (GetMethodPropertyFunc)rarLib->resolve("GetMethodProperty")) == 0)
|
||||||
qDebug() << "fail loading function (rar) : GetMethodProperty" << endl;
|
qDebug() << "fail loading function (rar) : GetMethodProperty" << Qt::endl;
|
||||||
if ((szInterface->getNumberOfMethodsFuncRar = (GetNumberOfMethodsFunc)rarLib->resolve("GetNumberOfMethods")) == 0)
|
if ((szInterface->getNumberOfMethodsFuncRar = (GetNumberOfMethodsFunc)rarLib->resolve("GetNumberOfMethods")) == 0)
|
||||||
qDebug() << "fail loading function (rar) : GetNumberOfMethods" << endl;
|
qDebug() << "fail loading function (rar) : GetNumberOfMethods" << Qt::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
else
|
else
|
||||||
result = szInterface->archive->Extract(currentIndexes.data(), currentIndexes.count(), false, extractCallback);
|
result = szInterface->archive->Extract(currentIndexes.data(), currentIndexes.count(), false, extractCallback);
|
||||||
if (result != S_OK) {
|
if (result != S_OK) {
|
||||||
qDebug() << "Extract Error" << endl;
|
qDebug() << "Extract Error" << Qt::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return extractCallbackSpec->allFiles;
|
return extractCallbackSpec->allFiles;
|
||||||
@ -468,7 +468,7 @@ CompressedArchive::CompressedArchive(const QString &filePath, QObject *parent)
|
|||||||
|
|
||||||
HRESULT result = szInterface->archive->Extract(indices, 1, false, extractCallback);
|
HRESULT result = szInterface->archive->Extract(indices, 1, false, extractCallback);
|
||||||
if (result != S_OK) {
|
if (result != S_OK) {
|
||||||
qDebug() << "Extract Error" << endl;
|
qDebug() << "Extract Error" << Qt::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QByteArray((char *)extractCallbackSpec->data, extractCallbackSpec->newFileSize);
|
return QByteArray((char *)extractCallbackSpec->data, extractCallbackSpec->newFileSize);
|
||||||
|
@ -309,7 +309,7 @@ STDMETHODIMP YCArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
|
|||||||
// You can ask real password here from user
|
// You can ask real password here from user
|
||||||
// Password = GetPassword(OutStream);
|
// Password = GetPassword(OutStream);
|
||||||
// PasswordIsDefined = true;
|
// PasswordIsDefined = true;
|
||||||
qDebug() << "Password is not defined" << endl;
|
qDebug() << "Password is not defined" << Qt::endl;
|
||||||
return E_ABORT;
|
return E_ABORT;
|
||||||
}
|
}
|
||||||
return StringToBstr(Password, password);
|
return StringToBstr(Password, password);
|
||||||
|
@ -44,7 +44,7 @@ STDMETHODIMP YCArchiveOpenCallback::CryptoGetTextPassword(BSTR *password)
|
|||||||
// You can ask real password here from user
|
// You can ask real password here from user
|
||||||
// Password = GetPassword(OutStream);
|
// Password = GetPassword(OutStream);
|
||||||
// PasswordIsDefined = true;
|
// PasswordIsDefined = true;
|
||||||
qDebug() << "Password is not defined" << endl;
|
qDebug() << "Password is not defined" << Qt::endl;
|
||||||
return E_ABORT;
|
return E_ABORT;
|
||||||
}
|
}
|
||||||
return StringToBstr(Password, password);
|
return StringToBstr(Password, password);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user