| 148 | } |
| 149 | |
| 150 | bool GammaRay::NetworkSelectionModel::translateSelection(const Protocol::ItemSelection &selection, |
| 151 | QItemSelection &qselection) const |
| 152 | { |
| 153 | qselection.clear(); |
| 154 | for (const auto &range : selection) { |
| 155 | const QModelIndex qmiTopLeft = Protocol::toQModelIndex(model(), range.topLeft); |
| 156 | const QModelIndex qmiBottomRight = Protocol::toQModelIndex(model(), range.bottomRight); |
| 157 | if (!qmiTopLeft.isValid() && !qmiBottomRight.isValid()) |
| 158 | return false; |
| 159 | qselection.push_back(QItemSelectionRange(qmiTopLeft, qmiBottomRight)); |
| 160 | } |
| 161 | return true; |
| 162 | } |
| 163 | |
| 164 | void NetworkSelectionModel::newMessage(const Message &msg) |
| 165 | { |
nothing calls this directly
no test coverage detected