subsurface/qt-models
Berthold Stoeger cb80ff746b crash fix: Don't cast to CylindersModel or CylindersModelFiltered
The tank-info-delegate cast its model to CylindersModelFiltered,
since this is what the equipment-tab uses since implementing the
filtering of unused cylinders. However, the planner users the same
delegate and still uses the unfiltered CylindersModel. This means
that the (dynamic) cast returns a null pointer and crashes.

One possibility would be to derive CylindersModelFiltered and
CylindersModel from the same class that defines virtual functions
and cast to that class.

This is a different attempt: don't cast (i.e. stay with a
QAbstractItemModel and play it via Qt's model-view system. Firstly,
replace the passInData function by a role to setData(). Secondly,
read the working-pressure and size via new columns using data().

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-28 08:12:26 -08:00
..
cleanertablemodel.cpp Cleanup: return directly from data() methods 2019-06-19 13:11:10 -07:00
cleanertablemodel.h cleanup: remove CleanerTableModel::warningMessage signal 2020-02-23 06:57:18 -08:00
CMakeLists.txt mobile/summary: create DiveSummaryModel 2020-02-08 10:29:36 -08:00
completionmodels.cpp code cleanup: replace use of toStdVector() 2020-01-10 02:37:03 +09:00
completionmodels.h
cylindermodel.cpp crash fix: Don't cast to CylindersModel or CylindersModelFiltered 2020-02-28 08:12:26 -08:00
cylindermodel.h crash fix: Don't cast to CylindersModel or CylindersModelFiltered 2020-02-28 08:12:26 -08:00
divecomputerextradatamodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
divecomputerextradatamodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
divecomputermodel.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
divecomputermodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
diveimportedmodel.cpp code cleanup: add empty table structures 2020-01-10 02:37:03 +09:00
diveimportedmodel.h Import: remove DiveImportedModel::lastIndex 2019-10-02 08:04:49 -07:00
divelistmodel.cpp Cleanup: remove capture-all lambda clauses 2020-02-04 16:24:29 +01:00
divelistmodel.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
divelocationmodel.cpp Dive site: ignore dive sites without location in proximity search 2020-02-04 02:18:58 +01:00
divelocationmodel.h Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
divepicturemodel.cpp Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
divepicturemodel.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
diveplannermodel.cpp cleanup: remove CleanerTableModel::warningMessage signal 2020-02-23 06:57:18 -08:00
diveplannermodel.h Planner: don't filter cylinders 2020-02-11 20:37:09 -08:00
diveplotdatamodel.cpp Partially revert 3025e0630d 2019-11-16 08:29:53 -08:00
diveplotdatamodel.h Cleanup: free plot data on exit 2019-11-09 19:19:04 +01:00
divesiteimportmodel.cpp Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesiteimportmodel.h Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesummarymodel.cpp mobile/summary: use more intuitive time periods 2020-02-08 10:29:36 -08:00
divesummarymodel.h mobile/summary: add section headers 2020-02-08 10:29:36 -08:00
divetripmodel.cpp Filter: move actual filtering loop to core/divefilter.cpp 2020-02-22 15:18:31 -08:00
divetripmodel.h Cleanup: remove shown flag of DiveTripModelTree items 2020-02-22 15:18:31 -08:00
filtermodels.cpp Dive list: remove filtering in MultiFilterSortModel 2020-02-22 15:18:31 -08:00
filtermodels.h Dive list: remove global pointer to DiveTrip model 2019-12-10 18:45:30 -08:00
gpslistmodel.cpp Cleanup: turn GpsListModel into standard singleton 2019-10-04 09:19:10 -07:00
gpslistmodel.h Cleanup: Make constructor of singletons private 2019-10-04 09:19:10 -07:00
maplocationmodel.cpp Filter: split out filter from model 2019-11-19 21:13:40 -08:00
maplocationmodel.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
messagehandlermodel.cpp qt-models: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
messagehandlermodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
models.cpp Cylinders: access cylinders with get_cylinder() 2019-11-09 19:19:04 +01:00
models.h Cleanup: remove includes from qt-models/models.h 2019-07-18 05:42:55 -07:00
tankinfomodel.cpp Cleanup: implement proper Qt-model semantics in TankInfoModel 2019-04-29 13:06:39 -07:00
tankinfomodel.h Cleanup: remove biggerString() functions 2019-04-29 13:06:39 -07:00
treemodel.cpp Cleanup: make DiveTripModel a global object 2018-09-01 07:48:43 -07:00
treemodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
weightmodel.cpp Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
weightmodel.h Cleanup: remove WeightModel::changed 2019-12-05 10:14:25 -08:00
weightsysteminfomodel.cpp Cleanup: implement proper Qt-model semantics in WeightInfoModel 2019-04-29 13:06:39 -07:00
weightsysteminfomodel.h Cleanup: implement proper Qt-model semantics in WeightInfoModel 2019-04-29 13:06:39 -07:00
yearlystatisticsmodel.cpp Core: dynamically allocate the result of get_gas_used() 2019-11-09 19:19:04 +01:00
yearlystatisticsmodel.h Show average max depth in yearly statistics 2018-12-17 12:18:26 +01:00