@@ -20,7 +20,6 @@
2020
2121
2222#include "download_tracker.h"
23−#include <QDebug>
2423
2524DownloadTracker::DownloadTracker(QObject *parent) :
2625 QObject(parent)
@@ -30,8 +29,8 @@ DownloadTracker::DownloadTracker(QObject *parent) :
3029bool DownloadTracker::isServiceReady()
3130{
3231 bool ready = false;
33− if(this->adaptor != nullptr) {
34− ready = this->adaptor->isValid();
32+ if(m_adaptor != nullptr) {
33+ ready = m_adaptor->isValid();
3534 }
3635
3736 return ready;
@@ -45,9 +44,9 @@ QString DownloadTracker::dbusPath() const
4544void DownloadTracker::setDbusPath(QString& path)
4645{
4746 if(path != "" && m_dbusPath != path){
48− this->m_dbusPath = path;
49− this->startService();
50− Q_EMIT dbusPathChanged(this->m_dbusPath);
47+ m_dbusPath = path;
48+ startService();
49+ Q_EMIT dbusPathChanged(m_dbusPath);
5150 }
5251}
5352
@@ -59,23 +58,23 @@ QString DownloadTracker::service() const
5958void DownloadTracker::setService(QString& service)
6059{
6160 if(service != "" && m_service != service){
62− this->m_service = service;
63− this->startService();
64− Q_EMIT serviceChanged(this->m_service);
61+ m_service = service;
62+ startService();
63+ Q_EMIT serviceChanged(m_service);
6564 }
6665}
6766
6867void DownloadTracker::startService()
6968{
70− if(!this->m_service.isEmpty() && !this->m_dbusPath.isEmpty()) {
71− this->adaptor = new DownloadTrackerAdaptor(this->m_service, this->m_dbusPath, QDBusConnection::sessionBus(), 0);
69+ if(!m_service.isEmpty() && !m_dbusPath.isEmpty()) {
70+ m_adaptor = new DownloadTrackerAdaptor(m_service, m_dbusPath, QDBusConnection::sessionBus(), 0);
7271
73− this->connect(this->adaptor, SIGNAL(canceled(bool)), this, SIGNAL(canceled(bool)));
74− this->connect(this->adaptor, SIGNAL(error(const QString &)), this, SIGNAL(error(const QString &)));
75− this->connect(this->adaptor, SIGNAL(finished(const QString &)), this, SIGNAL(finished(const QString &)));
76− this->connect(this->adaptor, SIGNAL(paused(bool)), this, SIGNAL(paused(bool)));
77− this->connect(this->adaptor, SIGNAL(progress(qulonglong, qulonglong)), this, SIGNAL(progress(qulonglong, qulonglong)));
78− this->connect(this->adaptor, SIGNAL(resumed(bool)), this, SIGNAL(resumed(bool)));
79− this->connect(this->adaptor, SIGNAL(started(bool)), this, SIGNAL(started(bool)));
72+ connect(m_adaptor, SIGNAL(canceled(bool)), this, SIGNAL(canceled(bool)));
73+ connect(m_adaptor, SIGNAL(error(const QString &)), this, SIGNAL(error(const QString &)));
74+ connect(m_adaptor, SIGNAL(finished(const QString &)), this, SIGNAL(finished(const QString &)));
75+ connect(m_adaptor, SIGNAL(paused(bool)), this, SIGNAL(paused(bool)));
76+ connect(m_adaptor, SIGNAL(progress(qulonglong, qulonglong)), this, SIGNAL(progress(qulonglong, qulonglong)));
77+ connect(m_adaptor, SIGNAL(resumed(bool)), this, SIGNAL(resumed(bool)));
78+ connect(m_adaptor, SIGNAL(started(bool)), this, SIGNAL(started(bool)));
8079 }
8180}