| 34 | } |
| 35 | |
| 36 | bool RouteListModel::loadRemaining(IOutputDevice device, PresetRuleTableModel* ruleModel) |
| 37 | { |
| 38 | auto routes = device.output_routes.toVector(); |
| 39 | routes.push_front(makeDefaultRoute()); |
| 40 | for(int i = routes.size() - 1; i >= 0; i--) |
| 41 | { |
| 42 | if(ruleModel->containsDeviceAndRouteId(QString::fromStdString(device.name), QString::fromStdString(routes.at(i).name))) |
| 43 | { |
| 44 | routes.erase(routes.begin() + i); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | if(routes.empty()) |
| 49 | { |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | load(routes); |
| 54 | return true; |
| 55 | } |
| 56 | |
| 57 | void RouteListModel::load(const QVector<Route> &_routes) |
| 58 | { |
no test coverage detected