MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / rescan

Method rescan

src/data/model/PresetListModel.cpp:39–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void PresetListModel::rescan()
40{
41 beginResetModel();
42 presets.clear();
43
44 QDir dir(AppConfig::instance().getPath("presets"));
45 if (!dir.exists())
46 {
47 dir.mkpath(".");
48 }
49
50 QStringList nameFilter("*.conf");
51 QStringList files = dir.entryList(nameFilter);
52
53 for (int i = 0; i < files.count(); i++)
54 {
55 presets.append(QFileInfo(files[i]).completeBaseName());
56 }
57
58 endResetModel();
59}
60
61QStringList PresetListModel::getList() const
62{

Callers 9

listPresetsMethod · 0.80
getPresetsMethod · 0.80
PresetRuleDialogMethod · 0.80
showEventMethod · 0.80
onAddClickedMethod · 0.80
loadFromPathMethod · 0.80
renameMethod · 0.80
removeMethod · 0.80
saveToPathMethod · 0.80

Calls 5

countMethod · 0.80
appendMethod · 0.80
clearMethod · 0.45
getPathMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected