Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.0
-
None
Description
At present, QLineEdit renders CR/LF characters as blank spaces, but the character remains a CR/LF.
QLineEdit is documented as a allowing "the user to enter and edit a single line of plain text with a useful collection of editing functions, including undo and redo, cut and paste, and drag and drop."
It is easily possible to accidentally paste a CR/LF character into a QLineEdit and not know about it as it appears as a blank space.
If this QLineEdit is used to obtain character sensitive strings such as Username/Password and then use this string (via QLineEdit::text()) then the data can be incorrect.
If a QLineEdit is designed specifically for one line of text, then perhaps a CR/LF character has no place in it and should be replaced by (rather than rendered as) a blank space. Perhaps having this as an option would suffice.
If the wish is to preserve formatting of pasted text, this should at the very least be documented.