mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 06:07:45 +00:00
Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private
This commit is contained in:
parent
7dbf331e18
commit
ad87c2a15e
@ -42,7 +42,6 @@ struct WaylandIntegration::Private : public AutoDestroyer<QtWayland::wl_registry
|
|||||||
QtWayland::org_kde_plasma_surface plasmaSurface(QWindow *window);
|
QtWayland::org_kde_plasma_surface plasmaSurface(QWindow *window);
|
||||||
|
|
||||||
std::optional<PlasmaShell> plasmaShell;
|
std::optional<PlasmaShell> plasmaShell;
|
||||||
rpl::lifetime lifetime;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void registry_global(
|
void registry_global(
|
||||||
@ -129,7 +128,7 @@ WaylandIntegration *WaylandIntegration::Instance() {
|
|||||||
&QObject::destroyed
|
&QObject::destroyed
|
||||||
) | rpl::start_with_next([] {
|
) | rpl::start_with_next([] {
|
||||||
instance = std::nullopt;
|
instance = std::nullopt;
|
||||||
}, instance->_private->lifetime);
|
}, instance->_private->lifetime());
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
if (!instance) return nullptr;
|
if (!instance) return nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user