This is for #2993 and #2802
foreach( Folder *f, _folderMap.values() ) {
if(f) {
f->setProxyDirty(value);
+
+ if (f->accountState() && f->accountState()->account()
+ && f->accountState()->account()->networkAccessManager()) {
+ // Need to do this have us not use the old determined system proxy
+ f->accountState()->account()->networkAccessManager()->setProxy(
+ QNetworkProxy(QNetworkProxy::DefaultProxy));
+ }
}
}
}
switch(proxyType) {
case QNetworkProxy::NoProxy:
+ qDebug() << "Set proxy configuration to use NO proxy";
QNetworkProxyFactory::setUseSystemConfiguration(false);
QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy);
break;
ClientProxy::lookupSystemProxyAsync(_account->url(),
this, SLOT(systemProxyLookupDone(QNetworkProxy)));
} else {
+ // We want to reset the QNAM proxy so that the global proxy settings are used (via ClientProxy settings)
+ _account->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::DefaultProxy));
// use a queued invocation so we're as asynchronous as with the other code path
QMetaObject::invokeMethod(this, "slotCheckServerAndAuth", Qt::QueuedConnection);
}