From 01dfc8df4f019e439e7b3e774ef3a02a2a908de2 Mon Sep 17 00:00:00 2001 From: saturneric Date: Wed, 31 Jan 2024 13:57:48 +0800 Subject: feat: support qt5 build option --- src/core/function/ArchiveFileOperator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/function/ArchiveFileOperator.cpp') diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp index 2b76e4ac..475ef434 100644 --- a/src/core/function/ArchiveFileOperator.cpp +++ b/src/core/function/ArchiveFileOperator.cpp @@ -143,7 +143,11 @@ void ArchiveFileOperator::NewArchive2DataExchanger( #endif QFile file(source_path); +#ifdef QT5_BUILD + if (file.open(QIODevice::ReadOnly)) { +#else if (file.open(QIODeviceBase::ReadOnly)) { +#endif // turn absolute path to relative path auto relativ_path_name = base_path.relativeFilePath(source_path); archive_entry_set_pathname(entry, relativ_path_name.toUtf8()); -- cgit v1.2.3