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