fixed Windows build

This commit is contained in:
QxQ 2021-02-07 22:29:30 +08:00
parent 593eae11aa
commit f00ba86f2e
5 changed files with 8 additions and 6 deletions

View File

@ -249,11 +249,11 @@ namespace Qv2ray::base
}; };
template<typename T> template<typename T>
inline uint qHash(IDType<T> key) inline size_t qHash(IDType<T> key)
{ {
return ::qHash(key.toString()); 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()); return ::qHash(pair.connectionId.toString() + pair.groupId.toString());
} }

View File

@ -30,7 +30,7 @@ namespace Qv2ray::components::latency::icmping
void ICMPPing::ping() void ICMPPing::ping()
{ {
waitHandleTimer = loop->resource<uvw::TimerHandle>(); waitHandleTimer = loop->resource<uvw::TimerHandle>();
waitHandleTimer->on<uvw::TimerEvent>([ptr = shared_from_this(), this](auto &&, auto &&h) { waitHandleTimer->on<uvw::TimerEvent>([ptr = shared_from_this(), this](auto &&, auto &&) {
SleepEx(0, TRUE); SleepEx(0, TRUE);
if (data.failedCount + successCount == data.totalCount) if (data.failedCount + successCount == data.totalCount)
{ {

View File

@ -4,8 +4,10 @@
#include "components/plugins/QvPluginHost.hpp" #include "components/plugins/QvPluginHost.hpp"
#include "utils/QvHelpers.hpp" #include "utils/QvHelpers.hpp"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <WinInet.h> //
#include <Windows.h> #include <Windows.h>
//
#include <WinInet.h>
#include <ras.h> #include <ras.h>
#include <raserror.h> #include <raserror.h>
#include <vector> #include <vector>

View File

@ -21,7 +21,7 @@ namespace Qv2ray::core::handler
{ {
return currentId; return currentId;
} }
int ActivePluginKernelsCount() const size_t ActivePluginKernelsCount() const
{ {
return activeKernels.size(); return activeKernels.size();
} }

View File

@ -131,7 +131,7 @@ namespace Qv2ray::core::kernel
// nativeArguments are required for Windows platform, without a // nativeArguments are required for Windows platform, without a
// reason... // reason...
proc.setProcessChannelMode(QProcess::MergedChannels); proc.setProcessChannelMode(QProcess::MergedChannels);
proc.setProgram(vCorePath); proc.setProgram(corePath);
proc.setNativeArguments("--version"); proc.setNativeArguments("--version");
proc.start(); proc.start();
#else #else