summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 12:32:22 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commita2614665942959b95eef8453730cd3ac66ac42a3 (patch)
treee8491231112634e6fa188a605ddab47910cfe8c2 /desktop-widgets/subsurfacewebservices.cpp
parent41975435a2a93733a0e46a7e594ffba193be6e87 (diff)
downloadsubsurface-a2614665942959b95eef8453730cd3ac66ac42a3.tar.gz
parser: add device_table to parser state
If we want to avoid the parsers to directly modify global data, we have to provide a device_table to parse into. This adds such a state and the corresponding function parameters. However, for now this is unused. Adding new parameters is very painful and this commit shows that we urgently need a "struct divelog" collecting all those tables! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index bc4c4745d..c5a5cad48 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -5,6 +5,7 @@
#include "core/settings/qPrefCloudStorage.h"
#include "desktop-widgets/mainwindow.h"
#include "commands/command.h"
+#include "core/device.h"
#include "core/divesite.h"
#include "core/trip.h"
#include "core/errorhelper.h"
@@ -456,8 +457,9 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton *button)
struct dive_table table = empty_dive_table;
struct trip_table trips = empty_trip_table;
struct dive_site_table sites = empty_dive_site_table;
+ struct device_table devices;
struct filter_preset_table filter_presets;
- parse_file(QFile::encodeName(zipFile.fileName()), &table, &trips, &sites, &filter_presets);
+ parse_file(QFile::encodeName(zipFile.fileName()), &table, &trips, &sites, &devices, &filter_presets);
Command::importDives(&table, &trips, &sites, nullptr, IMPORT_MERGE_ALL_TRIPS, QStringLiteral("divelogs.de"));
/* store last entered user/pass in config */