File hotplug-kde3.diff of Package kdebase4-runtime

Subject: Hotplug support for KDE3 applications
From: Lubos Lunak
Feature: bnc#378338
Patch-upstream: never
Relates: kdelibs4/hotplug-kde3.diff, kdebase4-workspace/hotplug-kde3.diff

Index: soliduiserver/deviceserviceaction.cpp
===================================================================
--- soliduiserver/deviceserviceaction.cpp.orig
+++ soliduiserver/deviceserviceaction.cpp
@@ -115,6 +115,15 @@ int MacroExpander::expandEscapedMacro(co
                        << " is not a StorageAccess device" << endl;
         }
         break;
+    case 'u': // URL
+    case 'U': // case insensitive
+        if (m_device.is<Solid::StorageAccess>()) {
+            ret << KUrl::fromPath( m_device.as<Solid::StorageAccess>()->filePath()).url();
+        } else {
+            kWarning() << "DeviceServiceAction::execute: " << m_device.udi()
+                       << " is not a StorageAccess device" << endl;
+        }
+        break;
     case 'd': // Device node
     case 'D': // case insensitive
         if (m_device.is<Solid::Block>()) {
Index: soliduiserver/soliduiserver.cpp
===================================================================
--- soliduiserver/soliduiserver.cpp.orig
+++ soliduiserver/soliduiserver.cpp
@@ -79,6 +79,8 @@ void SolidUiServer::showActionsDialog(co
 
     foreach (const QString &desktop, desktopFiles) {
         QString filePath = KStandardDirs::locate("data", "solid/actions/"+desktop);
+        if (desktop.startsWith('/'))
+            filePath = desktop;
 
         QList<KServiceAction> services
             = KDesktopFileActions::userDefinedServices(filePath, true);