aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/ArchiveFileOperator.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-30 17:33:21 +0000
committersaturneric <[email protected]>2024-07-30 17:33:21 +0000
commit02edad4c989f60e248657bb7854253f8297db583 (patch)
tree0fa307c34d270f42ba1ad90da819c259d744f283 /src/core/function/ArchiveFileOperator.cpp
parentfeat: should check build capability at dev branch (diff)
downloadGpgFrontend-02edad4c989f60e248657bb7854253f8297db583.tar.gz
GpgFrontend-02edad4c989f60e248657bb7854253f8297db583.zip
fix: use standard os detection macro
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r--src/core/function/ArchiveFileOperator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp
index c478ed15..2fc801ab 100644
--- a/src/core/function/ArchiveFileOperator.cpp
+++ b/src/core/function/ArchiveFileOperator.cpp
@@ -103,7 +103,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
auto *disk = archive_read_disk_new();
archive_read_disk_set_standard_lookup(disk);
-#ifdef WINDOWS
+#if defined(_WIN32) || defined(WIN32)
auto target_directory_utf16_wstr = std::wstring(
reinterpret_cast<const wchar_t *>((target_directory).utf16()));
auto r =
@@ -135,7 +135,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
archive_read_disk_descend(disk);
-#ifdef WINDOWS
+#if defined(_WIN32) || defined(WIN32)
auto source_path =
QString::fromUtf16(reinterpret_cast<const char16_t *>(
archive_entry_pathname_w(entry)));
@@ -150,7 +150,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
auto relativ_path_name = base_path.relativeFilePath(source_path);
archive_entry_set_pathname(entry, relativ_path_name.toUtf8());
-#ifdef WINDOWS
+#if defined(_WIN32) || defined(WIN32)
auto source_path_utf16_wstr = std::wstring(
reinterpret_cast<const wchar_t *>(source_path.utf16()));
archive_entry_copy_sourcepath_w(entry,
@@ -253,7 +253,7 @@ void ArchiveFileOperator::ExtractArchiveFromDataExchanger(
auto path_name = QString::fromUtf8(archive_entry_pathname(entry));
auto target_path_name = target_path + "/" + path_name;
-#ifdef WINDOWS
+#if defined(_WIN32) || defined(WIN32)
auto target_path_utf16_wstr = std::wstring(
reinterpret_cast<const wchar_t *>((target_path_name).utf16()));
archive_entry_copy_pathname_w(entry, target_path_utf16_wstr.c_str());