Search This Blog

Monday, May 31, 2010

Solid ModemManager backend

Hi there, after two days of hard working now we have a real ModemManager backend for solid. The first patches I created implement MM support too tied to GsmNetworkInterface class, which means you had to instantiate a NetworkManager class to use ModemManager, that is not necessary anymore. The bad news is that the translate team has a couple of .desktop files to translate besides the source code.

This night was long, I spent several hours trying to fix a difficult to trace bug. I inspected the program and it should work but somehow the kded module crashed when instantiating a ModemGsmNetworkInterface class, in fact it instantiated the class but when it tried to use one of its methods the program crashed. The problem was that ModemGsmNetworkInterface inherited from ModemInterface and declared a d_ptr pointer, which it should not, only ModemInterface class should declare d_ptr. That problem fixed I found an infinite loop in the program hehe, that was easy to fix. After that I had to fight with the signal and slots strings to make them match. If you see a lot of "No such slot" (or signal) messages in ~/.xsession-errors you know what I am talking about. This time I saw other messages too, like "incompatible signal and slot types" (because of full nested namespace names in some places but not in other) and "impossible to connect" (because the slot's object was null). After some try and error rounds I fixed that too and finally my Plasma NM is working again. Only one bug remains: when removing the modem from USB port the kded module crashes because the ModemGsmNetworkinterface object becomes invalid and the program does not detect that. I will fix that next weekend, now I need rest and I also have other work to do during the week. Keeping this pace I think I can finish the patch by the end of the month.


P J said...

Now that is fine but what is going on with udev and solid?

P J said...

Sorry, i mean if there is going anything towards udisk and upower integration in kde?

Lamarque said...

Well, I understand udisk as a USB flash drive, they work in solid already. Searching the Internet I found DeviceKit-disks is now renamed to udisks (plural), I suppose that is what you meant. I have never used DeviceKit, I have read about upower months ago but never about udisks. I am new to kde-hardware-devel and I do not know how support for them is going on or if it even exists.

Personally I think the "hardware abstration" in Linux is passing to fuzzy times where people are trying to switch from hald to something else. The problem is what that "something else" is. People tried DeviceKit, now they are changing things again and incorporting features into udev, which makes things Linux-dependent. I, for one, use only Linux, so this change will not cause me problems, but KDE run in several other OS, that could be a problem for KDE in the future forcing us to support several backends not widely used.

Zayed said...

Thank you !