SSH Agent: Entry context menu control
This commit is contained in:
committed by
Jonathan White
parent
d41a37c9bc
commit
ef668f552e
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -53,6 +53,8 @@ void SSHAgent::setEnabled(bool enabled)
|
||||
}
|
||||
|
||||
config()->set("SSHAgent", enabled);
|
||||
|
||||
emit enabledChanged(enabled);
|
||||
}
|
||||
|
||||
QString SSHAgent::authSockOverride() const
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
|
||||
signals:
|
||||
void error(const QString& message);
|
||||
void enabledChanged(bool enabled);
|
||||
|
||||
public slots:
|
||||
void databaseModeChanged();
|
||||
|
||||
Reference in New Issue
Block a user