aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/ArchiveFileOperator.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-31 05:57:48 +0000
committersaturneric <[email protected]>2024-01-31 05:57:48 +0000
commit01dfc8df4f019e439e7b3e774ef3a02a2a908de2 (patch)
tree68fda3203652e01136e90e4944e190e8a5d41c51 /src/core/function/ArchiveFileOperator.cpp
parentfeat: try to add qt5 support (diff)
downloadGpgFrontend-01dfc8df4f019e439e7b3e774ef3a02a2a908de2.tar.gz
GpgFrontend-01dfc8df4f019e439e7b3e774ef3a02a2a908de2.zip
feat: support qt5 build option
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r--src/core/function/ArchiveFileOperator.cpp4
1 files changed, 4 insertions, 0 deletions
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());