mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-13 05:50:59 -04:00
Reduce use of static vars in browser plugin
* Convert BrowserSettings into instanced class * Moved HostInstaller init into class constructor
This commit is contained in:
parent
57e60681f2
commit
53a17c2355
11 changed files with 209 additions and 203 deletions
|
@ -66,7 +66,7 @@ class BrowserPlugin : public ISettingsPage
|
|||
public:
|
||||
BrowserPlugin(DatabaseTabWidget* tabWidget)
|
||||
{
|
||||
m_nativeMessagingHost = QSharedPointer<NativeMessagingHost>(new NativeMessagingHost(tabWidget, BrowserSettings::isEnabled()));
|
||||
m_nativeMessagingHost = QSharedPointer<NativeMessagingHost>(new NativeMessagingHost(tabWidget, browserSettings()->isEnabled()));
|
||||
}
|
||||
|
||||
~BrowserPlugin()
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
void saveSettings(QWidget* widget) override
|
||||
{
|
||||
qobject_cast<BrowserOptionDialog*>(widget)->saveSettings();
|
||||
if (BrowserSettings::isEnabled()) {
|
||||
if (browserSettings()->isEnabled()) {
|
||||
m_nativeMessagingHost->run();
|
||||
} else {
|
||||
m_nativeMessagingHost->stop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue