mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
Expose get/set attrs for wallet cache in libwalletqt, requires #5534
This commit is contained in:
parent
c286c7e5a8
commit
ab47b4a783
2 changed files with 13 additions and 0 deletions
|
@ -634,6 +634,15 @@ void Wallet::setPaymentId(const QString &paymentId)
|
||||||
m_paymentId = paymentId;
|
m_paymentId = paymentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Wallet::getCacheAttribute(const QString &key) const {
|
||||||
|
return QString::fromStdString(m_walletImpl->getCacheAttribute(key.toStdString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Wallet::setCacheAttribute(const QString &key, const QString &val)
|
||||||
|
{
|
||||||
|
return m_walletImpl->setCacheAttribute(key.toStdString(), val.toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
bool Wallet::setUserNote(const QString &txid, const QString ¬e)
|
bool Wallet::setUserNote(const QString &txid, const QString ¬e)
|
||||||
{
|
{
|
||||||
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
|
return m_walletImpl->setUserNote(txid.toStdString(), note.toStdString());
|
||||||
|
|
|
@ -294,6 +294,10 @@ public:
|
||||||
|
|
||||||
void setPaymentId(const QString &paymentId);
|
void setPaymentId(const QString &paymentId);
|
||||||
|
|
||||||
|
//! Namespace your cacheAttribute keys to avoid collisions
|
||||||
|
Q_INVOKABLE bool setCacheAttribute(const QString &key, const QString &val);
|
||||||
|
Q_INVOKABLE QString getCacheAttribute(const QString &key) const;
|
||||||
|
|
||||||
Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e);
|
Q_INVOKABLE bool setUserNote(const QString &txid, const QString ¬e);
|
||||||
Q_INVOKABLE QString getUserNote(const QString &txid) const;
|
Q_INVOKABLE QString getUserNote(const QString &txid) const;
|
||||||
Q_INVOKABLE QString getTxKey(const QString &txid) const;
|
Q_INVOKABLE QString getTxKey(const QString &txid) const;
|
||||||
|
|
Loading…
Reference in a new issue