[SCM] ktp-filetransfer-handler packaging branch, master, updated. debian/15.12.1-2-226-g825cd93

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:12:04 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-filetransfer-handler.git;a=commitdiff;h=1362fc7

The following commit has been merged in the master branch:
commit 1362fc76cba66d8bd36c30c8ad5820be5d6a3550
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Sun Dec 18 12:57:08 2011 +0100

    Overwrite .part file if user hits cancel on resume file dialog
---
 src/handle-incoming-file-transfer-channel-job.cpp | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/handle-incoming-file-transfer-channel-job.cpp b/src/handle-incoming-file-transfer-channel-job.cpp
index 6e20c66..c271dba 100644
--- a/src/handle-incoming-file-transfer-channel-job.cpp
+++ b/src/handle-incoming-file-transfer-channel-job.cpp
@@ -295,14 +295,6 @@ void HandleIncomingFileTransferChannelJobPrivate::__k__onResumeDialogFinished(in
 
     switch (result)
     {
-        case KIO::R_CANCEL:
-            // TODO Cancel file transfer and close channel
-            channel->cancel();
-            QTimer::singleShot(0, q, SLOT(__k__doEmitResult()));
-            return;
-        case KIO::R_RENAME:
-            partUrl = renameDialog.data()->newDestUrl();
-            break;
         case KIO::R_RESUME:
         {
             QFileInfo fileInfo(partUrl.toLocalFile());
@@ -310,10 +302,14 @@ void HandleIncomingFileTransferChannelJobPrivate::__k__onResumeDialogFinished(in
             isResuming = true;
             break;
         }
-        case KIO::R_OVERWRITE:
+        case KIO::R_RENAME:
+            // If the user hits rename, we use the new name as the .part file
+            partUrl = renameDialog.data()->newDestUrl();
+            break;
+        case KIO::R_CANCEL:
+            // If user hits cancel .part file will be overwritten
         default:
             break;
-
     }
 
     receiveFile();
@@ -326,7 +322,7 @@ void HandleIncomingFileTransferChannelJobPrivate::receiveFile()
 
     // Open the .part file in append mode
     file = new QFile(partUrl.toLocalFile(), q->parent());
-    file->open(QIODevice::Append);
+    file->open(isResuming ? QIODevice::Append : QIODevice::WriteOnly);
 
     // Create an empty file with the definitive file name
     QFile realFile(url.toLocalFile(), 0);

-- 
ktp-filetransfer-handler packaging



More information about the pkg-kde-commits mailing list