diff options
author | hjk <hjk121@nokiamail.com> | 2014-10-15 14:45:31 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-10-16 16:32:58 +0200 |
commit | ef563d8085752708d9b623ab50bc42cdd69a3262 (patch) | |
tree | d3581f2c1aa57e06c03414e280c5130755b72435 /src/plugins/debugger | |
parent | 89602419c45f4fcbab922c8b218f0602608d3a9b (diff) | |
download | qt-creator-ef563d8085752708d9b623ab50bc42cdd69a3262.tar.gz |
MacroExpander: Fall back to global expander
... and use that all over the place.
Change-Id: Ie6e0ed0f0d9eaba9b4466761e6b455f33a905086
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/debuggerengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 9 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index c57299016b..7ae1079064 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1836,7 +1836,7 @@ void DebuggerEngine::validateExecutable(DebuggerStartParameters *sp) SourcePathRegExpMap globalRegExpSourceMap; globalRegExpSourceMap.reserve(options->sourcePathRegExpMap.size()); foreach (auto entry, options->sourcePathRegExpMap) { - const QString expanded = Utils::globalMacroExpander()->expandedString(entry.second); + const QString expanded = Utils::globalMacroExpander()->expand(entry.second); if (!expanded.isEmpty()) globalRegExpSourceMap.push_back(qMakePair(entry.first, expanded)); } diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index d0bce30168..a7b233c15a 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -3334,7 +3334,7 @@ bool boolSetting(int code) QString stringSetting(int code) { QString raw = theDebuggerCore->m_debuggerSettings->item(code)->value().toString(); - return globalMacroExpander()->expandedString(raw); + return globalMacroExpander()->expand(raw); } QStringList stringListSetting(int code) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 392e1cc8f8..92c0b26d26 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4404,9 +4404,8 @@ void GdbEngine::abortDebugger() void GdbEngine::resetInferior() { if (!startParameters().commandsForReset.isEmpty()) { - QByteArray substitutedCommands = globalMacroExpander()->expandedString( - QString::fromLatin1(startParameters().commandsForReset)).toLatin1(); - foreach (QByteArray command, substitutedCommands.split('\n')) { + QByteArray commands = globalMacroExpander()->expand(startParameters().commandsForReset); + foreach (QByteArray command, commands.split('\n')) { command = command.trimmed(); if (!command.isEmpty()) { if (state() == InferiorStopOk) { @@ -4455,8 +4454,8 @@ void GdbEngine::handleInferiorPrepared() QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); if (!sp.commandsAfterConnect.isEmpty()) { - QByteArray substitutedCommands = globalMacroExpander()->expandedString(QString::fromLatin1(sp.commandsAfterConnect)).toLatin1(); - foreach (QByteArray command, substitutedCommands.split('\n')) { + QByteArray commands = globalMacroExpander()->expand(sp.commandsAfterConnect); + foreach (QByteArray command, commands.split('\n')) { postCommand(command); } } |