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

Method tableSetH

app/src/DataModel/DataTable.cpp:678–691  ·  view source on GitHub ↗

* @brief Writes a value to a computed register by handle. An undefined or null value is a safe * no-op, matching the Lua bridge's nil handling. */

Source from the content-addressed store, hash-verified

676 * no-op, matching the Lua bridge's nil handling.
677 */
678void DataModel::TableApiBridge::tableSetH(qint64 h, const QVariant& v)
679{
680 Q_ASSERT(store);
681
682 if (!v.isValid() || v.typeId() == QMetaType::Nullptr)
683 return;
684
685 DataModel::RegisterValue rv;
686 rv.numericValue = SerialStudio::toDouble(v, &rv.isNumeric);
687 if (!rv.isNumeric)
688 rv.stringValue = v.toString();
689
690 store->setByHandle(h, rv);
691}
692
693/**
694 * @brief Returns the raw (pre-transform) value of a dataset.

Callers 2

prelude.jsFile · 0.80
SerialStudio.jsFile · 0.80

Calls 2

setByHandleMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected