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