@@ -20,7 +20,6 @@
22#include "download_tracker.h"
22#include "download_tracker.h"
25DownloadTracker::DownloadTracker(QObject *parent) :
24DownloadTracker::DownloadTracker(QObject *parent) :
26 QObject(parent)
25 QObject(parent)
@@ -30,8 +29,8 @@ DownloadTracker::DownloadTracker(QObject *parent) :
30bool DownloadTracker::isServiceReady()
29bool DownloadTracker::isServiceReady()
32 bool ready = false;
31 bool ready = false;
33− if(this->adaptor != nullptr) {
32+ if(m_adaptor != nullptr) {
34− ready = this->adaptor->isValid();
33+ ready = m_adaptor->isValid();
37 return ready;
36 return ready;
@@ -45,9 +44,9 @@ QString DownloadTracker::dbusPath() const
45void DownloadTracker::setDbusPath(QString& path)
44void DownloadTracker::setDbusPath(QString& path)
47 if(path != "" && m_dbusPath != path){
46 if(path != "" && m_dbusPath != path){
48− this->m_dbusPath = path;
47+ m_dbusPath = path;
49− this->startService();
48+ startService();
50− Q_EMIT dbusPathChanged(this->m_dbusPath);
49+ Q_EMIT dbusPathChanged(m_dbusPath);
@@ -59,23 +58,23 @@ QString DownloadTracker::service() const
59void DownloadTracker::setService(QString& service)
58void DownloadTracker::setService(QString& service)
61 if(service != "" && m_service != service){
60 if(service != "" && m_service != service){
62− this->m_service = service;
61+ m_service = service;
63− this->startService();
62+ startService();
64− Q_EMIT serviceChanged(this->m_service);
63+ Q_EMIT serviceChanged(m_service);
68void DownloadTracker::startService()
67void DownloadTracker::startService()
70− if(!this->m_service.isEmpty() && !this->m_dbusPath.isEmpty()) {
69+ if(!m_service.isEmpty() && !m_dbusPath.isEmpty()) {
71− this->adaptor = new DownloadTrackerAdaptor(this->m_service, this->m_dbusPath, QDBusConnection::sessionBus(), 0);
70+ m_adaptor = new DownloadTrackerAdaptor(m_service, m_dbusPath, QDBusConnection::sessionBus(), 0);
73− this->connect(this->adaptor, SIGNAL(canceled(bool)), this, SIGNAL(canceled(bool)));
72+ connect(m_adaptor, SIGNAL(canceled(bool)), this, SIGNAL(canceled(bool)));
74− this->connect(this->adaptor, SIGNAL(error(const QString &)), this, SIGNAL(error(const QString &)));
73+ connect(m_adaptor, SIGNAL(error(const QString &)), this, SIGNAL(error(const QString &)));
75− this->connect(this->adaptor, SIGNAL(finished(const QString &)), this, SIGNAL(finished(const QString &)));
74+ connect(m_adaptor, SIGNAL(finished(const QString &)), this, SIGNAL(finished(const QString &)));
76− this->connect(this->adaptor, SIGNAL(paused(bool)), this, SIGNAL(paused(bool)));
75+ connect(m_adaptor, SIGNAL(paused(bool)), this, SIGNAL(paused(bool)));
77− this->connect(this->adaptor, SIGNAL(progress(qulonglong, qulonglong)), this, SIGNAL(progress(qulonglong, qulonglong)));
76+ connect(m_adaptor, SIGNAL(progress(qulonglong, qulonglong)), this, SIGNAL(progress(qulonglong, qulonglong)));
78− this->connect(this->adaptor, SIGNAL(resumed(bool)), this, SIGNAL(resumed(bool)));
77+ connect(m_adaptor, SIGNAL(resumed(bool)), this, SIGNAL(resumed(bool)));
79− this->connect(this->adaptor, SIGNAL(started(bool)), this, SIGNAL(started(bool)));
78+ connect(m_adaptor, SIGNAL(started(bool)), this, SIGNAL(started(bool)));