mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private
This commit is contained in:
parent
7dbf331e18
commit
ad87c2a15e
1 changed files with 1 additions and 2 deletions
|
@ -42,7 +42,6 @@ struct WaylandIntegration::Private : public AutoDestroyer<QtWayland::wl_registry
|
|||
QtWayland::org_kde_plasma_surface plasmaSurface(QWindow *window);
|
||||
|
||||
std::optional<PlasmaShell> plasmaShell;
|
||||
rpl::lifetime lifetime;
|
||||
|
||||
protected:
|
||||
void registry_global(
|
||||
|
@ -129,7 +128,7 @@ WaylandIntegration *WaylandIntegration::Instance() {
|
|||
&QObject::destroyed
|
||||
) | rpl::start_with_next([] {
|
||||
instance = std::nullopt;
|
||||
}, instance->_private->lifetime);
|
||||
}, instance->_private->lifetime());
|
||||
return true;
|
||||
}();
|
||||
if (!instance) return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue