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

Method removeRows

App/Client/Recent/RecentModel.cpp:118–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118bool CRecentModel::removeRows(int row, int count, const QModelIndex &parent)
119{
120 if (row < 0 || row + count > m_Items.count())
121 return false;
122
123 if(!m_pDatabase) {
124 qCritical(log) << "The m_pDatabase is nullptr";
125 return false;
126 }
127
128 for (int i = row + count - 1; i >= row; i--) {
129 m_pDatabase->DeleteRecent(m_Items.at(i).id);
130 m_Items.removeAt(i);
131 }
132
133 return true;
134}
135
136void CRecentModel::refresh(int limit)
137{

Callers 1

slotLoadMethod · 0.45

Calls 1

DeleteRecentMethod · 0.80

Tested by

no test coverage detected