From 39a4090c0a6e1d8fe12516be06ee7b31dd4bc96d Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 17 Oct 2020 16:07:39 +0200 Subject: devices: add devices in Command::importTable() Add a device_table parameters to Command::importTable() and add_imported_dives(). The content of this table will be added to the global device list (respectively removed on undo). This is currently a no-op, as the parser doesn't yet fill out the device table, but adds devices directly to the global device table. Signed-off-by: Berthold Stoeger --- mobile-widgets/qmlmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mobile-widgets/qmlmanager.cpp') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index dc22dbd6e..5d1d02b48 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -454,7 +454,7 @@ void QMLManager::mergeLocalRepo() struct device_table devices; struct filter_preset_table filter_presets; parse_file(qPrintable(nocloud_localstorage()), &table, &trips, &sites, &devices, &filter_presets); - add_imported_dives(&table, &trips, &sites, IMPORT_MERGE_ALL_TRIPS); + add_imported_dives(&table, &trips, &sites, &devices, IMPORT_MERGE_ALL_TRIPS); } void QMLManager::copyAppLogToClipboard() @@ -2242,7 +2242,7 @@ void QMLManager::importCacheRepo(QString repo) QString repoPath = QString("%1/cloudstorage/%2").arg(system_default_directory()).arg(repo); appendTextToLog(QString("importing %1").arg(repoPath)); parse_file(qPrintable(repoPath), &table, &trips, &sites, &devices, &filter_presets); - add_imported_dives(&table, &trips, &sites, IMPORT_MERGE_ALL_TRIPS); + add_imported_dives(&table, &trips, &sites, &devices, IMPORT_MERGE_ALL_TRIPS); changesNeedSaving(); } -- cgit v1.2.3-70-g09d2