[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:41 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-filetransfer-handler.git;a=commitdiff;h=b819f6f
The following commit has been merged in the master branch:
commit b819f6f20b10565ef013b3f6f8f622c5839e22b4
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Wed Sep 28 19:35:22 2011 +0100
Connect signals earlier
This is necessary for example to avoid missing the invalidated signal
while the user is prompted with the overwrite dialog and the sender
cancels the file transfer.
---
src/handle-incoming-file-transfer-channel-job.cpp | 23 ++++++++++++-----------
src/handle-outgoing-file-transfer-channel-job.cpp | 22 +++++++++++-----------
2 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/src/handle-incoming-file-transfer-channel-job.cpp b/src/handle-incoming-file-transfer-channel-job.cpp
index 5bfc4a7..5fb82f7 100644
--- a/src/handle-incoming-file-transfer-channel-job.cpp
+++ b/src/handle-incoming-file-transfer-channel-job.cpp
@@ -68,6 +68,9 @@ HandleIncomingFileTransferChannelJob::HandleIncomingFileTransferChannelJob(Tp::I
kDebug();
Q_D(HandleIncomingFileTransferChannelJob);
+ d->channel = channel;
+ d->downloadDirectory = downloadDirectory;
+
if (channel.isNull())
{
kError() << "Channel cannot be NULL";
@@ -89,8 +92,15 @@ HandleIncomingFileTransferChannelJob::HandleIncomingFileTransferChannelJob(Tp::I
setCapabilities(KJob::Killable);
setTotalAmount(KJob::Bytes, channel->size());
- d->channel = channel;
- d->downloadDirectory = downloadDirectory;
+ connect(channel.data(),
+ SIGNAL(invalidated(Tp::DBusProxy *, const QString &, const QString &)),
+ SLOT(__k__onInvalidated()));
+ connect(channel.data(),
+ SIGNAL(stateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)),
+ SLOT(__k__onFileTransferChannelStateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)));
+ connect(channel.data(),
+ SIGNAL(transferredBytesChanged(qulonglong)),
+ SLOT(__k__onFileTransferChannelTransferredBytesChanged(qulonglong)));
}
HandleIncomingFileTransferChannelJob::~HandleIncomingFileTransferChannelJob()
@@ -138,15 +148,6 @@ void HandleIncomingFileTransferChannelJobPrivate::__k__start()
return;
}
- q->connect(channel.data(), SIGNAL(invalidated(Tp::DBusProxy *, const QString &, const QString &)),
- q, SLOT(__k__onInvalidated()));
- q->connect(channel.data(),
- SIGNAL(stateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)),
- SLOT(__k__onFileTransferChannelStateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)));
- q->connect(channel.data(),
- SIGNAL(transferredBytesChanged(qulonglong)),
- SLOT(__k__onFileTransferChannelTransferredBytesChanged(qulonglong)));
-
KUrl url(downloadDirectory);
url.addPath(channel->fileName());
url.setScheme(QLatin1String("file"));
diff --git a/src/handle-outgoing-file-transfer-channel-job.cpp b/src/handle-outgoing-file-transfer-channel-job.cpp
index bcc343b..4ca5ead 100644
--- a/src/handle-outgoing-file-transfer-channel-job.cpp
+++ b/src/handle-outgoing-file-transfer-channel-job.cpp
@@ -60,6 +60,8 @@ HandleOutgoingFileTransferChannelJob::HandleOutgoingFileTransferChannelJob(Tp::O
kDebug();
Q_D(HandleOutgoingFileTransferChannelJob);
+ d->channel = channel;
+
if (channel.isNull())
{
kError() << "Channel cannot be NULL";
@@ -77,15 +79,19 @@ HandleOutgoingFileTransferChannelJob::HandleOutgoingFileTransferChannelJob(Tp::O
return;
}
- connect(channel.data(),
- SIGNAL(invalidated(Tp::DBusProxy *, const QString &, const QString &)),
- SLOT(__k__onInvalidated()));
-
KIO::getJobTracker()->registerJob(this);
setCapabilities(KJob::Killable);
setTotalAmount(KJob::Bytes, channel->size());
- d->channel = channel;
+ connect(channel.data(),
+ SIGNAL(invalidated(Tp::DBusProxy *, const QString &, const QString &)),
+ SLOT(__k__onInvalidated()));
+ connect(channel.data(),
+ SIGNAL(stateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)),
+ SLOT(__k__onFileTransferChannelStateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)));
+ connect(channel.data(),
+ SIGNAL(transferredBytesChanged(qulonglong)),
+ SLOT(__k__onFileTransferChannelTransferredBytesChanged(qulonglong)));
}
HandleOutgoingFileTransferChannelJob::~HandleOutgoingFileTransferChannelJob()
@@ -133,12 +139,6 @@ void HandleOutgoingFileTransferChannelJobPrivate::__k__start()
return;
}
- q->connect(channel.data(),
- SIGNAL(stateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)),
- SLOT(__k__onFileTransferChannelStateChanged(Tp::FileTransferState, Tp::FileTransferStateChangeReason)));
- q->connect(channel.data(),
- SIGNAL(transferredBytesChanged(qulonglong)),
- SLOT(__k__onFileTransferChannelTransferredBytesChanged(qulonglong)));
Q_EMIT q->description(q, i18n("Outgoing file transfer"),
qMakePair<QString, QString>(i18n("To"), channel->targetContact()->alias()),
qMakePair<QString, QString>(i18n("Filename"), channel->uri()));
--
ktp-filetransfer-handler packaging
More information about the pkg-kde-commits
mailing list