mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-22 22:40:55 -04:00
parent
3b29f20d60
commit
f0204dbb10
5 changed files with 12 additions and 16 deletions
|
@ -31,10 +31,7 @@ TotpDialog::TotpDialog(QWidget* parent, Entry* entry)
|
|||
, m_ui(new Ui::TotpDialog())
|
||||
, m_entry(entry)
|
||||
{
|
||||
if (!m_entry->hasTotp()) {
|
||||
close();
|
||||
return;
|
||||
}
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
@ -42,14 +39,11 @@ TotpDialog::TotpDialog(QWidget* parent, Entry* entry)
|
|||
resetCounter();
|
||||
updateProgressBar();
|
||||
|
||||
connect(parent, SIGNAL(databaseLocked()), SLOT(close()));
|
||||
connect(&m_totpUpdateTimer, SIGNAL(timeout()), this, SLOT(updateProgressBar()));
|
||||
connect(&m_totpUpdateTimer, SIGNAL(timeout()), this, SLOT(updateSeconds()));
|
||||
m_totpUpdateTimer.start(m_step * 10);
|
||||
updateTotp();
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
new QShortcut(QKeySequence(QKeySequence::Copy), this, SLOT(copyToClipboard()));
|
||||
|
||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Copy"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue