forked from qt-creator/qt-creator
Debugger: Do not create the console unnecessarily
Triggering console creation in the plugin destructor is not needed. Change-Id: Ic21016e7a19fa08ea7dd03a8364aa6fc229bb2d1 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -283,11 +283,20 @@ void Console::evaluate(const QString &expression)
|
||||
}
|
||||
}
|
||||
|
||||
static Console *theConsole = nullptr;
|
||||
|
||||
Console *debuggerConsole()
|
||||
{
|
||||
static Console *theConsole = new Console;
|
||||
if (!theConsole)
|
||||
theConsole = new Console;
|
||||
return theConsole;
|
||||
}
|
||||
|
||||
void destroyDebuggerConsole()
|
||||
{
|
||||
delete theConsole;
|
||||
theConsole = nullptr;
|
||||
}
|
||||
|
||||
} // Internal
|
||||
} // Debugger
|
||||
|
||||
Reference in New Issue
Block a user