revert the change to allocate the dialog on the stack, the original code was that way for a reason:
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
there's some other minor issues with the patch set, but I don't think they're going to cause crashes.