cleanup: Unchecked dynamic_cast

CID 208309

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-12-28 19:54:26 +01:00 committed by Dirk Hohndel
parent 0852f9a2ab
commit 9d1aff2972

View file

@ -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();