| 394 | } |
| 395 | |
| 396 | bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent) |
| 397 | { |
| 398 | Q_UNUSED(parent); |
| 399 | AddressTableEntry *rec = priv->index(row); |
| 400 | if(count != 1 || !rec || rec->type == AddressTableEntry::Receiving) |
| 401 | { |
| 402 | // Can only remove one row at a time, and cannot remove rows not in model. |
| 403 | // Also refuse to remove receiving addresses. |
| 404 | return false; |
| 405 | } |
| 406 | walletModel->wallet().delAddressBook(DecodeDestination(rec->address.toStdString())); |
| 407 | return true; |
| 408 | } |
| 409 | |
| 410 | QString AddressTableModel::labelForAddress(const QString &address) const |
| 411 | { |
no test coverage detected