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

Method onAppConfigUpdated

src/interface/item/AppItem.cpp:52–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void AppItem::onAppConfigUpdated(const AppConfig::Key& key, const QVariant& value)
53{
54 switch (key) {
55 case AppConfig::AudioAppBlocklistInvert: {
56 ui->blocklist->setText(value.toBool() ? tr("Add to allowlist") : tr("Add to blocklist"));
57 auto node = model->findByNodeId(id);
58 if(!node.has_value())
59 {
60 Log::warning("AppItemModel::findByNodeId retuned nullopt");
61 return;
62 }
63
64 refresh(node.value());
65 break;
66 }
67 default:
68 break;
69 }
70}
71
72void AppItem::refresh(const AppNode& node)
73{

Callers

nothing calls this directly

Calls 3

findByNodeIdMethod · 0.80
setTextMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected