[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:29:15 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=4574aa3

The following commit has been merged in the master branch:
commit 4574aa3639c9a0b38075615c9b68e373843c59b1
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Sat Oct 17 13:32:57 2015 -0700

    Make the origin also contain the file name, not only the device name
---
 core/filetransferjob.cpp      | 13 ++++++-------
 core/filetransferjob.h        |  4 ++--
 plugins/share/shareplugin.cpp |  2 +-
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/core/filetransferjob.cpp b/core/filetransferjob.cpp
index 46c84e2..6629093 100644
--- a/core/filetransferjob.cpp
+++ b/core/filetransferjob.cpp
@@ -33,7 +33,7 @@ FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64
     : KJob()
     , mOrigin(origin)
     , mReply(Q_NULLPTR)
-    , mDeviceName("KDE Connect") //TODO: Actually fetch the device name
+    , mFrom("KDE Connect")
     , mDestination(destination)
     , mSpeedBytes(0)
     , mWritten(0)
@@ -47,6 +47,7 @@ FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64
     if (size >= 0) {
         setTotalAmount(Bytes, size);
     }
+
     setCapabilities(Killable);
     qCDebug(KDECONNECT_CORE) << "FileTransferJob Downloading payload to" << destination;
 }
@@ -59,9 +60,8 @@ void FileTransferJob::start()
 
 void FileTransferJob::doStart()
 {
-    description(this, i18n("Receiving file over KDE-Connect"),
-        QPair<QString, QString>(i18nc("File transfer origin", "From"),
-        mDeviceName)
+    description(this, i18n("Receiving file over KDE Connect"),
+        QPair<QString, QString>(i18nc("File transfer origin", "From"), mFrom)
     );
 
     if (mDestination.isLocalFile() && QFile::exists(mDestination.toLocalFile())) {
@@ -77,9 +77,8 @@ void FileTransferJob::startTransfer()
 {
     setProcessedAmount(Bytes, 0);
     mTime = QTime::currentTime();
-    description(this, i18n("Receiving file over KDE-Connect"),
-                        QPair<QString, QString>(i18nc("File transfer origin", "From"),
-                        mDeviceName),
+    description(this, i18n("Receiving file over KDE Connect"),
+                        QPair<QString, QString>(i18nc("File transfer origin", "From"), mFrom),
                         QPair<QString, QString>(i18nc("File transfer destination", "To"), mDestination.toLocalFile()));
 
     QNetworkRequest req(mDestination);
diff --git a/core/filetransferjob.h b/core/filetransferjob.h
index 859a303..2d26ba4 100644
--- a/core/filetransferjob.h
+++ b/core/filetransferjob.h
@@ -53,7 +53,7 @@ public:
     FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination);
     virtual void start() Q_DECL_OVERRIDE;
     QUrl destination() const { return mDestination; }
-    void setDeviceName(const QString &deviceName) { mDeviceName = deviceName; }
+    void setOriginName(QString from) { mFrom = from; }
 
 private Q_SLOTS:
     void doStart();
@@ -67,7 +67,7 @@ private:
 
     QSharedPointer<QIODevice> mOrigin;
     QNetworkReply* mReply;
-    QString mDeviceName;
+    QString mFrom;
     QUrl mDestination;
     QTime mTime;
     qulonglong mSpeedBytes;
diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index b4331b3..e462a8b 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -96,7 +96,7 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
         }
 
         FileTransferJob* job = np.createPayloadTransferJob(destination);
-        job->setDeviceName(device()->name());
+        job->setOriginName(device()->name() + ": " + filename);
         connect(job, SIGNAL(result(KJob*)), this, SLOT(finished(KJob*)));
         KIO::getJobTracker()->registerJob(job);
         job->start();

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list