Ensure the url is complete before we validate it
authorHannah von Reth <hannah.vonreth@owncloud.com>
Wed, 25 Sep 2019 11:45:20 +0000 (13:45 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:00 +0000 (10:59 +0100)
Fixes: #6722
src/gui/wizard/owncloudsetuppage.cpp

index 13538827aa64f3012d77851c950e1f75f6d3bf32..eff655e000c34de9e37791dd0ab4e94c0f554e37 100644 (file)
@@ -199,8 +199,8 @@ void OwncloudSetupPage::slotUrlEditFinished()
     if (QUrl(url).isRelative() && !url.isEmpty()) {
         // no scheme defined, set one
         url.prepend("https://");
+        _ui.leUrl->setFullText(url);
     }
-    _ui.leUrl->setFullText(url);
 }
 
 bool OwncloudSetupPage::isComplete() const
@@ -265,6 +265,7 @@ QString OwncloudSetupPage::url() const
 bool OwncloudSetupPage::validatePage()
 {
     if (!_authTypeKnown) {
+        slotUrlEditFinished();
         QString u = url();
         QUrl qurl(u);
         if (!qurl.isValid() || qurl.host().isEmpty()) {