MacroExpander: Allow registering local expansions

This allows a MacroExpander also to describe an expansion it can
do which was restricted to the global VariableManager only.

The global is now just a thin (unneeded) wrapper about new "standard"
functionality.

Change-Id: Ida7ca70cf3d319eae4220ea8d12f3dd1c0d4042c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
hjk
2014-10-13 12:49:05 +02:00
parent e43af30faa
commit e279c7e007
35 changed files with 475 additions and 525 deletions

View File

@@ -4402,7 +4402,7 @@ void GdbEngine::abortDebugger()
void GdbEngine::resetInferior()
{
if (!startParameters().commandsForReset.isEmpty()) {
QByteArray substitutedCommands = VariableManager::expandedString(
QByteArray substitutedCommands = globalMacroExpander()->expandedString(
QString::fromLatin1(startParameters().commandsForReset)).toLatin1();
foreach (QByteArray command, substitutedCommands.split('\n')) {
command = command.trimmed();
@@ -4453,7 +4453,7 @@ void GdbEngine::handleInferiorPrepared()
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
if (!sp.commandsAfterConnect.isEmpty()) {
QByteArray substitutedCommands = VariableManager::expandedString(QString::fromLatin1(sp.commandsAfterConnect)).toLatin1();
QByteArray substitutedCommands = globalMacroExpander()->expandedString(QString::fromLatin1(sp.commandsAfterConnect)).toLatin1();
foreach (QByteArray command, substitutedCommands.split('\n')) {
postCommand(command);
}