Handle cipher errors in TransformKeyBenchmarkThread.

This commit is contained in:
Felix Geyer 2015-05-09 23:38:04 +02:00
parent e0d4b4b625
commit 4362c3ea38
2 changed files with 8 additions and 2 deletions

View file

@ -130,7 +130,10 @@ void DatabaseSettingsWidget::reject()
void DatabaseSettingsWidget::transformRoundsBenchmark()
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
m_ui->transformRoundsSpinBox->setValue(CompositeKey::transformKeyBenchmark(1000));
int rounds = CompositeKey::transformKeyBenchmark(1000);
if (rounds != -1) {
m_ui->transformRoundsSpinBox->setValue(rounds);
}
QApplication::restoreOverrideCursor();
}