forked from Public/monero-gui
Merge pull request #3096
AddressBook: description edits, remove hack (selsta)
This commit is contained in:
@@ -132,3 +132,19 @@ QString AddressBook::getDescription(const QString &address) const
|
||||
}
|
||||
return QString::fromStdString(m_rows.value(*it)->getDescription());
|
||||
}
|
||||
|
||||
void AddressBook::setDescription(int index, const QString &description)
|
||||
{
|
||||
bool result;
|
||||
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
|
||||
result = m_addressBookImpl->setDescription(index, description.toStdString());
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
getAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
Q_INVOKABLE QString errorString() const;
|
||||
Q_INVOKABLE int errorCode() const;
|
||||
Q_INVOKABLE QString getDescription(const QString &address) const;
|
||||
Q_INVOKABLE void setDescription(int index, const QString &label);
|
||||
|
||||
enum ErrorCode {
|
||||
Status_Ok,
|
||||
|
||||
Reference in New Issue
Block a user