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

Function makeJsResult

app/src/DataModel/Scripting/DashboardApi.cpp:60–68  ·  view source on GitHub ↗

* @brief Builds a JS-style {ok, error?} map. */

Source from the content-addressed store, hash-verified

58 * @brief Builds a JS-style {ok, error?} map.
59 */
60static QVariantMap makeJsResult(bool ok, const QString& errorMsg)
61{
62 QVariantMap result;
63 result.insert(QStringLiteral("ok"), ok);
64 if (!ok)
65 result.insert(QStringLiteral("error"), errorMsg);
66
67 return result;
68}
69
70//--------------------------------------------------------------------------------------------------
71// Core operations (main-thread only: parser + transform engines both run on main)

Callers 4

clearPlotsMethod · 0.85
setPlotPointsMethod · 0.85
setVisibilityJsFunction · 0.85
setActiveWorkspaceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected