Show YubiKey message from MainWindow to ensure it's always shown when a challenge is generated

This commit is contained in:
Janek Bevendorff 2017-02-24 17:27:27 +01:00
parent d6c48a5cf1
commit b10cb1c83c
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
7 changed files with 17 additions and 32 deletions

View file

@ -177,8 +177,6 @@ void ChangeMasterKeyWidget::generateKey()
bool blocking = i & true;
int slot = i >> 1;
auto key = QSharedPointer<YkChallengeResponseKey>(new YkChallengeResponseKey(slot, blocking));
connect(key.data(), SIGNAL(userInteractionRequired()), SLOT(showYubiKeyPopup()));
connect(key.data(), SIGNAL(userConfirmed()), SLOT(hideYubiKeyPopup()));
m_key.addChallengeResponseKey(key);
}
#endif
@ -241,15 +239,3 @@ void ChangeMasterKeyWidget::setCancelEnabled(bool enabled)
{
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->setEnabled(enabled);
}
void ChangeMasterKeyWidget::showYubiKeyPopup()
{
KEEPASSXC_MAIN_WINDOW->displayGlobalMessage(tr("Please touch the button on your YubiKey!"), MessageWidget::Information);
KEEPASSXC_MAIN_WINDOW->setEnabled(false);
}
void ChangeMasterKeyWidget::hideYubiKeyPopup()
{
KEEPASSXC_MAIN_WINDOW->hideGlobalMessage();
KEEPASSXC_MAIN_WINDOW->setEnabled(true);
}