AsteroidOS / asteroid-settings

Default settings app for AsteroidOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of deprecated dbus-glib function

PureTryOut opened this issue · comments

While porting this application to CMake I found out that it uses dbus_connection_setup_with_g_main (https://github.com/AsteroidOS/asteroid-settings/blob/master/volumecontrol.cpp#L98) which is deprecated according to https://dbus.freedesktop.org/doc/dbus-glib/dbus-glib-DBus-GLib-low-level.html#dbus-connection-setup-with-g-main.

It should probably be ported away from. It's also the only dependency this application has on dbus-glib from what I can see.

Actually, seems the entirety of dbus-glib is deprecated, according to the repo description on https://gitlab.freedesktop.org/dbus/dbus-glib.

I've started working on this and believe I can finish it in a few days. My plan is to use the Qt D-Bus functions instead of these low level ones. There doesn't appear to be any reason we can't and preliminary testing shows it should also be shorter and easier to understand.

I have something that works, but the code never gets a callback from the StepsUpdated D-Bus interface. Same problem as this: https://devel.sailfishos.narkive.com/iA2ByWoC/sailfish-listening-for-volume-change. Meanwhile, I'll check in draft code for your viewing pleasure. It has a workaround, but I'd like to get the callback working properly.

I've done some experiments with pulseaudio-modules-nemo which is supposed to send this signal. I changed it to send only the currentStep value and then changed it to send no parameters at all (with the corresponding changes to the asteroid-settings code) but never once is the callback invoked. I'm stumped.