| 214 | } |
| 215 | |
| 216 | QModelIndex GammaRay::BindingModel::index(int row, int column, const QModelIndex &parent) const |
| 217 | { |
| 218 | if (!m_bindings || !hasIndex(row, column, parent)) { |
| 219 | return {}; |
| 220 | } |
| 221 | QModelIndex index; |
| 222 | if (parent.isValid()) { |
| 223 | index = createIndex(row, column, static_cast<BindingNode *>(parent.internalPointer())->dependencies()[row].get()); |
| 224 | } else { |
| 225 | index = createIndex(row, column, (*m_bindings)[row].get()); |
| 226 | } |
| 227 | return index; |
| 228 | } |
| 229 | |
| 230 | QModelIndex BindingModel::findEquivalent(const std::vector<std::unique_ptr<BindingNode>> &container, BindingNode *bindingNode) const |
| 231 | { |