[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:11:42 UTC 2016


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

The following commit has been merged in the master branch:
commit 1fc9a9592caab97894abdabdb0503bd20305d786
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Wed Sep 28 19:35:30 2011 +0100

    Don't use event loop for methods that don't need it
---
 src/handle-incoming-file-transfer-channel-job.cpp | 10 +++++++---
 src/handle-incoming-file-transfer-channel-job.h   |  1 -
 src/handle-outgoing-file-transfer-channel-job.cpp | 18 +++++++++++-------
 src/handle-outgoing-file-transfer-channel-job.h   |  2 --
 4 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/handle-incoming-file-transfer-channel-job.cpp b/src/handle-incoming-file-transfer-channel-job.cpp
index fa3cacb..630dfb6 100644
--- a/src/handle-incoming-file-transfer-channel-job.cpp
+++ b/src/handle-incoming-file-transfer-channel-job.cpp
@@ -49,7 +49,8 @@ class HandleIncomingFileTransferChannelJobPrivate : public KTelepathy::Telepathy
         qulonglong offset;
         QFile* file;
 
-        void __k__start();
+        void start();
+
         void __k__onSetUriOperationFinished(Tp::PendingOperation* op);
         void __k__onFileTransferChannelStateChanged(Tp::FileTransferState state, Tp::FileTransferStateChangeReason reason);
         void __k__onFileTransferChannelTransferredBytesChanged(qulonglong count);
@@ -109,7 +110,8 @@ HandleIncomingFileTransferChannelJob::~HandleIncomingFileTransferChannelJob()
 void HandleIncomingFileTransferChannelJob::start()
 {
     kDebug();
-    QTimer::singleShot(0, this, SLOT(__k__start()));
+    Q_D(HandleIncomingFileTransferChannelJob);
+    d->start();
 }
 
 bool HandleIncomingFileTransferChannelJob::doKill()
@@ -136,12 +138,14 @@ HandleIncomingFileTransferChannelJobPrivate::~HandleIncomingFileTransferChannelJ
     kDebug();
 }
 
-void HandleIncomingFileTransferChannelJobPrivate::__k__start()
+void HandleIncomingFileTransferChannelJobPrivate::start()
 {
     kDebug();
     Q_Q(HandleIncomingFileTransferChannelJob);
 
+    Q_ASSERT(!q->error());
     if (q->error()) {
+        kWarning() << "Job was started in error state. Something wrong happened." << q->errorString();
         QTimer::singleShot(0, q, SLOT(__k__doEmitResult()));
         return;
     }
diff --git a/src/handle-incoming-file-transfer-channel-job.h b/src/handle-incoming-file-transfer-channel-job.h
index ed2d7f1..1198677 100644
--- a/src/handle-incoming-file-transfer-channel-job.h
+++ b/src/handle-incoming-file-transfer-channel-job.h
@@ -37,7 +37,6 @@ class HandleIncomingFileTransferChannelJob : public KTelepathy::TelepathyBaseJob
     Q_DECLARE_PRIVATE(HandleIncomingFileTransferChannelJob)
 
 //     // Our Q_PRIVATE_SLOTS who perform the real job
-    Q_PRIVATE_SLOT(d_func(), void __k__start())
     Q_PRIVATE_SLOT(d_func(), void __k__onSetUriOperationFinished(Tp::PendingOperation* op))
     Q_PRIVATE_SLOT(d_func(), void __k__onFileTransferChannelStateChanged(Tp::FileTransferState state, Tp::FileTransferStateChangeReason reason))
     Q_PRIVATE_SLOT(d_func(), void __k__onFileTransferChannelTransferredBytesChanged(qulonglong count))
diff --git a/src/handle-outgoing-file-transfer-channel-job.cpp b/src/handle-outgoing-file-transfer-channel-job.cpp
index 9dc7878..928c15e 100644
--- a/src/handle-outgoing-file-transfer-channel-job.cpp
+++ b/src/handle-outgoing-file-transfer-channel-job.cpp
@@ -44,9 +44,10 @@ class HandleOutgoingFileTransferChannelJobPrivate : public KTelepathy::Telepathy
         Tp::OutgoingFileTransferChannelPtr channel;
         QFile* file;
 
-        void __k__start();
+        void start();
+        void provideFile();
+
         void __k__onFileTransferChannelStateChanged(Tp::FileTransferState state, Tp::FileTransferStateChangeReason reason);
-        void __k__provideFile();
         void __k__onFileTransferChannelTransferredBytesChanged(qulonglong count);
         void __k__onProvideFileFinished(Tp::PendingOperation* op);
         void __k__onCancelOperationFinished(Tp::PendingOperation* op);
@@ -102,7 +103,8 @@ HandleOutgoingFileTransferChannelJob::~HandleOutgoingFileTransferChannelJob()
 void HandleOutgoingFileTransferChannelJob::start()
 {
     kDebug();
-    QTimer::singleShot(0, this, SLOT(__k__start()));
+    Q_D(HandleOutgoingFileTransferChannelJob);
+    d->start();
 }
 
 bool HandleOutgoingFileTransferChannelJob::doKill()
@@ -129,12 +131,14 @@ HandleOutgoingFileTransferChannelJobPrivate::~HandleOutgoingFileTransferChannelJ
     kDebug();
 }
 
