aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpgwin.cpp15
-rw-r--r--gpgwin.h1
2 files changed, 7 insertions, 9 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 633e3b8..2fd7b32 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -69,8 +69,6 @@ GpgWin::GpgWin()
void GpgWin::restoreSettings()
{
- QSettings settings;
-
// state sets pos & size of dock-widgets
this->restoreState(settings.value("window/windowState").toByteArray());
@@ -323,8 +321,6 @@ void GpgWin::closeEvent(QCloseEvent *event)
/** Save the settings
*/
- QSettings settings;
-
// window position and size
settings.setValue("window/windowState", saveState());
settings.setValue("window/pos", pos());
@@ -502,14 +498,16 @@ void GpgWin::decrypt()
preventNoDataErr(&text);
mCtx->decrypt(text, tmp);
if (!tmp->isEmpty()) {
- // is it mime? TODO: parseMime should be optional by setting
- parseMime(tmp);
+ // is it mime?
+ if(settings.value("mime/parseMime").toBool()) {
+ parseMime(tmp);
+ }
edit->setPlainText(QString::fromUtf8(*tmp));
}
}
/**
- * if this is mime, split text and attachents...
+ * if this is mime, split text and attachments...
* message contains only text afterwards
*/
void GpgWin::parseMime(QByteArray *message) {
@@ -648,7 +646,6 @@ void GpgWin::fileEncryption()
}
void GpgWin::openSettingsDialog()
{
- QSettings settings;
new SettingsDialog(this);
// restoreSettings();
// Iconsize
@@ -656,6 +653,6 @@ void GpgWin::openSettingsDialog()
this->setIconSize(iconSize);
// Iconstyle
- Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt());
+ Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt());
this->setToolButtonStyle(buttonStyle);
}
diff --git a/gpgwin.h b/gpgwin.h
index 9de17ed..60f6f13 100644
--- a/gpgwin.h
+++ b/gpgwin.h
@@ -145,6 +145,7 @@ private:
QLabel *repeatpwLabel;
QLabel *errorLabel;
+ QSettings settings;
QString curFile;
KeyList *mKeyList;
Attachments *mAttachments;