Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor browser settings and TOTP #2284
This is a pretty hefty refactor, but well needed (especially TOTP). This aligns BrowserSettings to be similar in design and function to Config and other settings classes. It is now dynamically initialized and accessed using an inline function. Some other static methods/vars were made dynamic due to them being private to their class and only initialized once.
TOTP was completely overhauled, every single function was changed and cleaned up. It was also placed into a namespace instead of a class since all its members are static (desired convention). The previous implementation was extremely brittle and required state to be stored across several different classes. Users of the previous TOTP class were required to know how it worked and when to supply proper variables (BAD!!). The new implementation is completely plug-and-play, no manual required!
Motivation and context
Clean code == happy maintainers
How has this been tested?
Manually and with written tests
Screenshots (if appropriate):
No GUI layouts were harmed in this refactor. The SetupTotpDialog.ui only changes to using SettingsGroups to control radio buttons.
Types of changes