summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.cpp2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp13
2 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp
index 8868d53..485983e 100644
--- a/src/plugins/accessible/widgets/rangecontrols.cpp
+++ b/src/plugins/accessible/widgets/rangecontrols.cpp
@@ -212,7 +212,7 @@ QVariant QAccessibleAbstractSpinBox::currentValue()
void QAccessibleAbstractSpinBox::setCurrentValue(const QVariant &value)
{
- abstractSpinBox()->setProperty("setValue", value);
+ abstractSpinBox()->setProperty("value", value);
}
QVariant QAccessibleAbstractSpinBox::maximumValue()
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 1b10a7b..ad56cbd 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 */
@@ -801,6 +808,10 @@ QString QAccessibleLineEdit::text(int startOffset, int endOffset)
{
if (startOffset > endOffset)
return QString();
+
+ if (lineEdit()->echoMode() != QLineEdit::Normal)
+ return QString();
+
return lineEdit()->text().mid(startOffset, endOffset - startOffset);
}