Merge pull request #4100 from mnutt/credentials-from-url

Populate account setup credentials from server URL
This commit is contained in:
Markus Goetz 2015-11-10 16:12:34 +01:00
commit 15fe3b569b

View file

@ -78,6 +78,18 @@ void OwncloudHttpCredsPage::initializePage()
if (!user.isEmpty()) {
_ui.leUsername->setText(user);
}
} else {
QUrl url = ocWizard->account()->url();
const QString user = url.userName();
const QString password = url.password();
if(!user.isEmpty()) {
_ui.leUsername->setText(user);
}
if(!password.isEmpty()) {
_ui.lePassword->setText(password);
}
}
_ui.leUsername->setFocus();
}