* @brief Load the saved layout from the project (via WindowManager::loadLayout). */
| 444 | * @brief Load the saved layout from the project (via WindowManager::loadLayout). |
| 445 | */ |
| 446 | API::CommandResponse API::Handlers::WindowHandler::loadLayout(const QString& id, |
| 447 | const QJsonObject& params) |
| 448 | { |
| 449 | Q_UNUSED(params) |
| 450 | |
| 451 | auto* wm = UI::UISessionRegistry::instance().primaryWindowManager(); |
| 452 | if (!wm) |
| 453 | return noSession(id); |
| 454 | |
| 455 | QMetaObject::invokeMethod(wm, [wm]() { wm->loadLayout(); }); |
| 456 | |
| 457 | return CommandResponse::makeSuccess(id); |
| 458 | } |
| 459 | |
| 460 | /** |
| 461 | * @brief Return the serialized layout JSON from WindowManager. |
nothing calls this directly
no test coverage detected