mobile: remove collapsed model that we no longer use

The dive list now uses the mobile list model.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-11-15 21:31:52 -08:00
parent b382445e59
commit edeaf7fa57
3 changed files with 2 additions and 209 deletions

View file

@ -299,7 +299,6 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state)
void QMLManager::openLocalThenRemote(QString url)
{
CollapsedDiveListSortModel::instance()->setSourceModel(nullptr);
DiveListModel::instance()->clear();
setNotificationText(tr("Open local dive data file"));
QByteArray fileNamePrt = QFile::encodeName(url);
@ -338,8 +337,6 @@ void QMLManager::openLocalThenRemote(QString url)
qPrefPartialPressureGas::set_po2(git_prefs.pp_graphs.po2);
process_loaded_dives();
DiveListModel::instance()->reload();
CollapsedDiveListSortModel::instance()->setSourceModel(DiveListModel::instance());
CollapsedDiveListSortModel::instance()->updateFilterState();
appendTextToLog(QStringLiteral("%1 dives loaded from cache").arg(dive_table.nr));
setNotificationText(tr("%1 dives loaded from local dive data file").arg(dive_table.nr));
}
@ -1420,8 +1417,8 @@ void QMLManager::selectDive(int id)
}
if (amount_selected == 0)
qWarning("QManager::selectDive() called with unknown id");
else
CollapsedDiveListSortModel::instance()->updateSelectionState();
// else
// FIXME: CollapsedDiveListSortModel::instance()->updateSelectionState();
}
void QMLManager::deleteDive(int id)
@ -2147,7 +2144,6 @@ void QMLManager::setFilter(const QString filterText, int index)
case 2: mode = FilterData::Mode::TAGS; break;
}
DiveListSortModel::instance()->setFilter(filterText, mode);
CollapsedDiveListSortModel::instance()->updateFilterState();
}
void QMLManager::setShowNonDiveComputers(bool show)