forked from qt-creator/qt-creator
LanguageServer: Use Utils::CommandLine in StdIOClientInterface
Change-Id: Ic2516387d7308bfad05cef54467c417cc47a7655 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -111,14 +111,9 @@ bool StdIOClientInterface::start()
|
||||
return true;
|
||||
}
|
||||
|
||||
void StdIOClientInterface::setExecutable(const QString &executable)
|
||||
void StdIOClientInterface::setCommandLine(const Utils::CommandLine &cmd)
|
||||
{
|
||||
m_process.setProgram(executable);
|
||||
}
|
||||
|
||||
void StdIOClientInterface::setArguments(const QString &arguments)
|
||||
{
|
||||
m_process.setArguments(Utils::QtcProcess::splitArgs(arguments));
|
||||
m_process.setCommand(cmd);
|
||||
}
|
||||
|
||||
void StdIOClientInterface::setWorkingDirectory(const QString &workingDirectory)
|
||||
|
||||
@@ -79,8 +79,7 @@ public:
|
||||
bool start() override;
|
||||
|
||||
// These functions only have an effect if they are called before start
|
||||
void setExecutable(const QString &executable);
|
||||
void setArguments(const QString &arguments);
|
||||
void setCommandLine(const Utils::CommandLine &cmd);
|
||||
void setWorkingDirectory(const QString &workingDirectory);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -736,8 +736,7 @@ Utils::CommandLine StdIOSettings::command() const
|
||||
BaseClientInterface *StdIOSettings::createInterface() const
|
||||
{
|
||||
auto interface = new StdIOClientInterface;
|
||||
interface->setExecutable(m_executable);
|
||||
interface->setArguments(arguments());
|
||||
interface->setCommandLine(command());
|
||||
return interface;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user