Merge pull request #2106 from nextcloud/fix/proxy-build-libsync

Fix libsync exports for proxy changes in #1886
This commit is contained in:
Michael Schuster 2020-06-18 21:24:25 +02:00 committed by GitHub
commit cee8a4ccf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View file

@ -76,7 +76,7 @@ void ConnectionValidator::systemProxyLookupDone(const QNetworkProxy &proxy)
}
if (proxy.type() != QNetworkProxy::NoProxy) {
qCInfo(lcConnectionValidator) << "Setting QNAM proxy to be system proxy" << printQNetworkProxy(proxy);
qCInfo(lcConnectionValidator) << "Setting QNAM proxy to be system proxy" << ClientProxy::printQNetworkProxy(proxy);
} else {
qCInfo(lcConnectionValidator) << "No system proxy set by OS";
}

View file

@ -170,7 +170,7 @@ void OwncloudSetupWizard::slotCheckServer(const QString &urlString)
void OwncloudSetupWizard::slotSystemProxyLookupDone(const QNetworkProxy &proxy)
{
if (proxy.type() != QNetworkProxy::NoProxy) {
qCInfo(lcWizard) << "Setting QNAM proxy to be system proxy" << printQNetworkProxy(proxy);
qCInfo(lcWizard) << "Setting QNAM proxy to be system proxy" << ClientProxy::printQNetworkProxy(proxy);
} else {
qCInfo(lcWizard) << "No system proxy set by OS";
}

View file

@ -56,7 +56,7 @@ bool ClientProxy::isUsingSystemDefault()
return true;
}
const char *proxyTypeToCStr(QNetworkProxy::ProxyType type)
const char *ClientProxy::proxyTypeToCStr(QNetworkProxy::ProxyType type)
{
switch (type) {
case QNetworkProxy::NoProxy:
@ -76,7 +76,7 @@ const char *proxyTypeToCStr(QNetworkProxy::ProxyType type)
}
}
QString printQNetworkProxy(const QNetworkProxy &proxy)
QString ClientProxy::printQNetworkProxy(const QNetworkProxy &proxy)
{
return QString("%1://%2:%3").arg(proxyTypeToCStr(proxy.type())).arg(proxy.hostName()).arg(proxy.port());
}

View file

@ -41,6 +41,9 @@ public:
static bool isUsingSystemDefault();
static void lookupSystemProxyAsync(const QUrl &url, QObject *dst, const char *slot);
static QString printQNetworkProxy(const QNetworkProxy &proxy);
static const char *proxyTypeToCStr(QNetworkProxy::ProxyType type);
public slots:
void setupQtProxyFromConfig();
};
@ -58,7 +61,6 @@ private:
QUrl _url;
};
QString printQNetworkProxy(const QNetworkProxy &proxy);
}
#endif // CLIENTPROXY_H