Don't abort when org.freedesktop.pulseaudio.module-group schema isn't installed
ClosedPublic

Authored by broulik on Apr 30 2019, 9:33 AM.

Details

Summary

Calling g_settings_new_with_path with a schema that isn't installed raises a g_error and aborts making the KCM crash on older PulseAudio versions.
This basically copies what g_settings_new_with_path does internally but just prints a warning on console and carries on.

Test Plan

Started the KCM on PulseAudio 11.1 (neon bionic), got an error on console, no longer crashed, had the module checkboxes disabled in settings

Makes me wonder why neon uses gsettings, though, when its PA version is too old to be affected by the gconf→gsettings change

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Apr 30 2019, 9:33 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 30 2019, 9:33 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Apr 30 2019, 9:33 AM
broulik edited the test plan for this revision. (Show Details)
drosca accepted this revision.Apr 30 2019, 10:46 AM
This revision is now accepted and ready to land.Apr 30 2019, 10:46 AM
nicolasfella accepted this revision.Apr 30 2019, 2:06 PM

Makes me wonder why neon uses gsettings, though, when its PA version is too old to be affected by the gconf→gsettings change

plasma-pa is built with GSettings by default. To use GConf one needs to build with -DUSE_GCONF

This revision was automatically updated to reflect the committed changes.