mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-06 13:57:26 -04:00
AddressBook: description edits, remove hack
Co-authored-by: dsc <dsc@xmr.pm>
This commit is contained in:
@@ -139,3 +139,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
Q_INVOKABLE int errorCode() const;
|
||||
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) 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