TechDraw: Fix Coverity dynamic_cast warnings

This commit is contained in:
Ian Rees
2016-08-19 22:47:17 +12:00
committed by wmayer
parent 97f6aa86ba
commit 8cc3ee64e8
12 changed files with 84 additions and 74 deletions

View File

@@ -196,7 +196,10 @@ QGIView * QGIProjGroup::getAnchorQItem() const
{
// Get the currently assigned anchor view
App::DocumentObject *anchorObj = getDrawView()->Anchor.getValue();
TechDraw::DrawView *anchorView = dynamic_cast<TechDraw::DrawView *>(anchorObj);
auto anchorView( dynamic_cast<TechDraw::DrawView *>(anchorObj) );
if( anchorView == nullptr ) {
return nullptr;
}
// Locate the anchor view's qgraphicsitemview
QList<QGraphicsItem*> list = childItems();