* @brief Reads a value from a QJsonObject based on a key, returning a default value if the key does * not exist. */
| 258 | * not exist. |
| 259 | */ |
| 260 | [[nodiscard]] inline QVariant ss_jsr(const QJsonObject& object, |
| 261 | QLatin1StringView key, |
| 262 | const QVariant& defaultValue) |
| 263 | { |
| 264 | if (object.contains(key)) |
| 265 | return object.value(key); |
| 266 | |
| 267 | return defaultValue; |
| 268 | } |
| 269 | |
| 270 | //-------------------------------------------------------------------------------------------------- |
| 271 | // Action structure |
no test coverage detected