summaryrefslogtreecommitdiffstats
path: root/core/downloadfromdcthread.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-05-26 14:07:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-27 11:07:19 -0700
commit85e92597b561f349d24f2181e763c6ed381654ce (patch)
tree71892c214f2593a83cb443461fa54d00af645cd5 /core/downloadfromdcthread.cpp
parentc370b876b2605f0b06b7c8089d47c1321ea0634f (diff)
downloadsubsurface-85e92597b561f349d24f2181e763c6ed381654ce.tar.gz
Set descriptor when starting thread.
Set the descriptor when starting the thread, this removes code from the desktop code and makes everything in sync always. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r--core/downloadfromdcthread.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index e90481a0b..46adbe54c 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -1,5 +1,6 @@
#include "downloadfromdcthread.h"
#include "core/libdivecomputer.h"
+#include <QDebug>
QStringList vendorList;
QHash<QString, QStringList> productList;
@@ -27,6 +28,7 @@ void DownloadThread::setDiveTable(struct dive_table* table)
void DownloadThread::run()
{
auto internalData = m_data.internalData();
+ internalData->descriptor = descriptorLookup[m_data.vendor() + m_data.product()];
Q_ASSERT(internalData->download_table != nullptr);
const char *errorText;
import_thread_cancelled = false;
@@ -159,11 +161,6 @@ void DCDeviceData::setDevName(const QString& devName)
data.devname = strdup(qPrintable(devName));
}
-void DCDeviceData::setDescriptor(const QString& descriptor)
-{
- // data.descriptor =
-}
-
void DCDeviceData::setBluetoothMode(bool mode)
{
data.bluetooth_mode = mode;