| 449 | } |
| 450 | |
| 451 | bool UITheme::WriteToFile(const std::string& path) const |
| 452 | { |
| 453 | auto jsonTheme = ToJson(); |
| 454 | bool result; |
| 455 | try |
| 456 | { |
| 457 | Json::WriteToFile(path.c_str(), jsonTheme); |
| 458 | result = true; |
| 459 | } |
| 460 | catch (const std::exception& ex) |
| 461 | { |
| 462 | LOG_ERROR("Unable to save %s: %s", path.c_str(), ex.what()); |
| 463 | result = false; |
| 464 | } |
| 465 | |
| 466 | return result; |
| 467 | } |
| 468 | |
| 469 | UITheme* UITheme::FromJson(json_t& jsonObj) |
| 470 | { |
no test coverage detected