[Pkg-owncloud-commits] [owncloud-client] 283/484: SetupWizard: populate credentials from HTTP server URL

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit bd65eb32b74dc74ed769e8bb549ee9218e4c9f5d
Author: Michael Nutt <michael at nuttnet.net>
Date:   Mon Nov 9 18:21:33 2015 -0500

    SetupWizard: populate credentials from HTTP server URL
    
    If a user enters a server URL in the form of
    https://user:pass@example.com/, pre-populate the following credentials
    page with those values.
---
 src/gui/wizard/owncloudhttpcredspage.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/gui/wizard/owncloudhttpcredspage.cpp b/src/gui/wizard/owncloudhttpcredspage.cpp
index ff75edc..09f05f9 100644
--- a/src/gui/wizard/owncloudhttpcredspage.cpp
+++ b/src/gui/wizard/owncloudhttpcredspage.cpp
@@ -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();
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list