Skip to content

Commit

Permalink
Add QtSvg support to macOS deployment (#169)
Browse files Browse the repository at this point in the history
* Fix ARM64 Apple Clang errors

* Add QtSvg library
  • Loading branch information
campital authored Aug 10, 2024
1 parent a4fe999 commit 7f84383
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Externals/Qt-macOS
Submodule Qt-macOS updated 2582 files
8 changes: 2 additions & 6 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ endif ()

find_package(Qt6Core REQUIRED)
find_package(Qt6Gui REQUIRED)
if (NOT APPLE)
find_package(Qt6Svg REQUIRED)
endif ()
find_package(Qt6Svg REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
Expand Down Expand Up @@ -101,9 +99,7 @@ add_executable(dolphin-memory-engine ${GUI_TYPE} ${SRCS})
target_link_libraries(dolphin-memory-engine Qt6::Widgets)
target_link_libraries(dolphin-memory-engine Qt6::Gui)
target_link_libraries(dolphin-memory-engine Qt6::Core)
if (NOT APPLE)
target_link_libraries(dolphin-memory-engine Qt6::Svg)
endif ()
target_link_libraries(dolphin-memory-engine Qt6::Svg)

if(WIN32)
set_target_properties(dolphin-memory-engine PROPERTIES OUTPUT_NAME DolphinMemoryEngine)
Expand Down
1 change: 1 addition & 0 deletions Source/DolphinProcess/Mac/MacDolphinProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "../../Common/MemoryCommon.h"

#include <cstdlib>
#include <cstring>
#include <mach/mach_vm.h>
#include <memory>
#include <string_view>
Expand Down
10 changes: 5 additions & 5 deletions Source/GUI/MemCopy/DlgCopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ bool DlgCopy::isHexString(std::string_view str)
str = str.substr(2);
}

return std::ranges::all_of(str.cbegin(), str.cend(), [](const char c) {
return ('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F');
});
return std::find_if(str.cbegin(), str.cend(), [](const char c) {
return !(('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F'));
}) == str.cend();
}

bool DlgCopy::hexStringToU32(const std::string_view str, u32& output)
Expand All @@ -193,8 +193,8 @@ bool DlgCopy::hexStringToU32(const std::string_view str, u32& output)

bool DlgCopy::isUnsignedIntegerString(const std::string_view str)
{
return std::ranges::all_of(str.cbegin(), str.cend(),
[](const char c) { return '0' <= c && c <= '9'; });
return std::find_if(str.cbegin(), str.cend(),
[](const char c) { return !('0' <= c && c <= '9'); }) == str.cend();
}

bool DlgCopy::uintStringToU32(const std::string_view str, u32& output)
Expand Down
1 change: 1 addition & 0 deletions Source/GUI/MemWatcher/MemWatchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <QTextStream>
#include <QVBoxLayout>
#include <string>
#include <unordered_map>

#include "../../Common/MemoryCommon.h"
#include "../../MemoryWatch/MemWatchEntry.h"
Expand Down
1 change: 1 addition & 0 deletions Source/GUI/Settings/SConfig.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <memory>
#include <unordered_map>

#include <QByteArray>
#include <QLockFile>
Expand Down

0 comments on commit 7f84383

Please sign in to comment.