| 65 | } |
| 66 | |
| 67 | void View::updateLayout(const std::shared_ptr<Layout> &oldLayout, const std::shared_ptr<Layout> &newLayout) |
| 68 | { |
| 69 | if (oldLayout == newLayout) { |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | if (oldLayout) { |
| 74 | oldLayout->unregisterView(this); |
| 75 | } |
| 76 | |
| 77 | if (newLayout) { |
| 78 | newLayout->registerView(this); |
| 79 | } |
| 80 | |
| 81 | if (oldLayout != newLayout) { |
| 82 | viewCore()->setLayout(newLayout); |
| 83 | } |
| 84 | |
| 85 | for (const auto &child : childViews()) { |
| 86 | child->setFallbackLayout(newLayout); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | std::shared_ptr<Layout> View::getLayout() { return _layout.get(); } |
| 91 |
nothing calls this directly
no test coverage detected