forked from qt-creator/qt-creator
QmlDesigner: Convert translation functions
This converts the translation functions when dragging in items from the library. Task-number: QDS-7598 Change-Id: Iaed0f6683c2083e1d103ddfc07fe7ba2a2e9224c Reviewed-by: Aleksei German <aleksei.german@qt.io>
This commit is contained in:
@@ -292,7 +292,8 @@ QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
|||||||
|
|
||||||
for (const auto &property : itemLibraryEntry.properties()) {
|
for (const auto &property : itemLibraryEntry.properties()) {
|
||||||
if (property.type() == "binding") {
|
if (property.type() == "binding") {
|
||||||
propertyBindingList.append(PropertyBindingEntry(property.name(), property.value().toString()));
|
const QString value = QmlObjectNode::convertToCorrectTranslatableFunction(property.value().toString());
|
||||||
|
propertyBindingList.append(PropertyBindingEntry(property.name(), value));
|
||||||
} else if (property.type() == "enum") {
|
} else if (property.type() == "enum") {
|
||||||
propertyEnumList.append(PropertyBindingEntry(property.name(), property.value().toString()));
|
propertyEnumList.append(PropertyBindingEntry(property.name(), property.value().toString()));
|
||||||
} else if (property.value().toString() == QString::fromLatin1(imagePlaceHolder)) {
|
} else if (property.value().toString() == QString::fromLatin1(imagePlaceHolder)) {
|
||||||
|
Reference in New Issue
Block a user