forked from qt-creator/qt-creator
Use new FilePathAspect in a few more places
Change-Id: I910a802255c8d54a31313dcccb0d1a48ec577b7a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -68,7 +68,7 @@ ConanInstallStep::ConanInstallStep(BuildStepList *bsl, Id id)
|
||||
const QString buildType = bt == BuildConfiguration::Release ? QString("Release")
|
||||
: QString("Debug");
|
||||
|
||||
CommandLine cmd(ConanPlugin::conanSettings()->conanFilePath.filePath());
|
||||
CommandLine cmd(ConanPlugin::conanSettings()->conanFilePath());
|
||||
cmd.addArgs({"install", "-s", "build_type=" + buildType});
|
||||
if (buildMissing->value())
|
||||
cmd.addArg("--build=missing");
|
||||
|
@@ -16,7 +16,6 @@ ConanSettings::ConanSettings()
|
||||
|
||||
registerAspect(&conanFilePath);
|
||||
conanFilePath.setSettingsKey("ConanFilePath");
|
||||
conanFilePath.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
conanFilePath.setExpectedKind(PathChooser::ExistingCommand);
|
||||
conanFilePath.setDefaultValue(HostOsInfo::withExecutableSuffix("conan"));
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@ class ConanSettings : public Utils::AspectContainer
|
||||
public:
|
||||
ConanSettings();
|
||||
|
||||
Utils::StringAspect conanFilePath;
|
||||
Utils::FilePathAspect conanFilePath;
|
||||
};
|
||||
|
||||
} // Conan::Internal
|
||||
|
@@ -56,8 +56,8 @@ void CopilotPlugin::extensionsInitialized()
|
||||
void CopilotPlugin::restartClient()
|
||||
{
|
||||
LanguageClient::LanguageClientManager::shutdownClient(m_client);
|
||||
m_client = new CopilotClient(CopilotSettings::instance().nodeJsPath.filePath(),
|
||||
CopilotSettings::instance().distPath.filePath());
|
||||
m_client = new CopilotClient(CopilotSettings::instance().nodeJsPath(),
|
||||
CopilotSettings::instance().distPath());
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -36,10 +36,10 @@ CopilotSettings::CopilotSettings()
|
||||
return fp.exists();
|
||||
});
|
||||
|
||||
registerAspect(&nodeJsPath);
|
||||
nodeJsPath.setExpectedKind(PathChooser::ExistingCommand);
|
||||
nodeJsPath.setDefaultFilePath(nodeFromPath);
|
||||
nodeJsPath.setSettingsKey("Copilot.NodeJsPath");
|
||||
nodeJsPath.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
nodeJsPath.setLabelText(Tr::tr("Node.js path:"));
|
||||
nodeJsPath.setHistoryCompleter("Copilot.NodePath.History");
|
||||
nodeJsPath.setDisplayName(Tr::tr("Node.js Path"));
|
||||
@@ -47,26 +47,23 @@ CopilotSettings::CopilotSettings()
|
||||
Tr::tr("Select path to node.js executable. See https://nodejs.org/de/download/"
|
||||
"for installation instructions."));
|
||||
|
||||
registerAspect(&distPath);
|
||||
distPath.setExpectedKind(PathChooser::File);
|
||||
distPath.setDefaultFilePath(distFromVim);
|
||||
distPath.setSettingsKey("Copilot.DistPath");
|
||||
distPath.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
distPath.setLabelText(Tr::tr("Path to agent.js:"));
|
||||
distPath.setHistoryCompleter("Copilot.DistPath.History");
|
||||
distPath.setDisplayName(Tr::tr("Agent.js path"));
|
||||
distPath.setToolTip(Tr::tr(
|
||||
"Select path to agent.js in copilot neovim plugin. See "
|
||||
"https://github.com/github/copilot.vim#getting-started for installation instructions."));
|
||||
distPath.setHistoryCompleter("Copilot.DistPath.History");
|
||||
distPath.setDisplayName(Tr::tr("Agent.js path"));
|
||||
|
||||
registerAspect(&autoComplete);
|
||||
autoComplete.setDisplayName(Tr::tr("Auto Complete"));
|
||||
autoComplete.setLabelText(Tr::tr("Request completions automatically"));
|
||||
autoComplete.setDefaultValue(true);
|
||||
autoComplete.setToolTip(Tr::tr("Automatically request suggestions for the current text cursor "
|
||||
"position after changes to the document"));
|
||||
|
||||
registerAspect(&nodeJsPath);
|
||||
registerAspect(&distPath);
|
||||
registerAspect(&autoComplete);
|
||||
}
|
||||
|
||||
} // namespace Copilot
|
||||
|
@@ -14,8 +14,8 @@ public:
|
||||
|
||||
static CopilotSettings &instance();
|
||||
|
||||
Utils::StringAspect nodeJsPath;
|
||||
Utils::StringAspect distPath;
|
||||
Utils::FilePathAspect nodeJsPath;
|
||||
Utils::FilePathAspect distPath;
|
||||
Utils::BoolAspect autoComplete;
|
||||
};
|
||||
|
||||
|
@@ -33,7 +33,6 @@ SubversionSettings::SubversionSettings()
|
||||
setSettingsGroup("Subversion");
|
||||
|
||||
registerAspect(&binaryPath);
|
||||
binaryPath.setDisplayStyle(StringAspect::PathChooserDisplay);
|
||||
binaryPath.setExpectedKind(PathChooser::ExistingCommand);
|
||||
binaryPath.setHistoryCompleter("Subversion.Command.History");
|
||||
binaryPath.setDefaultValue("svn" QTC_HOST_EXE_SUFFIX);
|
||||
|
Reference in New Issue
Block a user