MCPcopy Create free account
hub / github.com/KDAB/GammaRay / toQModelIndex

Function toQModelIndex

common/protocol.cpp:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27QModelIndex toQModelIndex(const QAbstractItemModel *model, const Protocol::ModelIndex &index)
28{
29 QModelIndex qmi;
30
31 for (auto it = index.constBegin(), end = index.constEnd(); it != end; ++it) {
32 qmi = model->index(it->row, it->column, qmi);
33 if (!qmi.isValid())
34 return {}; // model isn't loaded to the full depth, so don't restart from the top
35 }
36
37 return qmi;
38}
39
40qint32 version()
41{

Callers 3

newRequestMethod · 0.85
translateSelectionMethod · 0.85
newMessageMethod · 0.85

Calls 4

constBeginMethod · 0.45
constEndMethod · 0.45
indexMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected