|
|
|
@ -115,14 +115,15 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
|
|
|
|
|
~Browser() { |
|
|
|
|
LOG; |
|
|
|
|
for (DownloadProcesses::iterator it(_downloadProcesses.begin()); |
|
|
|
|
it!=_downloadProcesses.end(); ++it) { |
|
|
|
|
LOG<<"delete:"<<it->second->fileName(); |
|
|
|
|
delete it->second; |
|
|
|
|
it->second = 0; |
|
|
|
|
it->first->terminate(); |
|
|
|
|
delete it->first; |
|
|
|
|
} |
|
|
|
|
if (_settings.flag("CloseApps")) |
|
|
|
|
for (DownloadProcesses::iterator it(_downloadProcesses.begin()); |
|
|
|
|
it!=_downloadProcesses.end(); ++it) { |
|
|
|
|
LOG<<"delete:"<<it->second->fileName(); |
|
|
|
|
delete it->second; |
|
|
|
|
it->second = 0; |
|
|
|
|
it->first->terminate(); |
|
|
|
|
delete it->first; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//! Whitelisting
|
|
|
|
@ -1020,7 +1021,7 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
if (it!=_settings.mimetypes().end()) { |
|
|
|
|
QTemporaryFile *file = |
|
|
|
|
new QTemporaryFile(QDir::tempPath()+QDir::separator() |
|
|
|
|
+"swisssurferXXXXXX." |
|
|
|
|
+"swisssurferXXXXXX" |
|
|
|
|
+it.value().toStringList().at(0), this); |
|
|
|
|
file->open(); |
|
|
|
|
file->write(reply->readAll()); |
|
|
|
@ -1051,7 +1052,8 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
|
|
|
|
|
void processFinished() { |
|
|
|
|
LOG; |
|
|
|
|
delete _downloadProcesses[qobject_cast<QProcess*>(sender())]; |
|
|
|
|
if (_settings.flag("CloseApps")) |
|
|
|
|
delete _downloadProcesses[qobject_cast<QProcess*>(sender())]; |
|
|
|
|
_downloadProcesses.erase(qobject_cast<QProcess*>(sender())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|