If a new server is configured, take the proxy config to the new config

file.
This commit is contained in:
Klaas Freitag 2013-02-18 17:16:10 +02:00
parent 8809ac0c4a
commit 89f7f75af2

View File

@ -172,6 +172,15 @@ void OwncloudSetupWizard::testOwnCloudConnect()
_ocWizard->field(QLatin1String("secureConnect")).toBool(),
_ocWizard->field(QLatin1String("PwdNoLocalStore")).toBool() );
// If there is already a config, take its proxy config.
if( ownCloudInfo::instance()->isConfigured() ) {
MirallConfigFile prevCfg;
if( prevCfg.proxyType() != QNetworkProxy::DefaultProxy ) {
cfgFile.setProxyType( prevCfg.proxyType(), prevCfg.proxyHostName(), prevCfg.proxyPort(),
prevCfg.proxyUser(), prevCfg.proxyPassword() );
}
}
// now start ownCloudInfo to check the connection.
ownCloudInfo* info = ownCloudInfo::instance();
info->setCustomConfigHandle( _configHandle );