From a07120d496c43d45792dc5ca92d93eea37f32cec Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 5 Dec 2014 10:22:28 +0100 Subject: Don't clear lineedit in non normal echo mode when validation is invalid This fixes a regression introduced with c09e9f71173a698670d6c728291ee24f53d50800 which caused the lineedit to clear the whole text when an invalid character was entered into a lineedit with an echo mode that was not Normal and a validator was set. Now if undo() is called directly then it will still clear the text as it is considered to be called as a user. Whereas the validation will take care of the invalid entry by using internalUndo() as before which avoids the clearing of the entire text. Task-number: QTBUG-29318 Change-Id: I5ff5777a75ab864de2217441b5f518f50646bd8f Reviewed-by: Friedemann Kleint Reviewed-by: Giuseppe D'Angelo --- src/widgets/widgets/qwidgetlinecontrol_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h') diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index f21d88177c..49d9413fc0 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -245,7 +245,7 @@ public: void insert(const QString &); void clear(); - void undo() { internalUndo(); finishChange(-1, true); } + void undo(); void redo() { internalRedo(); finishChange(); } void selectWordAtPos(int); -- cgit v1.2.3