[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bbluedevil=5D_src/fileitemactionplugin=3A_Use_the_ne?=
From:       Alex Fiestas <alex () eyeos ! org>
Date:       2011-02-03 4:18:04
Message-ID: 20110203041804.0BA6DA60D4 () git ! kde ! org
[Download RAW message or body]

Git commit 2510578c104fe62e0ad16f580ac6fb74123c6125 by Alex Fiestas.
Committed on 03/02/11 at 04:30.
Pushed by afiestas into branch 'master'.

Use the new bluedevil-sendfile arguments to make it work :)

M  +16   -4    src/fileitemactionplugin/sendfileitemaction.cpp     

http://commits.kde.org/bluedevil/2510578c104fe62e0ad16f580ac6fb74123c6125

diff --git a/src/fileitemactionplugin/sendfileitemaction.cpp \
b/src/fileitemactionplugin/sendfileitemaction.cpp index bbd2057..09d3a57 100644
--- a/src/fileitemactionplugin/sendfileitemaction.cpp
+++ b/src/fileitemactionplugin/sendfileitemaction.cpp
@@ -68,7 +68,7 @@ QList< QAction* > SendFileItemAction::actions(const \
                KFileItemListProperties& fil
             if (device->UUIDs().contains("00001105-0000-1000-8000-00805F9B34FB", \
                Qt::CaseInsensitive)) {
                 QAction *action = new QAction(KIcon(device->icon()), device->name(), \
                hack);
                 connect(action, SIGNAL(triggered(bool)), this, \
                SLOT(deviceTriggered()));
-                action->setData(device->address());
+                action->setData(device->UBI());
                 menu->addAction(action);
             }
         }
@@ -91,14 +91,26 @@ QList< QAction* > SendFileItemAction::actions(const \
KFileItemListProperties& fil  
 void SendFileItemAction::deviceTriggered()
 {
-    kDebug() << static_cast<QAction *>(sender())->data().toString();
-    kDebug() << m_fileItemInfos.urlList();
+    QStringList args;
+    args.append("-u " + static_cast<QAction *>(sender())->data().toString());
+
+    KUrl::List fileList =  m_fileItemInfos.urlList();
+    Q_FOREACH(const KUrl &url,  fileList) {
+        args.append("-f " + url.path());
+    }
+    kDebug() << args;
+    KProcess process;
+    process.setProgram("bluedevil-sendfile", args);
+    process.startDetached();
 }
 
 void SendFileItemAction::otherTriggered()
 {
     kDebug();
+    QStringList args;
+    args.append("-u " + static_cast<QAction *>(sender())->data().toString());
+
     KProcess process;
-    process.setProgram("bluedevil-sendfile");
+    process.setProgram("bluedevil-sendfile", args);
     process.startDetached();
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic