Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.714 kB
#include "UnsupportedContentHandler.h"
#include "WebPage.h"
#include <QNetworkReply>
UnsupportedContentHandler::UnsupportedContentHandler(WebPage *page, QNetworkReply *reply, QObject *parent) : QObject(parent) {
m_page = page;
m_reply = reply;
}
void UnsupportedContentHandler::renderNonHtmlContent() {
QByteArray text = m_reply->readAll();
m_page->mainFrame()->setContent(text, QString("text/plain"), m_reply->url());
m_page->unsupportedContentFinishedReply(m_reply);
this->deleteLater();
}
void UnsupportedContentHandler::waitForReplyToFinish() {
connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
void UnsupportedContentHandler::replyFinished() {
renderNonHtmlContent();
}
Jump to Line
Something went wrong with that request. Please try again.