call unsupportedcontent only once; probably also fixes #119; refs #146

master
Marc Wäckerlin 13 years ago
parent fab67933f5
commit 085e6a73bf
  1. 7
      src/browser.hxx

@ -247,6 +247,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
delete it->second;
it->second = 0;
if (_settings.flag("CloseApps")) {
LOG<<"terminate process";
it->first->terminate();
delete it->first;
}
@ -1319,11 +1320,12 @@ class Browser: public QMainWindow, protected Ui::Browser {
it!=rh.end(); ++it) {
LOG<<"RawHeader:"<<it->first<<it->second;
}
if (reply->isFinished())
if (reply->isFinished()) {
handleContent(reply);
else
} else {
assert(connect(reply, SIGNAL(finished()), SLOT(downloadFinished())));
}
}
void downloadFinished() {
LOG;
@ -1353,7 +1355,6 @@ class Browser: public QMainWindow, protected Ui::Browser {
(_settings.mimetype
(reply->header(QNetworkRequest::ContentTypeHeader).toString(),
filename));
if (!type.isEmpty()) unsupportedContent(reply);
}
void handleContent(QNetworkReply* reply) {

Loading…
Cancel
Save