mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
cleanup: Unchecked dynamic_cast
CID 208309 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
0852f9a2ab
commit
9d1aff2972
1 changed files with 2 additions and 0 deletions
|
@ -451,6 +451,8 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
|||
QFontMetrics fmBigger(fontBigger);
|
||||
QStyleOptionViewItem opt = option;
|
||||
const QAbstractProxyModel *proxyModel = dynamic_cast<const QAbstractProxyModel*>(origIdx.model());
|
||||
if (!proxyModel)
|
||||
return;
|
||||
QModelIndex index = proxyModel->mapToSource(origIdx);
|
||||
QStyledItemDelegate::initStyleOption(&opt, index);
|
||||
QString diveSiteName = index.data().toString();
|
||||
|
|
Loading…
Add table
Reference in a new issue