MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / DeleteRecent

Method DeleteRecent

App/Client/Recent/RecentDatabase.cpp:273–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273bool CRecentDatabase::DeleteRecent(int id)
274{
275 if(0 >= id) return false;
276 QSqlQuery query(GetDatabase());
277 query.prepare("DELETE FROM recent WHERE id=:id");
278 query.bindValue(":id", id);
279 bool success = query.exec();
280 if (!success) {
281 SetError("Failed to delete recent: " + query.lastError().text()
282 + "; Sql: " + query.executedQuery()
283 + "; id: " + QString::number(id));
284 qCritical(log) << GetError();
285 }
286 return success;
287}
288
289QList<CRecentDatabase::RecentItem> CRecentDatabase::GetRecents(int limit, int offset)
290{

Callers 1

removeRowsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected