Fix url parameter, add http

This commit is contained in:
Klaas Freitag 2011-09-30 15:35:19 +02:00
parent 35aee0de00
commit c9de9810e2

View file

@ -185,7 +185,11 @@ void OwncloudSetup::writeOwncloudConfig()
{
qDebug() << "*** writing mirall config to " << mirallConfigFile();
QSettings settings( mirallConfigFile(), QSettings::IniFormat);
settings.setValue("ownCloud/url", _ocWizard->field("OCUrl").toString() );
QString url = _ocWizard->field("OCUrl").toString();
if( !url.startsWith("http")) {
url.prepend( "http://" );
}
settings.setValue("ownCloud/url", url );
settings.setValue("ownCloud/user", _ocWizard->field("OCUser").toString() );
settings.setValue("ownCloud/password", _ocWizard->field("OCPasswd").toString() );