X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fqt%2Faddresstablemodel.cpp;h=a5dc784e09fd3902fd65b3f066563d36f0fde511;hp=03b09cdceb66f0d03c59ec69085dfed548588649;hb=db1eaec482383385156b3e7cb6b2baa9454975f0;hpb=ee3c631e7a917e702d04d8ff77579aeaf1d29a61 diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 03b09cd..a5dc784 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -59,11 +59,11 @@ public: cachedAddressTable.clear(); { LOCK(wallet->cs_wallet); - BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& item, wallet->mapAddressBook) + BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, std::string)& item, wallet->mapAddressBook) { const CBitcoinAddress& address = item.first; const std::string& strName = item.second; - bool fMine = IsMine(*wallet, address.Get()); + bool fMine = IsMine(*wallet, address); cachedAddressTable.append(AddressTableEntry(fMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending, QString::fromStdString(strName), QString::fromStdString(address.ToString()))); @@ -229,7 +229,7 @@ bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, editStatus = NO_CHANGES; return false; } - wallet->SetAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get(), value.toString().toStdString()); + wallet->SetAddressBookName(CBitcoinAddress(rec->address.toStdString()), value.toString().toStdString()); break; case Address: // Do nothing, if old address == new address @@ -246,7 +246,7 @@ bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, } // Check for duplicate addresses to prevent accidental deletion of addresses, if you try // to paste an existing address over another address (with a different label) - else if(wallet->mapAddressBook.count(CBitcoinAddress(value.toString().toStdString()).Get())) + else if(wallet->mapAddressBook.count(CBitcoinAddress(value.toString().toStdString()))) { editStatus = DUPLICATE_ADDRESS; return false; @@ -257,9 +257,9 @@ bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, { LOCK(wallet->cs_wallet); // Remove old entry - wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get()); + wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString())); // Add new entry with new address - wallet->SetAddressBookName(CBitcoinAddress(value.toString().toStdString()).Get(), rec->label.toStdString()); + wallet->SetAddressBookName(CBitcoinAddress(value.toString().toStdString()), rec->label.toStdString()); } } break; @@ -335,7 +335,7 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con // Check for duplicate addresses { LOCK(wallet->cs_wallet); - if(wallet->mapAddressBook.count(CBitcoinAddress(strAddress).Get())) + if(wallet->mapAddressBook.count(CBitcoinAddress(strAddress))) { editStatus = DUPLICATE_ADDRESS; return QString(); @@ -368,7 +368,7 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con // Add entry { LOCK(wallet->cs_wallet); - wallet->SetAddressBookName(CBitcoinAddress(strAddress).Get(), strLabel); + wallet->SetAddressBookName(CBitcoinAddress(strAddress), strLabel); } return QString::fromStdString(strAddress); } @@ -385,7 +385,7 @@ bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent } { LOCK(wallet->cs_wallet); - wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get()); + wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString())); } return true; } @@ -397,7 +397,7 @@ QString AddressTableModel::labelForAddress(const QString &address) const { LOCK(wallet->cs_wallet); CBitcoinAddress address_parsed(address.toStdString()); - std::map::iterator mi = wallet->mapAddressBook.find(address_parsed.Get()); + std::map::iterator mi = wallet->mapAddressBook.find(address_parsed); if (mi != wallet->mapAddressBook.end()) { return QString::fromStdString(mi->second);