mooltipass / moolticute

Mooltipass crossplatform daemon/tools
GNU General Public License v3.0
143 stars 67 forks source link

[BLE] Fix saving credential without password Qt6 #1117

Closed deXol closed 1 year ago

deXol commented 1 year ago

Issue:

When I wanted to save a credential without password and one of the QLineEdit widget is in the focus then the Save button is enabled even after Alt key is released. In Qt6 the keyReleaseEvent is not received in CredentialsWidget.

Fix:

QLineEdit keyReleaseEvent was overwritten in Qt6. In Qt5 and before this was handled in event function. The problem in Qt6 they are not calling keyReleaseEvent's parent function, so the event is not delegated to the parent classes, therefor in CredentialsWidget we are not getting this event. I created a new subclass (SimpleLineEdit) where I am calling the parent's (QWidget) keyReleaseEvent function from the overwritten one. I am using this SimpleLineEdit for the adding credentials UIs.