SSH Agent: Entry context menu control

This commit is contained in:
Toni Spets 2018-05-10 16:12:36 +03:00 committed by Jonathan White
parent d41a37c9bc
commit ef668f552e
10 changed files with 128 additions and 0 deletions

View file

@ -299,6 +299,17 @@ QByteArray KeeAgentSettings::toXml() const
return ba;
}
/**
* Check if an entry has KeeAgent settings configured
*
* @param entry Entry to check the attachment
* @return true if XML document exists
*/
bool KeeAgentSettings::inEntry(const Entry* entry)
{
return entry->attachments()->hasKey("KeeAgent.settings");
}
/**
* Read settings from an entry as an XML attachment.
*

View file

@ -34,6 +34,7 @@ public:
bool fromXml(const QByteArray& ba);
QByteArray toXml() const;
static bool inEntry(const Entry* entry);
bool fromEntry(const Entry* entry);
void toEntry(Entry* entry) const;
bool keyConfigured() const;

View file

@ -53,6 +53,8 @@ void SSHAgent::setEnabled(bool enabled)
}
config()->set("SSHAgent", enabled);
emit enabledChanged(enabled);
}
QString SSHAgent::authSockOverride() const

View file

@ -56,6 +56,7 @@ public:
signals:
void error(const QString& message);
void enabledChanged(bool enabled);
public slots:
void databaseModeChanged();