From e43ea018fa2faecfc6ebb5a7831bafbfefca183d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 9 Jan 2015 14:39:43 -0800 Subject: [PATCH] Add a private table for downloaded dives This still isn't actually used, just puts it in place. Signed-off-by: Dirk Hohndel --- libdivecomputer.h | 1 + qt-ui/downloadfromdivecomputer.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libdivecomputer.h b/libdivecomputer.h index 59e513142..91548bac3 100644 --- a/libdivecomputer.h +++ b/libdivecomputer.h @@ -31,6 +31,7 @@ typedef struct device_data_t bool libdc_log; bool libdc_dump; FILE *libdc_logfile; + struct dive_table *download_table; } device_data_t; const char *do_libdivecomputer_import(device_data_t *data); diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index fb981c9f8..87529456b 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -38,6 +38,8 @@ namespace DownloadFromDcGlobal { const char *err_string; }; +struct dive_table downloadTable; + DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f), thread(0), downloading(false), @@ -49,6 +51,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : ostcFirmwareCheck(0), currentState(INITIAL) { + clear_table(&downloadTable); ui.setupUi(this); ui.progressBar->hide(); ui.progressBar->setMinimum(0);