forked from qt-creator/qt-creator
Utils: Make FilePathAspect::setDefaultValue take a QString
This sets the unexpanded value, so going to a "cooked" FilePath can at least theoretically break. On the user side it saves a roundtrip in a few cases, but is more ugly when the input is already a proper FilePath. Change-Id: I8a7e8f6d46fcc34c96b55e41d656dca933fbef4e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -56,7 +56,7 @@ CopilotSettings::CopilotSettings()
|
||||
const FilePath distFromVim = findOrDefault(searchDirs, &FilePath::exists);
|
||||
|
||||
nodeJsPath.setExpectedKind(PathChooser::ExistingCommand);
|
||||
nodeJsPath.setDefaultValue(nodeFromPath);
|
||||
nodeJsPath.setDefaultValue(nodeFromPath.toUserOutput());
|
||||
nodeJsPath.setSettingsKey("Copilot.NodeJsPath");
|
||||
nodeJsPath.setLabelText(Tr::tr("Node.js path:"));
|
||||
nodeJsPath.setHistoryCompleter("Copilot.NodePath.History");
|
||||
@@ -66,7 +66,7 @@ CopilotSettings::CopilotSettings()
|
||||
"for installation instructions."));
|
||||
|
||||
distPath.setExpectedKind(PathChooser::File);
|
||||
distPath.setDefaultValue(distFromVim);
|
||||
distPath.setDefaultValue(distFromVim.toUserOutput());
|
||||
distPath.setSettingsKey("Copilot.DistPath");
|
||||
distPath.setLabelText(Tr::tr("Path to agent.js:"));
|
||||
distPath.setHistoryCompleter("Copilot.DistPath.History");
|
||||
|
||||
Reference in New Issue
Block a user