Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/browser/webview.cpp

    r651 r769  
    144144void WebPage::handleUnsupportedContent(QNetworkReply *reply)
    145145{
    146     if (reply->error() == QNetworkReply::NoError) {
    147         BrowserApplication::downloadManager()->handleUnsupportedContent(reply);
     146    QString errorString = reply->errorString();
     147
     148    if (m_loadingUrl != reply->url()) {
     149        // sub resource of this page
     150        qWarning() << "Resource" << reply->url().toEncoded() << "has unknown Content-Type, will be ignored.";
     151        reply->deleteLater();
    148152        return;
     153    }
     154
     155    if (reply->error() == QNetworkReply::NoError && !reply->header(QNetworkRequest::ContentTypeHeader).isValid()) {
     156        errorString = "Unknown Content-Type";
    149157    }
    150158
     
    157165    QString html = QString(QLatin1String(file.readAll()))
    158166                        .arg(title)
    159                         .arg(reply->errorString())
     167                        .arg(errorString)
    160168                        .arg(reply->url().toString());
    161169
Note: See TracChangeset for help on using the changeset viewer.