mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-21 11:20:49 +08:00
fixed Windows build
This commit is contained in:
parent
593eae11aa
commit
f00ba86f2e
@ -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());
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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>
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user