MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setArguments

Method setArguments

app/src/API/Handlers/ProcessHandler.cpp:150–164  ·  view source on GitHub ↗

* @brief Set the command-line arguments for Launch mode. */

Source from the content-addressed store, hash-verified

148 * @brief Set the command-line arguments for Launch mode.
149 */
150API::CommandResponse API::Handlers::ProcessHandler::setArguments(const QString& id,
151 const QJsonObject& params)
152{
153 if (!params.contains(QStringLiteral("arguments"))) {
154 return CommandResponse::makeError(
155 id, ErrorCode::MissingParam, QStringLiteral("Missing required parameter: arguments"));
156 }
157
158 const QString args = params.value(QStringLiteral("arguments")).toString();
159 IO::ConnectionManager::instance().process()->setArguments(args);
160
161 QJsonObject result;
162 result[QStringLiteral("arguments")] = args;
163 return CommandResponse::makeSuccess(id, result);
164}
165
166/**
167 * @brief Set the working directory for Launch mode.

Callers

nothing calls this directly

Calls 3

containsMethod · 0.45
valueMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected