mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
c370b876b2
commit
85e92597b5
2 changed files with 2 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -47,7 +47,6 @@ public slots:
|
|||
void setVendor(const QString& vendor);
|
||||
void setProduct(const QString& product);
|
||||
void setDevName(const QString& devName);
|
||||
void setDescriptor(const QString& descriptor);
|
||||
void setBluetoothMode(bool mode);
|
||||
void setForceDownload(bool force);
|
||||
void setCreateNewTrip(bool create);
|
||||
|
|
Loading…
Reference in a new issue