From 029200840afdffdc91f3cabd1d2ed8f882a154e5 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sun, 23 May 2021 19:40:34 +0200 Subject: [PATCH] AddressBook: remove lookupPaymentID --- src/libwalletqt/AddressBook.cpp | 7 ------- src/libwalletqt/AddressBook.h | 1 - src/model/AddressBookModel.cpp | 11 +++-------- src/model/AddressBookModel.h | 1 - 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/libwalletqt/AddressBook.cpp b/src/libwalletqt/AddressBook.cpp index 381d763..3f4fd85 100644 --- a/src/libwalletqt/AddressBook.cpp +++ b/src/libwalletqt/AddressBook.cpp @@ -116,13 +116,6 @@ quint64 AddressBook::count() const return m_rows.size(); } -int AddressBook::lookupPaymentID(const QString &payment_id) const -{ - QReadLocker locker(&m_lock); - - return m_addressBookImpl->lookupPaymentID(payment_id.toStdString()); -} - QString AddressBook::getDescription(const QString &address) const { QReadLocker locker(&m_lock); diff --git a/src/libwalletqt/AddressBook.h b/src/libwalletqt/AddressBook.h index 56d7827..6b88704 100644 --- a/src/libwalletqt/AddressBook.h +++ b/src/libwalletqt/AddressBook.h @@ -28,7 +28,6 @@ public: quint64 count() const; Q_INVOKABLE QString errorString() const; Q_INVOKABLE int errorCode() const; - Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const; Q_INVOKABLE QString getDescription(const QString &address) const; enum ErrorCode { diff --git a/src/model/AddressBookModel.cpp b/src/model/AddressBookModel.cpp index 92004b1..9f96a8f 100644 --- a/src/model/AddressBookModel.cpp +++ b/src/model/AddressBookModel.cpp @@ -8,9 +8,9 @@ #include "utils/Icons.h" AddressBookModel::AddressBookModel(QObject *parent, AddressBook *addressBook) - : QAbstractTableModel(parent), - m_addressBook(addressBook), - m_showFullAddresses(false) + : QAbstractTableModel(parent) + , m_addressBook(addressBook) + , m_showFullAddresses(false) { connect(m_addressBook, &AddressBook::refreshStarted, this, &AddressBookModel::startReset); connect(m_addressBook, &AddressBook::refreshFinished, this, &AddressBookModel::endReset); @@ -150,11 +150,6 @@ bool AddressBookModel::deleteRow(int row) return m_addressBook->deleteRow(row); } -int AddressBookModel::lookupPaymentID(const QString &payment_id) const -{ - return m_addressBook->lookupPaymentID(payment_id); -} - bool AddressBookModel::writeCSV(const QString &path) { QString csv = ""; for(int i = 0; i < this->rowCount(); i++) { diff --git a/src/model/AddressBookModel.h b/src/model/AddressBookModel.h index 9385428..7157c6d 100644 --- a/src/model/AddressBookModel.h +++ b/src/model/AddressBookModel.h @@ -31,7 +31,6 @@ public: bool setData(const QModelIndex &index, const QVariant &value, int role) override; Q_INVOKABLE bool deleteRow(int row); - Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const; bool isShowFullAddresses() const; void setShowFullAddresses(bool show);