From f00ba86f2e38aa3d05c9388758a6a687c81ad9a2 Mon Sep 17 00:00:00 2001 From: QxQ <59914293+U-v-U@users.noreply.github.com> Date: Sun, 7 Feb 2021 22:29:30 +0800 Subject: [PATCH] fixed Windows build --- src/base/models/QvConfigIdentifier.hpp | 4 ++-- src/components/latency/win/ICMPPing.cpp | 2 +- src/components/proxy/QvProxyConfigurator.cpp | 4 +++- src/core/handler/KernelInstanceHandler.hpp | 2 +- src/core/kernel/V2RayKernelInteractions.cpp | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/base/models/QvConfigIdentifier.hpp b/src/base/models/QvConfigIdentifier.hpp index c0a3a901..1215e42b 100644 --- a/src/base/models/QvConfigIdentifier.hpp +++ b/src/base/models/QvConfigIdentifier.hpp @@ -249,11 +249,11 @@ namespace Qv2ray::base }; template - inline uint qHash(IDType key) + inline size_t qHash(IDType key) { return ::qHash(key.toString()); } - inline uint qHash(const Qv2ray::base::ConnectionGroupPair &pair) + inline size_t qHash(const Qv2ray::base::ConnectionGroupPair &pair) { return ::qHash(pair.connectionId.toString() + pair.groupId.toString()); } diff --git a/src/components/latency/win/ICMPPing.cpp b/src/components/latency/win/ICMPPing.cpp index 3d99a08c..42c3690c 100644 --- a/src/components/latency/win/ICMPPing.cpp +++ b/src/components/latency/win/ICMPPing.cpp @@ -30,7 +30,7 @@ namespace Qv2ray::components::latency::icmping void ICMPPing::ping() { waitHandleTimer = loop->resource(); - waitHandleTimer->on([ptr = shared_from_this(), this](auto &&, auto &&h) { + waitHandleTimer->on([ptr = shared_from_this(), this](auto &&, auto &&) { SleepEx(0, TRUE); if (data.failedCount + successCount == data.totalCount) { diff --git a/src/components/proxy/QvProxyConfigurator.cpp b/src/components/proxy/QvProxyConfigurator.cpp index eb82ac17..05911f07 100644 --- a/src/components/proxy/QvProxyConfigurator.cpp +++ b/src/components/proxy/QvProxyConfigurator.cpp @@ -4,8 +4,10 @@ #include "components/plugins/QvPluginHost.hpp" #include "utils/QvHelpers.hpp" #ifdef Q_OS_WIN -#include +// #include +// +#include #include #include #include diff --git a/src/core/handler/KernelInstanceHandler.hpp b/src/core/handler/KernelInstanceHandler.hpp index 2b70c18c..b0117d3f 100644 --- a/src/core/handler/KernelInstanceHandler.hpp +++ b/src/core/handler/KernelInstanceHandler.hpp @@ -21,7 +21,7 @@ namespace Qv2ray::core::handler { return currentId; } - int ActivePluginKernelsCount() const + size_t ActivePluginKernelsCount() const { return activeKernels.size(); } diff --git a/src/core/kernel/V2RayKernelInteractions.cpp b/src/core/kernel/V2RayKernelInteractions.cpp index aca0cffa..68414d2b 100644 --- a/src/core/kernel/V2RayKernelInteractions.cpp +++ b/src/core/kernel/V2RayKernelInteractions.cpp @@ -131,7 +131,7 @@ namespace Qv2ray::core::kernel // nativeArguments are required for Windows platform, without a // reason... proc.setProcessChannelMode(QProcess::MergedChannels); - proc.setProgram(vCorePath); + proc.setProgram(corePath); proc.setNativeArguments("--version"); proc.start(); #else