closes #50
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ class Settings: public QDialog, protected Ui::Settings {
|
||||
// CheckBoxes
|
||||
_checkboxes["SaveWindowState"] =
|
||||
std::make_pair(_saveWindowState, _saveWindowState->isChecked());
|
||||
_checkboxes["CloseApps"] =
|
||||
std::make_pair(_closeApps, _closeApps->isChecked());
|
||||
|
||||
load(!_mimetypes.size());
|
||||
on__buttons_rejected();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -653,11 +653,14 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_closeApps">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>close mimetype helper applications on exit</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -331,12 +331,12 @@ Compiled: qt-%5</oldsource>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1094"/>
|
||||
<location filename="browser.hxx" line="1097"/>
|
||||
<source>authentication required</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1106"/>
|
||||
<location filename="browser.hxx" line="1109"/>
|
||||
<source>ssl error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -331,12 +331,12 @@ Compiled: qt-%5</oldsource>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1094"/>
|
||||
<location filename="browser.hxx" line="1097"/>
|
||||
<source>authentication required</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1106"/>
|
||||
<location filename="browser.hxx" line="1109"/>
|
||||
<source>ssl error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -331,12 +331,12 @@ Compiled: qt-%5</oldsource>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1094"/>
|
||||
<location filename="browser.hxx" line="1097"/>
|
||||
<source>authentication required</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1106"/>
|
||||
<location filename="browser.hxx" line="1109"/>
|
||||
<source>ssl error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -331,12 +331,12 @@ Compiled: qt-%5</oldsource>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1094"/>
|
||||
<location filename="browser.hxx" line="1097"/>
|
||||
<source>authentication required</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="browser.hxx" line="1106"/>
|
||||
<location filename="browser.hxx" line="1109"/>
|
||||
<source>ssl error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
Reference in New Issue
Block a user