summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgetlinecontrol_p.h
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2014-12-05 10:22:28 +0100
committerAndy Shaw <andy.shaw@digia.com>2014-12-19 15:55:07 +0100
commita07120d496c43d45792dc5ca92d93eea37f32cec (patch)
treeb1f7646e5e32b68a96def7be1c01d9ee0ab983cd /src/widgets/widgets/qwidgetlinecontrol_p.h
parent7393bb0af4c98cabef3138e4db60692e70d4c444 (diff)
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 <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h2
1 files changed, 1 insertions, 1 deletions
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);