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

Method removeRows

Plugins/WebBrowser/History/HistoryModel.cpp:127–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127bool CHistoryModel::removeRows(int row, int count, const QModelIndex &parent)
128{
129 if (row < 0 || row + count > m_historyItems.count())
130 return false;
131
132 if(!m_pDatabase) {
133 qCritical(log) << "The m_pDatabase is nullptr";
134 return false;
135 }
136
137 beginRemoveRows(parent, row, row + count - 1);
138
139 for (int i = row + count - 1; i >= row; --i) {
140 m_pDatabase->deleteHistoryEntry(m_historyItems.at(i).id);
141 m_historyItems.removeAt(i);
142 }
143
144 endRemoveRows();
145 return true;
146}
147
148HistoryItem CHistoryModel::getItem(const QModelIndex &index) const
149{

Callers 4

RefreshPluginListMethod · 0.45
RefreshExtensionListMethod · 0.45
ClearExtensionListMethod · 0.45

Calls 1

deleteHistoryEntryMethod · 0.80

Tested by

no test coverage detected