* @brief Installs deviceWrite() as a Lua global with @p defaultSourceId in its upvalue. */
| 191 | * @brief Installs deviceWrite() as a Lua global with @p defaultSourceId in its upvalue. |
| 192 | */ |
| 193 | void DataModel::DeviceWriteApi::installLua(lua_State* L, int defaultSourceId) |
| 194 | { |
| 195 | Q_ASSERT(L); |
| 196 | |
| 197 | lua_pushinteger(L, defaultSourceId); |
| 198 | lua_pushcclosure(L, luaDeviceWrite, 1); |
| 199 | lua_setglobal(L, "deviceWrite"); |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * @brief Installs deviceWrite() into a QJSEngine, reusing the bridge if already attached. |
nothing calls this directly
no test coverage detected