Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private
This commit is contained in:
parent
8d005bc820
commit
94f9bbefd7
1 changed files with 1 additions and 2 deletions
|
|
@ -27,7 +27,6 @@ namespace Platform {
|
|||
|
||||
struct WaylandIntegration::Private : public AutoDestroyer<QtWayland::wl_registry> {
|
||||
std::optional<uint32_t> xdgDecoration;
|
||||
rpl::lifetime lifetime;
|
||||
|
||||
protected:
|
||||
void registry_global(
|
||||
|
|
@ -73,7 +72,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