mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Merge pull request #4100 from mnutt/credentials-from-url
Populate account setup credentials from server URL
This commit is contained in:
commit
15fe3b569b
1 changed files with 12 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue