summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-27 19:46:48 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-28 08:12:26 -0800
commitcb80ff746b687a3ad29b53d9f633cbdc6b142c71 (patch)
tree50a22d892fffd1175dbba94b49d1b712a604039b /android
parent9214bdb3c576c0e26745939a18ea75634aef8ce4 (diff)
downloadsubsurface-cb80ff746b687a3ad29b53d9f633cbdc6b142c71.tar.gz
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>
Diffstat (limited to 'android')
0 files changed, 0 insertions, 0 deletions