Debugger: Use a qobject_cast instead of some static_cast

The underlying assumption may be violated soon, make it
easier to debug if it breaks.

Change-Id: I7511d5677659e266f2d01db8bafb46bcd93d7f7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-04-21 12:37:45 +02:00
parent 230524da16
commit 384d141aac

View File

@@ -1522,7 +1522,7 @@ DebuggerRunControl *DebuggerEngine::runControl() const
DebuggerRunTool *DebuggerEngine::runTool() const
{
if (DebuggerRunControl *rc = d->runControl())
return static_cast<DebuggerRunTool *>(rc->toolRunner());
return qobject_cast<DebuggerRunTool *>(rc->toolRunner());
return nullptr;
}