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

Loading…
Cancel
Save