From a4f3580e10388a1aecfd10a3a70eaf10efe06640 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 13 Aug 2019 17:22:15 +0200 Subject: Mobile: remove dive argument from DiveListModel::insertDive() Since DiveListModel does not keep its own list of dives anymore, insertDive() doesn't use the DiveObjectHelper argument. Remove it. Signed-off-by: Berthold Stoeger --- qt-models/divelistmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-models/divelistmodel.cpp') diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index ef384f4cd..0fe17627e 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -136,7 +136,7 @@ DiveListModel::DiveListModel(QObject *parent) : QAbstractListModel(parent) m_instance = this; } -void DiveListModel::insertDive(int i, DiveObjectHelper *) +void DiveListModel::insertDive(int i) { beginInsertRows(QModelIndex(), i, i); endInsertRows(); @@ -163,7 +163,7 @@ void DiveListModel::updateDive(int i, dive *d) // we need to make sure that QML knows that this dive has changed - // the only reliable way I've found is to remove and re-insert it removeDive(i); - insertDive(i, nullptr); // TODO: DiveObjectHelper not needed anymore - remove second argument + insertDive(i); } void DiveListModel::reload() @@ -254,7 +254,7 @@ QString DiveListModel::startAddDive() d->number = nr; d->dc.model = strdup("manually added dive"); append_dive(d); - insertDive(get_idx_by_uniq_id(d->id), new DiveObjectHelper(d)); + insertDive(get_idx_by_uniq_id(d->id)); return QString::number(d->id); } -- cgit v1.2.3-70-g09d2