Changeset 769 for trunk/demos/browser


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:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/browser/browser.pro

    r680 r769  
    66contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools
    77else: DEFINES += QT_NO_UITOOLS
    8 
    9 CONFIG(release,release|debug):DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
    108
    119FORMS += \
  • trunk/demos/browser/networkaccessmanager.cpp

    r651 r769  
    113113    double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount));
    114114    double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount));
     115#ifdef QT_DEBUG
    115116    qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
    116 
     117#endif
    117118}
    118119
  • 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.