refactor: consolidate wallet_api into libwalletqt [1/?]

This commit is contained in:
tobtoht
2023-11-17 14:05:31 +01:00
parent a13ca973cc
commit 769af188e2
46 changed files with 928 additions and 687 deletions
+3 -3
View File
@@ -70,12 +70,12 @@ QVariant AddressBookModel::data(const QModelIndex &index, int role) const
{
QVariant result;
bool found = m_addressBook->getRow(index.row(), [this, &result, &role, &index](const AddressBookInfo &row) {
bool found = m_addressBook->getRow(index.row(), [this, &result, &role, &index](const ContactRow &row) {
if (role == Qt::DisplayRole || role == Qt::EditRole || role == Qt::UserRole) {
switch (index.column()) {
case Address:
{
QString address = row.address();
QString address = row.getAddress();
if (!m_showFullAddresses && role != Qt::UserRole) {
address = Utils::displayAddress(address);
}
@@ -83,7 +83,7 @@ QVariant AddressBookModel::data(const QModelIndex &index, int role) const
break;
}
case Description:
result = row.description();
result = row.getLabel();
break;
default:
qCritical() << "Invalid column" << index.column();