@@ -349,35 +349,34 @@ void OwncloudSetupPage::setErrorString(const QString &err, bool retryHTTPonly)
349349 if (err.isEmpty ()) {
350350 _ui.errorLabel ->setVisible (false );
351351 } else {
352- if (retryHTTPonly) {
353- const auto urlString = url ();
354- auto url = QUrl::fromUserInput (urlString);
355- if (url.scheme () == " https" ) {
356- // Ask the user how to proceed when connecting to a https:// URL fails.
357- // It is possible that the server is secured with client-side TLS certificates,
358- // but that it has no way of informing the owncloud client that this is the case.
359-
360- OwncloudConnectionMethodDialog dialog;
361- dialog.setUrl (url);
362- // FIXME: Synchronous dialogs are not so nice because of event loop recursion
363- int retVal = dialog.exec ();
364-
365- switch (retVal) {
366- case OwncloudConnectionMethodDialog::No_TLS: {
367- url.setScheme (" http" );
368- _ui.leUrl ->setFullText (url.toString ());
369- // skip ahead to next page, since the user would expect us to retry automatically
370- wizard ()->next ();
371- } break ;
372- case OwncloudConnectionMethodDialog::Client_Side_TLS:
373- addCertDial->show ();
374- break ;
375- case OwncloudConnectionMethodDialog::Closed:
376- case OwncloudConnectionMethodDialog::Back:
377- default :
378- // No-op.
379- break ;
380- }
352+ const auto urlString = url ();
353+ auto url = QUrl::fromUserInput (urlString);
354+ if (url.scheme () == " https" ) {
355+ // Ask the user how to proceed when connecting to a https:// URL fails.
356+ // It is possible that the server is secured with client-side TLS certificates,
357+ // but that it has no way of informing the owncloud client that this is the case.
358+
359+ OwncloudConnectionMethodDialog dialog;
360+ dialog.setUrl (url);
361+ dialog.setHTTPOnly (retryHTTPonly);
362+ // FIXME: Synchronous dialogs are not so nice because of event loop recursion
363+ int retVal = dialog.exec ();
364+
365+ switch (retVal) {
366+ case OwncloudConnectionMethodDialog::No_TLS: {
367+ url.setScheme (" http" );
368+ _ui.leUrl ->setFullText (url.toString ());
369+ // skip ahead to next page, since the user would expect us to retry automatically
370+ wizard ()->next ();
371+ } break ;
372+ case OwncloudConnectionMethodDialog::Client_Side_TLS:
373+ addCertDial->show ();
374+ break ;
375+ case OwncloudConnectionMethodDialog::Closed:
376+ case OwncloudConnectionMethodDialog::Back:
377+ default :
378+ // No-op.
379+ break ;
381380 }
382381 }
383382
0 commit comments