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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
committed by
Dirk Hohndel
parent
7e33369dc8
commit
f542dc4030
@@ -28,7 +28,7 @@ Kirigami.Page {
|
||||
id: downloadThread
|
||||
|
||||
onFinished : {
|
||||
importModel.repopulate(table)
|
||||
importModel.repopulate(table, trips)
|
||||
progressBar.visible = false
|
||||
if (dcImportModel.rowCount() > 0) {
|
||||
console.log(dcImportModel.rowCount() + " dive downloaded")
|
||||
|
||||
Reference in New Issue
Block a user