Add hasKey property to database and also make it accessible via the DatabaseWidget.

This commit is contained in:
Florian Geyer authored and Felix Geyer committed 2012-04-18 17:03:57 +02:00
1 parent af8e21f125
commit eb4f82a7ed
4 files changed
+17 -1

No files matched your search

+6 -1
View File
@@ -161,7 +161,7 @@ void DatabaseWidget::updateMasterKey(bool accepted)
m_db->setKey(m_changeMasterKeyWidget->newMasterKey());
}
else if (m_db->transformedMasterKey().isEmpty()) { // TODO other test?
else if (m_db->hasKey()) {
Q_EMIT closeRequest();
return;
}
@@ -184,3 +184,8 @@ void DatabaseWidget::switchToMasterKeyChange()
m_changeMasterKeyWidget->clearForms();
setCurrentIndex(3);
}
bool DatabaseWidget::dbHasKey()
{
return m_db->hasKey();
}