From 2bcb3d88a090582d6d3dcda8810f011beb22caa6 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 19 Oct 2020 19:19:32 +0200 Subject: divecomputer: add device_table pointer to device_data_t In one weird case (suunto), the code in libdivecomputer.c generates a device node directly instead of going the usual way (setting the data in the dc-structure of the imported dive). It is unclear to me whether that has to be that way, as it depends on the chronological order of callbacks to event_cb() and dive_cb(). Therefore add a device_table pointer to device_data_t so that the downloader can add the device to this table. This only adds the pointer, but does not yet use it in the downloading code. Signed-off-by: Berthold Stoeger --- qt-models/diveimportedmodel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-models') diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp index 0541d32d3..0e2c07cc6 100644 --- a/qt-models/diveimportedmodel.cpp +++ b/qt-models/diveimportedmodel.cpp @@ -129,6 +129,7 @@ void DiveImportedModel::downloadThreadFinished() // Move the table data from thread to model move_dive_table(&thread.downloadTable, &diveTable); move_dive_site_table(&thread.diveSiteTable, &sitesTable); + deviceTable = std::move(thread.deviceTable); checkStates.resize(diveTable.nr); std::fill(checkStates.begin(), checkStates.end(), true); -- cgit v1.2.3-70-g09d2