Permalink
Browse files

Don't disconnect loadFinished in UnsupportedContentHandler

WebPage::setContent will cause the loadFinished signal to fire, so
there's no need to call loadFinished if the signal is connected.
  • Loading branch information...
mhoran committed Dec 6, 2012
1 parent b28452e commit 2eb38b3c0235de382a754ac8d3a0d71ed7704fdf
Showing with 0 additions and 3 deletions.
  1. +0 −3 src/UnsupportedContentHandler.cpp
@@ -11,16 +11,13 @@ void UnsupportedContentHandler::renderNonHtmlContent() {
QByteArray text = m_reply->readAll();
m_page->mainFrame()->setContent(text, QString("text/plain"), m_reply->url());
m_page->unsupportedContentFinishedReply(m_reply);
- m_page->loadFinished(true);
this->deleteLater();
}
void UnsupportedContentHandler::waitForReplyToFinish() {
connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
- disconnect(m_page, SIGNAL(loadFinished(bool)), m_page, SLOT(loadFinished(bool)));
}
void UnsupportedContentHandler::replyFinished() {
renderNonHtmlContent();
- connect(m_page, SIGNAL(loadFinished(bool)), m_page, SLOT(loadFinished(bool)));
}

0 comments on commit 2eb38b3

Please sign in to comment.