* @brief Save the current layout to the project (via Taskbar::saveLayout). */
| 427 | * @brief Save the current layout to the project (via Taskbar::saveLayout). |
| 428 | */ |
| 429 | API::CommandResponse API::Handlers::WindowHandler::saveLayout(const QString& id, |
| 430 | const QJsonObject& params) |
| 431 | { |
| 432 | Q_UNUSED(params) |
| 433 | |
| 434 | auto* taskbar = UI::UISessionRegistry::instance().primaryTaskbar(); |
| 435 | if (!taskbar) |
| 436 | return noSession(id); |
| 437 | |
| 438 | QMetaObject::invokeMethod(taskbar, [taskbar]() { taskbar->saveLayout(); }); |
| 439 | |
| 440 | return CommandResponse::makeSuccess(id); |
| 441 | } |
| 442 | |
| 443 | /** |
| 444 | * @brief Load the saved layout from the project (via WindowManager::loadLayout). |
nothing calls this directly
no test coverage detected