MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / loadRemaining

Method loadRemaining

src/data/model/RouteListModel.cpp:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36bool 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
57void RouteListModel::load(const QVector<Route> &_routes)
58{

Callers 2

onDeviceChangedMethod · 0.45
onAddClickedMethod · 0.45

Calls 7

push_frontMethod · 0.80
eraseMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected