[Kde-hardware-devel] Re: Not receiving Solid::DeviceNotifier deviceRemoved() SIGNAL
Christian Esken
esken at kde.org
Sat Jun 18 17:48:27 CEST 2011
Am Donnerstag, 16. Juni 2011, 21:06:55 schrieb Christian Esken:
> Hello,
>
> I am using Solid in KMix for Hotplug events. I receive the deviceAdded()
> signal, but not the deviceRemoved() signal.
I should probably add that my code below is not new. I was receiving
deviceRemoved() signals since a lot of KDE releases. Could this be an effect
of moving away from HAL? I am running a recent distribution, which runs
without HAL.
If somebody can give me a hint where to start I can try to investigate.
I am quite in a hurry, because I would like to see it fixed in KDE4.7.
Greetings,
Christian
>
> This has really nasty impacts on KMix when repeatedly unplugging and
> hotplugging. For example soundcard devices show up multiple times in KMix,
and
> it messes up internal reference counts and ultimately KMix crashes sooner or
> later.
>
> The code looks like this:
>
>
> void KMixDeviceManager::initHotplug()
> {
> connect (Solid::DeviceNotifier::instance(), SIGNAL(deviceAdded(const
> QString&)), SLOT(pluggedSlot(const QString&)) );
> connect (Solid::DeviceNotifier::instance(), SIGNAL(deviceRemoved(const
> QString&)), SLOT(unpluggedSlot(const QString&)) );
> }
>
> Full code in
>
http://websvn.kde.org/trunk/KDE/kdemultimedia/kmix/core/kmixdevicemanager.cpp?revision=1180839&view=markup
>
> Any help is greatly appreciated.
>
> Greetings,
> Christian
>
More information about the Kde-hardware-devel
mailing list