mobile: unify download code on mobile and desktop

Use the undo-command for importing dives also on mobile. This should make the
whole disconnect-model shenigans unnecessary.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-11-16 22:24:06 +01:00 committed by Dirk Hohndel
parent 3b6b9951ae
commit b6f821886b
4 changed files with 20 additions and 32 deletions

View file

@ -4,6 +4,7 @@
#include <QAbstractTableModel>
#include <vector>
#include "core/divesite.h"
#include "core/divelist.h"
#include "core/downloadfromdcthread.h"
class DiveImportedModel : public QAbstractTableModel
@ -25,7 +26,7 @@ public:
std::pair<struct dive_table, struct dive_site_table> consumeTables(); // Returns dives and sites and resets model.
int numDives() const;
Q_INVOKABLE void recordDives();
Q_INVOKABLE void recordDives(int flags = IMPORT_PREFER_IMPORTED | IMPORT_IS_DOWNLOADED);
Q_INVOKABLE void startDownload();
DownloadThread thread;