Fix libsync exports for proxy changes in #1886

Build failed on Windows, missing libsync export for printQNetworkProxy after
moving ClientProxy class from gui to libsync.

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2020-06-18 21:05:11 +02:00
parent 1afb70e114
commit 92c8d6836b
No known key found for this signature in database
GPG key ID: 00819E3BF4177B28
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