aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-15 14:08:35 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-15 14:08:35 +0000
commit031b02fef26110c700baf0b4a81c5e7bec7a59f0 (patch)
tree075aaa2db01e4ec77767b3449d6cb0eb55875b21 /gpgwin.cpp
parentremove unused header-import (diff)
downloadgpg4usb-031b02fef26110c700baf0b4a81c5e7bec7a59f0.tar.gz
gpg4usb-031b02fef26110c700baf0b4a81c5e7bec7a59f0.zip
more booleans in settings, updated attachment-todo
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@334 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r--gpgwin.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 3d02ec6..c251743 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -73,8 +73,7 @@ void GpgWin::restoreSettings()
this->restoreState(settings.value("window/windowState").toByteArray());
// Restore window size & location
- Qt::CheckState windowSave = static_cast<Qt::CheckState>(settings.value("window/windowSave", Qt::Unchecked).toUInt());
- if (windowSave == Qt::Checked) {
+ if (settings.value("window/windowSave").toBool()) {
QPoint pos = settings.value("window/pos", QPoint(100, 100)).toPoint();
QSize size = settings.value("window/size", QSize(800, 450)).toSize();
this->resize(size);
@@ -93,8 +92,7 @@ void GpgWin::restoreSettings()
this->setToolButtonStyle(buttonStyle);
// Checked Keys
- Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt());
- if (keySave == Qt::Checked) {
+ if (settings.value("keys/keySave").toBool()) {
QStringList keyIds = settings.value("keys/keyList").toStringList();
mKeyList->setChecked(&keyIds);
}
@@ -327,8 +325,7 @@ void GpgWin::closeEvent(QCloseEvent *event)
settings.setValue("window/size", size());
// keyid-list of private checked keys
- Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt());
- if ( keySave == Qt::Checked ) {
+ if ( settings.value("keys/keySave").toBool() ) {
QStringList *keyIds = mKeyList->getPrivateChecked();
if (!keyIds->isEmpty()){
settings.setValue("keys/keyList", *keyIds);