diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-15 20:24:52 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-15 20:24:52 +0000 |
commit | 814e9c33ecdc558af6fb9b7ff6e37d38772a5b10 (patch) | |
tree | 83da0d93e437eab70c421158afbb58a0a63e08d4 /verifydetailsdialog.cpp | |
parent | fix 'objectname not set' warning (diff) | |
download | gpg4usb-814e9c33ecdc558af6fb9b7ff6e37d38772a5b10.tar.gz gpg4usb-814e9c33ecdc558af6fb9b7ff6e37d38772a5b10.zip |
verifydetaildialog and verifynotification are refreshed, when keydb changed
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@551 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to '')
-rw-r--r-- | verifydetailsdialog.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/verifydetailsdialog.cpp b/verifydetailsdialog.cpp index aec1f73..e9150bd 100644 --- a/verifydetailsdialog.cpp +++ b/verifydetailsdialog.cpp @@ -30,22 +30,22 @@ VerifyDetailsDialog::VerifyDetailsDialog(QWidget *parent, GpgME::Context* ctx, K this->setWindowTitle(tr("Signaturedetails")); connect(mCtx, SIGNAL(keyDBChanged()), this, SLOT(refresh())); - - mVbox = new QVBoxLayout(); - this->setLayout(mVbox); + mainLayout = new QHBoxLayout(); + this->setLayout(mainLayout); refresh(); - this->exec(); } void VerifyDetailsDialog::refresh() { - // At first claer all children widgets - QList<QLabel *> allChildren = mVbox->findChildren<QLabel *>(); - foreach (QLabel *label,allChildren) { - label->close(); + if (mVbox) { + mVbox->close(); } + mVbox = new QWidget(); + mVboxLayout = new QVBoxLayout(mVbox); + mainLayout->addWidget(mVbox); + // Get signature information of current text QByteArray text = mTextpage->toPlainText().toAscii(); // TODO: toUtf8() here? mCtx->preventNoDataErr(&text); @@ -60,12 +60,12 @@ void VerifyDetailsDialog::refresh() { case 2: { - mVbox->addWidget(new QLabel(tr("Text was completly signed on %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleShortDate)))); + mVboxLayout->addWidget(new QLabel(tr("Text was completly signed on %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleShortDate)))); break; } case 1: { - mVbox->addWidget(new QLabel(tr("Text was partially signed on %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleShortDate)))); + mVboxLayout->addWidget(new QLabel(tr("Text was partially signed on %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleShortDate)))); break; } } @@ -74,11 +74,11 @@ void VerifyDetailsDialog::refresh() while (sign) { VerifyKeyDetailBox *sbox = new VerifyKeyDetailBox(this,mCtx,mKeyList,sign); sign = sign->next; - mVbox->addWidget(sbox); + mVboxLayout->addWidget(sbox); } // Button Box for close button buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); connect(buttonBox, SIGNAL(rejected()), this, SLOT(close())); - mVbox->addWidget(buttonBox); + mVboxLayout->addWidget(buttonBox); } |