19 #include <QDBusPendingReply> 
   21 #include <boost/log/sources/record_ostream.hpp> 
   22 #include <boost/log/sources/severity_feature.hpp> 
   31 namespace DownloadManager {
 
   33 using namespace Logging;
 
   35 DownloadPCW::DownloadPCW(
const QDBusConnection& conn,
 
   36                          const QString& servicePath,
 
   37                          const QDBusPendingCall& call,
 
   39     : PendingCallWatcher(conn, servicePath, call, parent) {
 
   40     auto connected = connect(
this, &DownloadPCW::finished,
 
   41         this, &DownloadPCW::onFinished);
 
   44             "Could not connect to signal &DownloadPCW::finished");
 
   49 DownloadPCW::onFinished(QDBusPendingCallWatcher* watcher) {
 
   50     auto down = qobject_cast<Download*>(parent());
 
   51     QDBusPendingReply<> reply = *watcher;
 
   52     if (reply.isError()) {
 
   53         auto dbusErr = reply.error();
 
   55             QString(
"%1 %2").arg(dbusErr.name()).arg(dbusErr.message()));
 
   56         auto err = 
new DBusError(reply.error());
 
   59     watcher->deleteLater();