ModelEditor: Introduce QMT_ASSERT

This change shall solve a lot of Coverity findings

Change-Id: I1e699f7363426e9b6008fc77d3f498fe3d968b4f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jochen Becher
2017-07-09 11:49:13 +02:00
parent 8ccdbe1944
commit 05f7b92f0a
49 changed files with 360 additions and 362 deletions

View File

@@ -237,7 +237,7 @@ void ComponentItem::relationDrawn(const QString &id, const QPointF &toScenePos,
bool ComponentItem::hasPlainShape() const
{
auto diagramComponent = dynamic_cast<DComponent *>(object());
QMT_CHECK(diagramComponent);
QMT_ASSERT(diagramComponent, return false);
return diagramComponent->isPlainShape();
}