From: Roeland Jago Douma Date: Sat, 21 Mar 2020 09:08:09 +0000 (+0100) Subject: Don't show a message box if the entered url returned an error X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~174 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fba69de09617f2651d563c647962c5d68d4805f4;p=nextcloud-desktop.git Don't show a message box if the entered url returned an error BEtter to now just display clickable links etc. Signed-off-by: Roeland Jago Douma --- diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index bced047f2..4aff80956 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -269,7 +269,6 @@ void OwncloudSetupWizard::slotFoundServer(const QUrl &url, const QJsonObject &in void OwncloudSetupWizard::slotNoServerFound(QNetworkReply *reply) { auto job = qobject_cast(sender()); - int resultCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); QString contentType = reply->header(QNetworkRequest::ContentTypeHeader).toString(); // Do this early because reply might be deleted in message box event loop @@ -284,23 +283,6 @@ void OwncloudSetupWizard::slotNoServerFound(QNetworkReply *reply) } bool isDowngradeAdvised = checkDowngradeAdvised(reply); - // If a client cert is needed, nginx sends: - // 400 "\r\n400 No required SSL certificate was sent\r\n\r\n

400 Bad Request

\r\n
No required SSL certificate was sent
\r\n
nginx/1.10.0
\r\n\r\n\r\n" - // If the IP needs to be added as "trusted domain" in oC, oC sends: - // https://gist.github.com/guruz/ab6d11df1873c2ad3932180de92e7d82 - if (resultCode != 200 && contentType.startsWith("text/")) { - // FIXME: Synchronous dialogs are not so nice because of event loop recursion - // (we already create a dialog further below) - QString serverError = reply->peek(1024 * 20); - qCDebug(lcWizard) << serverError; - QMessageBox messageBox(_ocWizard); - messageBox.setText(tr("The server reported the following error:")); - messageBox.setInformativeText(serverError); - messageBox.addButton(QMessageBox::Ok); - messageBox.setTextFormat(Qt::RichText); - messageBox.exec(); - } - // Displays message inside wizard and possibly also another message box _ocWizard->displayError(msg, isDowngradeAdvised);