From: Stephan Beyer Date: Sat, 23 May 2020 16:12:58 +0000 (+0200) Subject: Show URL placeholder hint in wizard X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~216^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f46ce2ce985e10f9eddfa9ff990c3ac10e2bed6e;p=nextcloud-desktop.git Show URL placeholder hint in wizard In owncloudsetupnocredspage.ui, the URL input field leUrl has a placeholder text saying "https://..." which is a very useful hint for the user. However, in the OwncloudSetupPage constructor, the placeholer text is overwritten by the return string of the theme's wizardUrlHint() method. The NextcloudTheme class does not override this virtual method, so an empty string is used. To make available the "https://..." hint, it is moved from the UI file to NextcloudTheme::wizardUrlHint(). Note that, if a theme is used which does not allow a custom server URL, the placeholder text is now empty. This makes sense because the input field is disabled in that case. Signed-off-by: Stephan Beyer --- diff --git a/src/gui/wizard/owncloudsetupnocredspage.ui b/src/gui/wizard/owncloudsetupnocredspage.ui index 32995ba11..1644d93f9 100644 --- a/src/gui/wizard/owncloudsetupnocredspage.ui +++ b/src/gui/wizard/owncloudsetupnocredspage.ui @@ -207,7 +207,7 @@ - https://... + diff --git a/src/libsync/nextcloudtheme.cpp b/src/libsync/nextcloudtheme.cpp index a3fdbb31a..6687d6290 100644 --- a/src/libsync/nextcloudtheme.cpp +++ b/src/libsync/nextcloudtheme.cpp @@ -33,4 +33,9 @@ NextcloudTheme::NextcloudTheme() { } +QString NextcloudTheme::wizardUrlHint() const +{ + return QString("https://..."); +} + } diff --git a/src/libsync/nextcloudtheme.h b/src/libsync/nextcloudtheme.h index 4c8dfe998..f7c215b8f 100644 --- a/src/libsync/nextcloudtheme.h +++ b/src/libsync/nextcloudtheme.h @@ -29,6 +29,7 @@ class NextcloudTheme : public Theme public: NextcloudTheme(); + QString wizardUrlHint() const override; }; } #endif // NEXTCLOUD_THEME_H