mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
Wizard: show a message when the URL is invalid
Rather than let Qt show "Host not found" Issue #6646
This commit is contained in:
parent
986cf448a9
commit
39c6196487
1 changed files with 8 additions and 1 deletions
|
@ -293,12 +293,19 @@ QString OwncloudSetupPage::url() const
|
||||||
bool OwncloudSetupPage::validatePage()
|
bool OwncloudSetupPage::validatePage()
|
||||||
{
|
{
|
||||||
if (!_authTypeKnown) {
|
if (!_authTypeKnown) {
|
||||||
|
QString u = url();
|
||||||
|
QUrl qurl(u);
|
||||||
|
if (!qurl.isValid() || qurl.host().isEmpty()) {
|
||||||
|
setErrorString(tr("Invalid URL"), false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
setErrorString(QString(), false);
|
setErrorString(QString(), false);
|
||||||
_checking = true;
|
_checking = true;
|
||||||
startSpinner();
|
startSpinner();
|
||||||
emit completeChanged();
|
emit completeChanged();
|
||||||
|
|
||||||
emit determineAuthType(url());
|
emit determineAuthType(u);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// connecting is running
|
// connecting is running
|
||||||
|
|
Loading…
Reference in a new issue