QmlDesigner.PropertyEditor: Fixing expressions and tr checkbox
The handling of expressions in states was broken in conjunction with states.
This patch fixes a couple of related issues:
* The notifier of isTranslated (PropertyEditorValue) has to be
expressionChanged, since this property depends on the expression.
* isTranslated() has to return also true if there is only an expression
in the base state. If the string is translated in the base state it
should be translated in other states, too.
* In states the expression set in createPropertyEditorValue() has to be the
expression of the current stateif there is one.
We can not just fall back to instanceValue.
* I did a couple of fixes in LineEdit.qml. We cannot bind checked directly,
since the binding will be deleted when checked is changed by the control.
I removed all code regarding transactions. We react to onEditingFinished,
so it is not required. The translated state is properly preserved now, when
setting the value.
Task-number: QTCREATORBUG-10674
Task-number: QTCREATORBUG-10791
Change-Id: I95721711a37e63c4c7c38e275089d6de0bb92bec
Reviewed-by:
Marco Bubke <marco.bubke@digia.com>
Showing
- share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml 31 additions, 17 deletions...igner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
- src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp 5 additions, 1 deletion...er/components/propertyeditor/propertyeditorqmlbackend.cpp
- src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp 9 additions, 4 deletions...esigner/components/propertyeditor/propertyeditorvalue.cpp
- src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h 1 addition, 1 deletion...ldesigner/components/propertyeditor/propertyeditorvalue.h
Loading
Please register or sign in to comment