Skip to content

KPasswordLineEdit: honor revealPasswordAvailable also for existing passwords

The KDE HIG recommends: " Provide a “Show password” checkbox to unmask the password both when setting new and when entering existing passwords. "

Also does the API dox of KPasswordLineEdit not specify that feature being exclusive when starting with an empty password, it just states "Whether to show the visibility trailing action in the line edit."

Enabling the feature for existing passwords also yields consistency with the logic of Plasma/Kirigami QtQuick components (which though also honor directly KAuthorized.authorize("lineedit_reveal_password") on enabling the feature itself, whereas KWidgetsAddons classes rely on the developer to explicitly depend on that.

Though things said in docs and thus "API contracts made" are one thing, the other are developers checking the existing behaviour and then relying on it. So there is chance some people rely on existing passwords being hidden away, and instead this should become a opt-in, at least for KF5?

@vkrause @sitter @mlaurent (please add anyone you think who should give input here)

Edited by Friedrich W. H. Kossebau

Merge request reports