diff options
author | Marcus Tillmanns <[email protected]> | 2024-01-26 10:33:29 +0100 |
---|---|---|
committer | Marcus Tillmanns <[email protected]> | 2024-01-26 10:10:03 +0000 |
commit | a25bbf23c64c912b39bf2020df73c0db97b5bc40 (patch) | |
tree | 996eae63feed1022ae36b463050c0097db92a216 /src/plugins/debugger/cdb | |
parent | 56f42c319e51bb3ef7f52487d9977a2a20749d69 (diff) |
Utils: Fix error prone default value of appendOrSet
It was not readily clear that Environment::appendOrSet/prependOrSet
needed a value for "sep", otherwise it would just concat the values without separator. This got apparent when looking at usages of
appendOrSet.
Instead there are now three options, "Auto", "Colon" or "Semicolon"
with the default being "Auto", which determines the separator based on
the Environment::OsType.
Usages of appendOrSet and prependOrSet are also fixed with this commit.
Change-Id: I868e14ce38f50be9cd07292fe3f22663a62d116d
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/cdb')
-rw-r--r-- | src/plugins/debugger/cdb/cdbengine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 90035878533..68a9c9f2301 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -410,11 +410,10 @@ void CdbEngine::setupEngine() inferiorEnvironment.set(qtLoggingToConsoleKey, "0"); static const char cdbExtensionPathVariableC[] = "_NT_DEBUGGER_EXTENSION_PATH"; - const QString pSep = OsSpecificAspects::pathListSeparator(Utils::OsTypeWindows); - inferiorEnvironment.prependOrSet(cdbExtensionPathVariableC, extensionFi.absolutePath(), pSep); + inferiorEnvironment.prependOrSet(cdbExtensionPathVariableC, extensionFi.absolutePath()); const QString oldCdbExtensionPath = qtcEnvironmentVariable(cdbExtensionPathVariableC); if (!oldCdbExtensionPath.isEmpty()) - inferiorEnvironment.appendOrSet(cdbExtensionPathVariableC, oldCdbExtensionPath, pSep); + inferiorEnvironment.appendOrSet(cdbExtensionPathVariableC, oldCdbExtensionPath); m_process.setEnvironment(inferiorEnvironment); if (!sp.inferior.workingDirectory.isEmpty()) |