Commit Graph

4 Commits

Author SHA1 Message Date
Robert Adam
4e1129b6ed REFAC(client): Put qsslStringConversion to QtUtils
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.
2021-03-06 18:57:22 +01:00
Robert Adam
7205cdea60 REFAC: Use namespace for QtUtils 2021-03-06 18:57:22 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert Adam
cc3c824499 FIX(client,ui): Crash by pressing Esc in nickname dialog
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
2021-01-04 12:39:28 +01:00