| 269 | }; |
| 270 | |
| 271 | KeepAliveWidget::~KeepAliveWidget() |
| 272 | { |
| 273 | // if the container is still valid, unparent it to prevent it from getting deleted |
| 274 | // this happens when the user removes a tool view |
| 275 | // on shutdown, the container does get deleted, thus we must guard against that. |
| 276 | if (m_factory->container()) { |
| 277 | Q_ASSERT(m_factory->container()->parentWidget() == this); |
| 278 | m_factory->container()->setParent(nullptr); |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | namespace LspPlugin { |
| 283 | /** |