Destroy all kwayland objects created by registry when it is destroyed
ClosedPublic

Authored by davidedmundson on Jul 15 2017, 8:01 PM.

Details

Summary

Currently one has to connect every object manually to connectionDied,
which is something we can do for them.

If the user also has a connection, the second will just no-op.

Will add some awesome docs / unit tests if you're into the idea.

Test Plan

Commit 2:
Emit connectionDied if the QPA owns the connection and is destroyed.

We have a few objects that linger longer than the qApp.
I've got a crash in plasmashell, and I've had a crash with breeze wrapping
a dangly menu in konversation. This should fix those.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Jul 15 2017, 8:01 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptJul 15 2017, 8:01 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript

I like the idea! That would basically allow us to abandon D6571 and would also solve the issues we see with the kwayland-integration plugin which can crash applications on exit.

May I ask for a small unit test for the new functionality?

We still need D6571, with my proposed change. That's a special case where we delete the connection before the QPA.
My added connect means that we get that signal regardless of whether we're in Kwin or not.

What we wouldn't need is the ownership changes you did for Breeze (and would otherwise still need doing in Oxygen/QtCurve )

May I ask for a small unit test for the new functionality?

For you, a *big* unit test.

We still need D6571, with my proposed change. That's a special case where we delete the connection before the QPA.

It might be that we don't need it. Also KWin destroys the QPA and maybe that's sufficient - Breeze has it's own ConnectionThread which is not shared with KWin's.

My added connect means that we get that signal regardless of whether we're in Kwin or not.

What we wouldn't need is the ownership changes you did for Breeze (and would otherwise still need doing in Oxygen/QtCurve )

May I ask for a small unit test for the new functionality?

For you, a *big* unit test.

Just extend the existing ones - that should do and is hopefully small ;-)

Updated docs + unit test

graesslin accepted this revision.Jul 27 2017, 5:30 PM
This revision is now accepted and ready to land.Jul 27 2017, 5:30 PM
This revision was automatically updated to reflect the committed changes.