aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/terminal
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2024-01-26 10:33:29 +0100
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2024-01-26 10:10:03 +0000
commita25bbf23c64c912b39bf2020df73c0db97b5bc40 (patch)
tree996eae63feed1022ae36b463050c0097db92a216 /src/plugins/terminal
parent56f42c319e51bb3ef7f52487d9977a2a20749d69 (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 <hjk@qt.io>
Diffstat (limited to 'src/plugins/terminal')
-rw-r--r--src/plugins/terminal/shellintegration.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp
index e989f02dd3b..60b08de5917 100644
--- a/src/plugins/terminal/shellintegration.cpp
+++ b/src/plugins/terminal/shellintegration.cpp
@@ -184,17 +184,13 @@ void ShellIntegration::prepareProcess(Utils::Process &process)
rcPath.copyFile(tmpRc);
env.set("CLINK_HISTORY_LABEL", "QtCreator");
- env.appendOrSet("CLINK_PATH",
- tmpRc.parentDir().nativePath(),
- OsSpecificAspects::pathListSeparator(env.osType()));
+ env.appendOrSet("CLINK_PATH", tmpRc.parentDir().nativePath());
} else if (cmd.executable().baseName() == "fish") {
FilePath xdgDir = FilePath::fromUserInput(m_tempDir.filePath("fish_xdg_data"));
FilePath subDir = xdgDir.resolvePath(QString("fish/vendor_conf.d"));
QTC_ASSERT(subDir.createDir(), return);
filesToCopy.fish.script.copyFile(subDir.resolvePath(filesToCopy.fish.script.fileName()));
- env.appendOrSet("XDG_DATA_DIRS",
- xdgDir.toUserOutput(),
- OsSpecificAspects::pathListSeparator(env.osType()));
+ env.appendOrSet("XDG_DATA_DIRS", xdgDir.toUserOutput());
}
process.setCommand(cmd);