diff options
author | Toni Spets <toni.spets@iki.fi> | 2020-01-28 21:46:23 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2020-02-23 17:19:34 +0300 |
commit | 40ad211f3e70b715f3960097563730926a07fe57 (patch) | |
tree | 4896fb902bd4459c00223d452e24eec1417619c8 /src/gui/DatabaseWidget.cpp | |
parent | cb6b0dde276577d2a66a80c1ee25884c7f44e676 (diff) |
Allow toggling SSH Agent integration without restart
- use Q_GLOBAL_STATIC for singleton
- move all configuration to SSHAgent class
- various cleanups to agent code
Fixes #1196
Diffstat (limited to 'src/gui/DatabaseWidget.cpp')
-rw-r--r-- | src/gui/DatabaseWidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index fd579b04a..d7521f3b2 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -217,9 +217,9 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent) m_searchLimitGroup = config()->get("SearchLimitGroup", false).toBool(); #ifdef WITH_XC_SSHAGENT - if (config()->get("SSHAgent", false).toBool()) { - connect(this, SIGNAL(databaseLocked()), SSHAgent::instance(), SLOT(databaseModeChanged())); - connect(this, SIGNAL(databaseUnlocked()), SSHAgent::instance(), SLOT(databaseModeChanged())); + if (sshAgent()->isEnabled()) { + connect(this, SIGNAL(databaseLocked()), sshAgent(), SLOT(databaseModeChanged())); + connect(this, SIGNAL(databaseUnlocked()), sshAgent(), SLOT(databaseModeChanged())); } #endif |