From f542dc4030dda5dac1da1cc928f7a40a50919c4d Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 23 Dec 2018 12:46:25 +0100 Subject: Import: add trip_table argument to DiveImportedModel::repopulate() In the future we want to download trips into a distinct trip-table instead of the global trip-table to allow for undo of import. Therefore add a trip_table argument to DiveImportedModel::repopulate() and a trip_table member to DiveImportedModel. To correctly set these, add a DownloadThread::trips() function, which currently simply returns the global trip table. Finally, make "struct trip_table *" a Q_METATYPE, so that the corresponding arguments can be passed from QML. Signed-off-by: Berthold Stoeger --- desktop-widgets/downloadfromdivecomputer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index 4221f5bf4..4e4c6a43c 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -490,7 +490,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished() } ui.downloadCancelRetryButton->setText(tr("Retry download")); ui.downloadCancelRetryButton->setEnabled(true); - diveImportedModel->repopulate(thread.table()); + diveImportedModel->repopulate(thread.table(), thread.trips()); } void DownloadFromDCWidget::on_cancel_clicked() -- cgit v1.2.3-70-g09d2