MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / removeRows

Method removeRows

src/qt/recentrequeststablemodel.cpp:135–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135bool 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
157Qt::ItemFlags RecentRequestsTableModel::flags(const QModelIndex &index) const
158{

Callers

nothing calls this directly

Calls 4

saveReceiveRequestMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected