aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/downloadfromdcthread.cpp4
-rw-r--r--mobile-widgets/qmlmanager.cpp3
-rw-r--r--mobile-widgets/qmlmanager.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index bd8a637f1..9583eff15 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -16,11 +16,11 @@ static QString str_error(const char *fmt, ...)
return str;
}
-DownloadThread::DownloadThread() : m_data(new DCDeviceData())
+DownloadThread::DownloadThread()
{
+ m_data = DCDeviceData::instance();
}
-
void DownloadThread::run()
{
auto internalData = m_data->internalData();
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 96bdab51e..02345342f 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -91,7 +91,8 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
m_updateSelectedDive(-1),
m_selectedDiveTimestamp(0),
m_credentialStatus(UNKNOWN),
- alreadySaving(false)
+ alreadySaving(false),
+ m_device_data(new DCDeviceData(this))
{
#if defined(BT_SUPPORT)
// ensure that we start the BTDiscovery - this should be triggered by the export of the class
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index a41ee509a..a4dbb8b56 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -18,6 +18,7 @@
#include "core/btdiscovery.h"
#include "core/gpslocation.h"
+#include "core/downloadfromdcthread.h"
#include "qt-models/divelistmodel.h"
class QMLManager : public QObject {
@@ -204,6 +205,7 @@ private:
bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth);
bool currentGitLocalOnly;
bool m_showPin;
+ DCDeviceData *m_device_data;
signals:
void cloudUserNameChanged();