MCPcopy Create free account
hub / github.com/Vector35/debugger / sort

Method sort

ui/attachprocess.cpp:205–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void ProcessListModel::sort(int col, Qt::SortOrder order)
206{
207 std::sort(m_items.begin(), m_items.end(), [&](ProcessItem a, ProcessItem b) {
208 if (col == ProcessListModel::PidColumn)
209 {
210 if (order == Qt::AscendingOrder)
211 return a.pid() < b.pid();
212 else
213 return a.pid() > b.pid();
214 }
215 else if (col == ProcessListModel::ProcessNameColumn)
216 {
217 if (order == Qt::AscendingOrder)
218 return a.processName() < b.processName();
219 else
220 return a.processName() > b.processName();
221 }
222 return false;
223 });
224}
225
226
227void ProcessListFilterProxyModel::sort(int col, Qt::SortOrder order)

Callers

nothing calls this directly

Calls 2

pidMethod · 0.80
processNameMethod · 0.80

Tested by

no test coverage detected