mirror of
https://github.com/YACReader/yacreader
synced 2025-07-24 16:05:01 -04:00
fixed Qt5 compilation for YACReaderLibrary in Linux
fixed management of special chars in CompressedArchive paths (only with Qt5, TODO: fix the issue in Qt4)
This commit is contained in:
@ -107,8 +107,11 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
||||
qDebug() << "wrong format";
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef UNICODE
|
||||
if (!fileSpec->Open((LPCTSTR)filePath.toStdWString().data()))
|
||||
#else
|
||||
if (!fileSpec->Open((LPCTSTR)filePath.toStdString().data()))
|
||||
#endif
|
||||
{
|
||||
qDebug() << "unable to load" + filePath;
|
||||
continue;
|
||||
@ -147,7 +150,11 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef UNICODE
|
||||
if (!fileSpec->Open((LPCTSTR)filePath.toStdWString().data()))
|
||||
#else
|
||||
if (!fileSpec->Open((LPCTSTR)filePath.toStdString().data()))
|
||||
#endif
|
||||
{
|
||||
qDebug() << "Error opening rar file :" + filePath;
|
||||
return;
|
||||
|
@ -54,7 +54,7 @@ DEFINES += UNICODE _UNICODE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
DEFINES += UNICODE _UNICODE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
||||
DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
||||
NDEBUG _REENTRANT ENV_UNIX \
|
||||
_7ZIP_LARGE_PAGES
|
||||
}
|
||||
|
Reference in New Issue
Block a user