[SCM] ktp-send-file packaging branch, master, updated. debian/15.12.1-2-216-g8f07cdf

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:14:56 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-send-file.git;a=commitdiff;h=ac7bf1c

The following commit has been merged in the master branch:
commit ac7bf1c29988b9fd97c1587db28783335af08da8
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Fri Nov 16 00:19:58 2012 +0100

    Port to use KTp::Actions
---
 mainwindow.cpp | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/mainwindow.cpp b/mainwindow.cpp
index e89742c..75b24ee 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -37,12 +37,11 @@
 #include <TelepathyQt/PendingChannelRequest>
 #include <TelepathyQt/PendingReady>
 
+#include <KTp/actions.h>
 #include <KTp/Models/contacts-model.h>
 #include <KTp/Models/accounts-filter-model.h>
 #include <KTp/Widgets/contact-grid-widget.h>
 
-//FIXME, copy and paste the approver code for loading this from a config file into this, the contact list and the chat handler.
-#define PREFERRED_FILETRANSFER_HANDLER "org.freedesktop.Telepathy.Client.KTp.FileTransfer"
 
 
 MainWindow::MainWindow(const KUrl &url, QWidget *parent) :
@@ -138,24 +137,10 @@ void MainWindow::onDialogAccepted()
         return;
     }
 
-    Tp::ContactPtr contact = m_contactGridWidget->selectedContact();
-    Tp::AccountPtr sendingAccount = m_contactGridWidget->selectedAccount();
-
-    if (sendingAccount.isNull()) {
-        kDebug() << "sending account: NULL";
-    } else {
-        kDebug() << "Account is: " << sendingAccount->displayName();
-        kDebug() << "sending to: " << contact->alias();
-    }
-
     // start sending file
-    kDebug() << "FILE TO SEND: " << m_url.path();
-    Tp::FileTransferChannelCreationProperties fileTransferProperties(m_url.path(), KMimeType::findByFileContent(m_url.path())->name());
-
-    Tp::PendingChannelRequest* channelRequest = sendingAccount->createFileTransfer(contact,
-                                                                                   fileTransferProperties,
-                                                                                   QDateTime::currentDateTime(),
-                                                                                   PREFERRED_FILETRANSFER_HANDLER);
+    Tp::PendingChannelRequest* channelRequest = KTp::Actions::startFileTransfer(m_contactGridWidget->selectedAccount(),
+                                                                                m_contactGridWidget->selectedContact(),
+                                                                                m_url.path());
 
     connect(channelRequest, SIGNAL(finished(Tp::PendingOperation*)), SLOT(slotFileTransferFinished(Tp::PendingOperation*)));
 

-- 
ktp-send-file packaging



More information about the pkg-kde-commits mailing list