| 143 | } |
| 144 | |
| 145 | bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex &parent) |
| 146 | { |
| 147 | Q_UNUSED(parent); |
| 148 | |
| 149 | if(count > 0 && row >= 0 && (row+count) <= list.size()) |
| 150 | { |
| 151 | for (int i = 0; i < count; ++i) |
| 152 | { |
| 153 | const RecentRequestEntry* rec = &list[row+i]; |
| 154 | if (!walletModel->wallet().setAddressReceiveRequest(DecodeDestination(rec->recipient.address.toStdString()), ToString(rec->id), "")) |
| 155 | return false; |
| 156 | } |
| 157 | |
| 158 | beginRemoveRows(parent, row, row + count - 1); |
| 159 | list.erase(list.begin() + row, list.begin() + row + count); |
| 160 | endRemoveRows(); |
| 161 | return true; |
| 162 | } else { |
| 163 | return false; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | Qt::ItemFlags RecentRequestsTableModel::flags(const QModelIndex &index) const |
| 168 | { |
nothing calls this directly
no test coverage detected