Fix crash on certain pdf actions
The Qt6 port left sometimes a deleted pointer behind to be dereferenced later.
Fix this by leveraging smartpointers.
Also clean up the related code to be a bit more specific about data deletion
The Qt6 port left sometimes a deleted pointer behind to be dereferenced later.
Fix this by leveraging smartpointers.
Also clean up the related code to be a bit more specific about data deletion