Fix network access on linux without a proxy
This commit is contained in:
parent
e6561a0122
commit
b5942aa7d6
@ -71,6 +71,9 @@ QList<QNetworkProxy> NetworkProxyFactory::queryProxy(
|
||||
#ifdef Q_OS_LINUX
|
||||
Q_UNUSED(query);
|
||||
|
||||
if (env_url_.isEmpty()) {
|
||||
ret.setType(QNetworkProxy::NoProxy);
|
||||
} else {
|
||||
ret.setHostName(env_url_.host());
|
||||
ret.setPort(env_url_.port());
|
||||
ret.setUser(env_url_.userName());
|
||||
@ -79,6 +82,7 @@ QList<QNetworkProxy> NetworkProxyFactory::queryProxy(
|
||||
ret.setType(QNetworkProxy::HttpProxy);
|
||||
else
|
||||
ret.setType(QNetworkProxy::Socks5Proxy);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
return systemProxyForQuery(query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user