-void HandleOutgoingFileTransferChannelJobPrivate::__k__start()
+void HandleOutgoingFileTransferChannelJobPrivate::start()
 {
     kDebug();
     Q_Q(HandleOutgoingFileTransferChannelJob);
 
+    Q_ASSERT(!q->error());
     if (q->error()) {
+        kWarning() << "Job was started in error state. Something wrong happened." << q->errorString();
         QTimer::singleShot(0, q, SLOT(__k__doEmitResult()));
         return;
     }
@@ -144,7 +148,7 @@ void HandleOutgoingFileTransferChannelJobPrivate::__k__start()
                           qMakePair<QString, QString>(i18n("Filename"), channel->uri()));
 
     if (channel->state() == Tp::FileTransferStateAccepted) {
-        QTimer::singleShot(0, q, SLOT(__k__provideFile()));
+        provideFile();
     }
 }
 
@@ -177,7 +181,7 @@ void HandleOutgoingFileTransferChannelJobPrivate::__k__onFileTransferChannelStat
             q->kill(KJob::Quietly);
             break;
         case Tp::FileTransferStateAccepted:
-            QTimer::singleShot(0, q, SLOT(__k__provideFile()));
+            provideFile();
             break;
         case Tp::FileTransferStatePending:
         case Tp::FileTransferStateOpen:
@@ -186,7 +190,7 @@ void HandleOutgoingFileTransferChannelJobPrivate::__k__onFileTransferChannelStat
     }
 }
 
-void HandleOutgoingFileTransferChannelJobPrivate::__k__provideFile()
+void HandleOutgoingFileTransferChannelJobPrivate::provideFile()
 {
     kDebug();
     Q_Q(HandleOutgoingFileTransferChannelJob);
diff --git a/src/handle-outgoing-file-transfer-channel-job.h b/src/handle-outgoing-file-transfer-channel-job.h
index cde516c..6d0a634 100644
--- a/src/handle-outgoing-file-transfer-channel-job.h
+++ b/src/handle-outgoing-file-transfer-channel-job.h
@@ -37,9 +37,7 @@ class HandleOutgoingFileTransferChannelJob : public KTelepathy::TelepathyBaseJob
     Q_DECLARE_PRIVATE(HandleOutgoingFileTransferChannelJob)
 
 //     // Our Q_PRIVATE_SLOTS who perform the real job
-    Q_PRIVATE_SLOT(d_func(), void __k__start())
     Q_PRIVATE_SLOT(d_func(), void __k__onFileTransferChannelStateChanged(Tp::FileTransferState state, Tp::FileTransferStateChangeReason reason))
-    Q_PRIVATE_SLOT(d_func(), void __k__provideFile())
     Q_PRIVATE_SLOT(d_func(), void __k__onFileTransferChannelTransferredBytesChanged(qulonglong count))
     Q_PRIVATE_SLOT(d_func(), void __k__onProvideFileFinished(Tp::PendingOperation* op))
     Q_PRIVATE_SLOT(d_func(), void __k__onCancelOperationFinished(Tp::PendingOperation* op))

-- 
ktp-filetransfer-handler packaging



More information about the pkg-kde-commits mailing list