diff options
Diffstat (limited to 'src/plugins/accessible/widgets/simplewidgets.cpp')
-rw-r--r-- | src/plugins/accessible/widgets/simplewidgets.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp index aa64630..ac40aef 100644 --- a/src/plugins/accessible/widgets/simplewidgets.cpp +++ b/src/plugins/accessible/widgets/simplewidgets.cpp @@ -703,7 +703,14 @@ void QAccessibleLineEdit::setText(Text t, int control, const QString &text) QAccessibleWidgetEx::setText(t, control, text); return; } - lineEdit()->setText(text); + + QString newText = text; + if (lineEdit()->validator()) { + int pos = 0; + if (lineEdit()->validator()->validate(newText, pos) != QValidator::Acceptable) + return; + } + lineEdit()->setText(newText); } /*! \reimp */ |