mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 07:45:22 -04:00
Complete refactor of TOTP integration
* Eliminate TOTP logic from GUI elements * Consolidate TOTP functionality under the Totp namespace * Eliminate guessing about state and encoders * Increased test cases * Add entry view column for TOTP [#2132] * General code cleanup, reduction of unnecessary steps, separation of concerns * Rename SetupTotpDialog to TotpSetupDialog for consistency
This commit is contained in:
parent
b74fb3e208
commit
1dc9f10c7f
21 changed files with 585 additions and 716 deletions
|
@ -37,24 +37,23 @@ class TotpDialog : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TotpDialog(DatabaseWidget* parent = nullptr, Entry* entry = nullptr);
|
||||
~TotpDialog();
|
||||
|
||||
private:
|
||||
double uCounter;
|
||||
quint8 m_step = Totp::defaultStep;
|
||||
QScopedPointer<Ui::TotpDialog> m_ui;
|
||||
QPointer<QTimer> m_totpUpdateTimer;
|
||||
explicit TotpDialog(QWidget* parent = nullptr, Entry* entry = nullptr);
|
||||
~TotpDialog() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateTotp();
|
||||
void updateProgressBar();
|
||||
void updateSeconds();
|
||||
void copyToClipboard();
|
||||
double resetCounter();
|
||||
|
||||
protected:
|
||||
private:
|
||||
QScopedPointer<Ui::TotpDialog> m_ui;
|
||||
|
||||
void resetCounter();
|
||||
Entry* m_entry;
|
||||
int m_counter;
|
||||
uint m_step;
|
||||
QTimer m_totpUpdateTimer;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_TOTPDIALOG_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue