From kde-commits Thu Nov 06 10:01:18 2008 From: Matthias Kretz Date: Thu, 06 Nov 2008 10:01:18 +0000 To: kde-commits Subject: branches/KDE/4.1/kdelibs/solid/solid/backends/hal Message-Id: <1225965678.108961.17210.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122596568810349 SVN commit 880719 by mkretz: backport: nowadays HAL has the info.subsystem key with the value sound, which we don't care about we want to know whether it's USB or PCI or whatever, so when we see sound as subsystem we look at the grandparent M +2 -1 halaudiointerface.cpp --- branches/KDE/4.1/kdelibs/solid/solid/backends/hal/halaudiointerface.cpp #880718:880719 @@ -166,7 +166,8 @@ if (!parentUdi.isEmpty()) { QDBusInterface parentIface(QLatin1String("org.freedesktop.Hal"), m_device->parentUdi(), "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); const QDBusMessage &reply = parentIface.call("GetProperty", QLatin1String("info.subsystem")); - if (reply.type() != QDBusMessage::ReplyMessage && reply.errorName() == "org.freedesktop.Hal.NoSuchProperty") { + if ((reply.type() != QDBusMessage::ReplyMessage && reply.errorName() == "org.freedesktop.Hal.NoSuchProperty") || + (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().at(0) == "sound")) { const QDBusMessage &reply2 = parentIface.call("GetProperty", QLatin1String("info.parent")); if (reply2.type() == QDBusMessage::ReplyMessage) { parentUdi = reply2.arguments().at(0).toString();