1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[Fix] Fixed potential endless loop when getting error opening url.

- when there is navigating error to http(s) page and WebKit throw
  unsupported content error, there is possibility to stuck in
  endless new tab opening loop when user has QupZilla as provider
  for http(s) scheme
This commit is contained in:
nowrep 2012-02-12 18:02:05 +01:00
parent fa5cfd7137
commit 159a0c97d3

View File

@ -223,7 +223,13 @@ void WebPage::handleUnsupportedContent(QNetworkReply* reply)
case QNetworkReply::ProtocolUnknownError: case QNetworkReply::ProtocolUnknownError:
qDebug() << "WebPage::UnsupportedContent" << url << "ProtocolUnknowError"; qDebug() << "WebPage::UnsupportedContent" << url << "ProtocolUnknowError";
QDesktopServices::openUrl(url);
// We are not going to end in endless new tab opening loop in case
// user has QupZilla as default provider for http / https urls
if (!url.scheme().startsWith("http")) {
QDesktopServices::openUrl(url);
}
reply->deleteLater(); reply->deleteLater();
return; return;