| 25 | } |
| 26 | |
| 27 | QModelIndex 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 | |
| 40 | qint32 version() |
| 41 | { |
no test coverage detected