forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user