There was a function for processing QsslStrings in UserInformation.cpp
as well as ViewCert.cpp. These functions were completely identical.
Therefore there were name clashes that appeared when performing a unity
build.
Furthermore duplicating functionality in multiple places in never a good
idea. Thus this commit refactors the code so that both classes now use a
shared implementation in QtUtils.cpp.
When having the dialog open that allows to set a custom nickname to
another client (UserLocalNicknameDialog) pressing Esc would crash
Mumble. This is due to the Esc key triggering the dialog's reject()
function in which the dialog's smart-pointer object is removed from a
global list and therefore goes out of scope.
This results in the dialog getting deleted, but since this is done in a
member function of the dialog, there is still code accessing the now
deleted object (in Qt's internals) and this is causing the segmentation
fault.
The fix is to use a custom deleter function for the dialog pointer that
instead of using delete on it, calls deleteLater() on it. Thus the
deletion of the object is left to Qt which can then do it at a point at
which it is done with it.
As this is something that could get useful in other locations as well,
the custom deleter function was outsourced into its own file.
Fixes#4666