forked from qt-creator/qt-creator
Debugger: Use kit macro expander instead of global one where possible
This is low hanging fruit enabling a lot more customization. Change-Id: I1a90fa731ea512852c12a55fad75551efb44e875 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -4186,7 +4186,7 @@ void GdbEngine::loadInitScript()
|
||||
).arg(script));
|
||||
}
|
||||
} else {
|
||||
const QString commands = stringSetting(GdbStartupCommands);
|
||||
const QString commands = expand(stringSetting(GdbStartupCommands));
|
||||
if (!commands.isEmpty())
|
||||
runCommand({commands.toLocal8Bit(), NoFlags});
|
||||
}
|
||||
@@ -4258,7 +4258,7 @@ void GdbEngine::abortDebugger()
|
||||
void GdbEngine::resetInferior()
|
||||
{
|
||||
if (!runParameters().commandsForReset.isEmpty()) {
|
||||
QByteArray commands = globalMacroExpander()->expand(runParameters().commandsForReset);
|
||||
const QByteArray commands = expand(runParameters().commandsForReset);
|
||||
foreach (QByteArray command, commands.split('\n')) {
|
||||
command = command.trimmed();
|
||||
if (!command.isEmpty())
|
||||
@@ -4300,7 +4300,7 @@ void GdbEngine::handleInferiorPrepared()
|
||||
CHECK_STATE(InferiorSetupRequested);
|
||||
|
||||
if (!rp.commandsAfterConnect.isEmpty()) {
|
||||
QByteArray commands = globalMacroExpander()->expand(rp.commandsAfterConnect);
|
||||
const QByteArray commands = expand(rp.commandsAfterConnect);
|
||||
foreach (QByteArray command, commands.split('\n'))
|
||||
runCommand({command, NoFlags});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user