* @brief Lua C closure for actionFire(actionId) returning {ok, error?}. */
| 280 | * @brief Lua C closure for actionFire(actionId) returning {ok, error?}. |
| 281 | */ |
| 282 | static int luaActionFire(lua_State* L) |
| 283 | { |
| 284 | if (!lua_isnumber(L, 1)) { |
| 285 | pushLuaResult(L, false, QStringLiteral("actionFire: actionId must be a number")); |
| 286 | return 1; |
| 287 | } |
| 288 | |
| 289 | const int actionId = static_cast<int>(lua_tointeger(L, 1)); |
| 290 | QString errorMsg; |
| 291 | const bool ok = fireActionByPublicId(actionId, errorMsg); |
| 292 | pushLuaResult(L, ok, errorMsg); |
| 293 | return 1; |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * @brief Installs actionFire() as a Lua global. |
nothing calls this directly
no test coverage detected