diff options
author | jan Iversen <jani@apache.org> | 2018-07-22 16:19:22 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-25 08:35:04 -0700 |
commit | 3d6848b22c9fb64a99bb3dec535431a6cab09ad9 (patch) | |
tree | c1a7aedcf02120c9ea0031194b1cef2d15db97fe /core/downloadfromdcthread.cpp | |
parent | 98820cf970335523b4cd2a84a025c12b5480e0aa (diff) | |
download | subsurface-3d6848b22c9fb64a99bb3dec535431a6cab09ad9.tar.gz |
core: activate qPrefDiveComputer
remove DiveComputer from SettingsObjectWrapper and reference qPrefDiveComputer
update files using SettingsObjectWrapper/DiveComputer to use qPrefDiveComputer
this activated qPrefDiveComputer and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r-- | core/downloadfromdcthread.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index c0b4f691b..17bcb9647 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -56,10 +56,10 @@ void DownloadThread::run() qDebug() << "Finishing download thread:" << downloadTable.nr << "dives downloaded"; } auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings; - dcs->setVendor(internalData->vendor); - dcs->setProduct(internalData->product); - dcs->setDevice(internalData->devname); - dcs->setDeviceName(m_data->devBluetoothName()); + dcs->set_vendor(internalData->vendor); + dcs->set_product(internalData->product); + dcs->set_device(internalData->devname); + dcs->set_device_name(m_data->devBluetoothName()); } static void fill_supported_mobile_list() @@ -247,12 +247,12 @@ QStringList DCDeviceData::getProductListFromVendor(const QString &vendor) int DCDeviceData::getMatchingAddress(const QString &vendor, const QString &product) { auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings; - if (dcs->dc_vendor() == vendor && - dcs->dc_product() == product) { + if (dcs->vendor() == vendor && + dcs->product() == product) { // we are trying to show the last dive computer selected for (int i = 0; i < connectionListModel.rowCount(); i++) { QString address = connectionListModel.address(i); - if (address.contains(dcs->dc_device())) + if (address.contains(dcs->device())) return i; } } @@ -410,10 +410,10 @@ device_data_t* DCDeviceData::internalData() int DCDeviceData::getDetectedVendorIndex() { auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings; - if (!dcs->dc_vendor().isEmpty()) { + if (!dcs->vendor().isEmpty()) { // use the last one for (int i = 0; i < vendorList.length(); i++) { - if (vendorList[i] == dcs->dc_vendor()) + if (vendorList[i] == dcs->vendor()) return i; } } @@ -431,11 +431,11 @@ int DCDeviceData::getDetectedVendorIndex() int DCDeviceData::getDetectedProductIndex(const QString ¤tVendorText) { auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings; - if (!dcs->dc_vendor().isEmpty()) { - if (dcs->dc_vendor() == currentVendorText) { + if (!dcs->vendor().isEmpty()) { + if (dcs->vendor() == currentVendorText) { // we are trying to show the last dive computer selected for (int i = 0; i < productList[currentVendorText].length(); i++) { - if (productList[currentVendorText][i] == dcs->dc_product()) + if (productList[currentVendorText][i] == dcs->product()) return i; } } |