From e5b4b5d2954d72f0323ced8e7d14f5ce9606e4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 7 Jul 2017 19:46:56 +0200 Subject: GH-1927 Add more specific task status logging * Tasks are now described by class name and object name (or memory address). * Tasks starts are logged. * Aborted tasks are now treated just as the other cases. --- api/logic/net/NetJob.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'api/logic/net/NetJob.cpp') diff --git a/api/logic/net/NetJob.cpp b/api/logic/net/NetJob.cpp index 65d649f5..9a8277b0 100644 --- a/api/logic/net/NetJob.cpp +++ b/api/logic/net/NetJob.cpp @@ -94,7 +94,6 @@ void NetJob::partProgress(int index, qint64 bytesReceived, qint64 bytesTotal) void NetJob::executeTask() { - qDebug() << m_job_name.toLocal8Bit() << " started."; // hack that delays early failures so they can be caught easier QMetaObject::invokeMethod(this, "startMoreParts", Qt::QueuedConnection); } @@ -114,18 +113,15 @@ void NetJob::startMoreParts() { if(!m_failed.size()) { - qDebug() << m_job_name << "succeeded."; emitSucceeded(); } else if(m_aborted) { - qDebug() << m_job_name << "aborted."; - emitFailed(tr("Job '%1' aborted.").arg(m_job_name)); + emitAborted(); } else { - qCritical() << m_job_name << "failed."; - emitFailed(tr("Job '%1' failed to process:\n%2").arg(m_job_name).arg(getFailedFiles().join("\n"))); + emitFailed(tr("Job '%1' failed to process:\n%2").arg(objectName()).arg(getFailedFiles().join("\n"))); } } return; -- cgit v1.2.3