romangg accepted this revision. romangg added inline comments. This revision is now accepted and ready to land.
INLINE COMMENTS > remote_access_interface.cpp:244 > > - QObject::connect(rbuf, &QObject::destroyed, [p, rbuf, resource, &bh] { > + QObject::connect(rbuf, &Resource::aboutToBeUnbound, p->q, [p, rbuf, > resource, &bh] { > if (!p->clientResources.contains(resource)) { Why `p->q`? Isn't just `p` enough? Or since `getBufferCallback` is static, leave the slot without object relation? Just connect to the functor as before. But in the end that all doesn't matter much. > remote_access_interface.cpp:251 > qCDebug(KWAYLAND_SERVER) << "Remote buffer returned, client" << > wl_resource_get_id(resource) > << ", id" << rbuf->id() > << ", fd" << > bh.buf->fd(); If the problem is only this call to id(), then maybe one could just hand over this value to the lambda instead of accessing `rbuf`. But connecting to the `aboutToBeUnbound` signal is also fine. REPOSITORY R127 KWayland BRANCH dave REVISION DETAIL https://phabricator.kde.org/D14291 To: davidedmundson, #kwin, romangg Cc: romangg, kde-frameworks-devel, michaelh, ngraham, bruns