summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-01-20 22:40:49 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-21 17:03:14 +1200
commit0787d941a0f58417a2eb1a656e54c19123366c71 (patch)
tree03925fbfbcc388a8c2245e1cb9d656aa0a54d938 /configuredivecomputerthreads.cpp
parenta700be32076225e68bfaa4b6c418cff015e2ceec (diff)
downloadsubsurface-0787d941a0f58417a2eb1a656e54c19123366c71.tar.gz
Refactor device handling threads
This refactors the device handling threads into having one common ancestor class. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r--configuredivecomputerthreads.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index af8995085..b2dc8c87c 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -1389,7 +1389,11 @@ static dc_status_t write_ostc_settings(dc_device_t *device, DeviceDetails *m_dev
return rc;
}
-ReadSettingsThread::ReadSettingsThread(QObject *parent, device_data_t *data) : QThread(parent), m_data(data)
+DeviceThread::DeviceThread(QObject *parent, device_data_t *data) : QThread(parent), m_data(data)
+{
+}
+
+ReadSettingsThread::ReadSettingsThread(QObject *parent, device_data_t *data) : DeviceThread(parent, data)
{
}
@@ -1452,7 +1456,7 @@ void ReadSettingsThread::run()
}
}
-WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data) : QThread(parent), m_data(data)
+WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data) : DeviceThread(parent, data)
{
}
@@ -1513,7 +1517,7 @@ void WriteSettingsThread::run()
}
-FirmwareUpdateThread::FirmwareUpdateThread(QObject *parent, device_data_t *data, QString fileName) : QThread(parent), m_data(data), m_fileName(fileName)
+FirmwareUpdateThread::FirmwareUpdateThread(QObject *parent, device_data_t *data, QString fileName) : DeviceThread(parent, data), m_fileName(fileName)
{
}
@@ -1553,7 +1557,7 @@ void FirmwareUpdateThread::run()
}
-ResetSettingsThread::ResetSettingsThread(QObject *parent, device_data_t *data) : QThread(parent), m_data(data)
+ResetSettingsThread::ResetSettingsThread(QObject *parent, device_data_t *data) : DeviceThread(parent, data)
{
}