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

Function createTileWorkspace

app/src/AI/ToolDispatcher.cpp:1523–1534  ·  view source on GitHub ↗

* @brief Creates a new workspace by title, recording the step. */

Source from the content-addressed store, hash-verified

1521 * @brief Creates a new workspace by title, recording the step.
1522 */
1523static QJsonObject createTileWorkspace(const QString& title, QJsonArray& steps)
1524{
1525 QJsonObject addWsArgs;
1526 addWsArgs[QStringLiteral("title")] = title;
1527 const auto addWsReply = runCommand(QStringLiteral("project.workspace.add"), addWsArgs);
1528 steps.append(QJsonObject{
1529 { QStringLiteral("command"), QStringLiteral("project.workspace.add")},
1530 { QStringLiteral("ok"), addWsReply.value(QStringLiteral("ok")).toBool()},
1531 {QStringLiteral("arguments"), addWsArgs}
1532 });
1533 return addWsReply;
1534}
1535
1536/**
1537 * @brief Resolves a workspace from args, optionally creating one when allowed.

Callers 1

Calls 3

runCommandFunction · 0.85
appendMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected