Use initializer for QJsonObject
This avoid detaching the QJsonObject
This commit is contained in:
parent
2c49558f32
commit
8fd954b6d8
1 changed files with 7 additions and 6 deletions
|
@ -92,12 +92,13 @@ void SystemvolumePlugin::sendSinkList() {
|
||||||
sendPacket(np);
|
sendPacket(np);
|
||||||
});
|
});
|
||||||
|
|
||||||
QJsonObject sinkObject;
|
QJsonObject sinkObject {
|
||||||
sinkObject.insert("name", sink->name());
|
{"name", sink->name()},
|
||||||
sinkObject.insert("description", sink->description());
|
{"muted", sink->isMuted()},
|
||||||
sinkObject.insert("muted", sink->isMuted());
|
{"description", sink->description()},
|
||||||
sinkObject.insert("volume", sink->volume());
|
{"volume", sink->volume()},
|
||||||
sinkObject.insert("maxVolume", PulseAudioQt::normalVolume());
|
{"maxVolume", PulseAudioQt::normalVolume()}
|
||||||
|
};
|
||||||
|
|
||||||
array.append(sinkObject);
|
array.append(sinkObject);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue