mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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 "downloadfromdcthread.h"
|
||||||
#include "core/libdivecomputer.h"
|
#include "core/libdivecomputer.h"
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
QStringList vendorList;
|
QStringList vendorList;
|
||||||
QHash<QString, QStringList> productList;
|
QHash<QString, QStringList> productList;
|
||||||
|
@ -27,6 +28,7 @@ void DownloadThread::setDiveTable(struct dive_table* table)
|
||||||
void DownloadThread::run()
|
void DownloadThread::run()
|
||||||
{
|
{
|
||||||
auto internalData = m_data.internalData();
|
auto internalData = m_data.internalData();
|
||||||
|
internalData->descriptor = descriptorLookup[m_data.vendor() + m_data.product()];
|
||||||
Q_ASSERT(internalData->download_table != nullptr);
|
Q_ASSERT(internalData->download_table != nullptr);
|
||||||
const char *errorText;
|
const char *errorText;
|
||||||
import_thread_cancelled = false;
|
import_thread_cancelled = false;
|
||||||
|
@ -159,11 +161,6 @@ void DCDeviceData::setDevName(const QString& devName)
|
||||||
data.devname = strdup(qPrintable(devName));
|
data.devname = strdup(qPrintable(devName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DCDeviceData::setDescriptor(const QString& descriptor)
|
|
||||||
{
|
|
||||||
// data.descriptor =
|
|
||||||
}
|
|
||||||
|
|
||||||
void DCDeviceData::setBluetoothMode(bool mode)
|
void DCDeviceData::setBluetoothMode(bool mode)
|
||||||
{
|
{
|
||||||
data.bluetooth_mode = mode;
|
data.bluetooth_mode = mode;
|
||||||
|
|
|
@ -47,7 +47,6 @@ public slots:
|
||||||
void setVendor(const QString& vendor);
|
void setVendor(const QString& vendor);
|
||||||
void setProduct(const QString& product);
|
void setProduct(const QString& product);
|
||||||
void setDevName(const QString& devName);
|
void setDevName(const QString& devName);
|
||||||
void setDescriptor(const QString& descriptor);
|
|
||||||
void setBluetoothMode(bool mode);
|
void setBluetoothMode(bool mode);
|
||||||
void setForceDownload(bool force);
|
void setForceDownload(bool force);
|
||||||
void setCreateNewTrip(bool create);
|
void setCreateNewTrip(bool create);
|
||||||
|
|
Loading…
Add table
Reference in a new issue