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

Method loadRules

src/data/PresetManager.cpp:129–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void PresetManager::loadRules()
130{
131 _rules.clear();
132
133 QFile indexJson(rulesPath());
134 if(!indexJson.exists())
135 {
136 return;
137 }
138
139 indexJson.open(QFile::ReadOnly);
140 QJsonDocument d = QJsonDocument::fromJson(indexJson.readAll());
141 QJsonArray root = d.array();
142
143 for(const auto& item : root)
144 {
145 _rules.append(PresetRule(item.toObject()));
146 }
147
148 indexJson.close();
149}
150
151void PresetManager::saveRules() const
152{

Callers

nothing calls this directly

Calls 5

PresetRuleClass · 0.85
appendMethod · 0.80
clearMethod · 0.45
existsMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected