| 133 | } |
| 134 | |
| 135 | bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex &parent) |
| 136 | { |
| 137 | Q_UNUSED(parent); |
| 138 | |
| 139 | if(count > 0 && row >= 0 && (row+count) <= list.size()) |
| 140 | { |
| 141 | for (int i = 0; i < count; ++i) |
| 142 | { |
| 143 | const RecentRequestEntry* rec = &list[row+i]; |
| 144 | if (!walletModel->saveReceiveRequest(rec->recipient.address.toStdString(), rec->id, "")) |
| 145 | return false; |
| 146 | } |
| 147 | |
| 148 | beginRemoveRows(parent, row, row + count - 1); |
| 149 | list.erase(list.begin() + row, list.begin() + row + count); |
| 150 | endRemoveRows(); |
| 151 | return true; |
| 152 | } else { |
| 153 | return false; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | Qt::ItemFlags RecentRequestsTableModel::flags(const QModelIndex &index) const |
| 158 | { |
nothing calls this directly
no test coverage detected