aboutsummaryrefslogtreecommitdiffstats
path: root/verifydetailsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'verifydetailsdialog.cpp')
-rw-r--r--verifydetailsdialog.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/verifydetailsdialog.cpp b/verifydetailsdialog.cpp
index 5fcedc8..55fb567 100644
--- a/verifydetailsdialog.cpp
+++ b/verifydetailsdialog.cpp
@@ -50,6 +50,10 @@ void VerifyDetailsDialog::refresh()
QVBoxLayout *mVboxLayout = new QVBoxLayout(mVbox);
mainLayout->addWidget(mVbox);
+ // Button Box for close button
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
+
// Get signature information of current text
//QByteArray text = mTextpage->toPlainText().toUtf8();
//mCtx->preventNoDataErr(&text);
@@ -60,6 +64,12 @@ void VerifyDetailsDialog::refresh()
sign = mCtx->verify(mInputData);
}
+ if(sign==0) {
+ mVboxLayout->addWidget(new QLabel(tr("No valid input found")));
+ mVboxLayout->addWidget(buttonBox);
+ return;
+ }
+
// Get timestamp of signature of current text
QDateTime timestamp;
timestamp.setTime_t(sign->timestamp);
@@ -91,8 +101,5 @@ void VerifyDetailsDialog::refresh()
mVboxLayout->addWidget(sbox);
}
- // Button Box for close button
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
mVboxLayout->addWidget(buttonBox);
}