forked from qt-creator/qt-creator
QmlDesigner: Support Layout attached properties and expressions
Change-Id: I4518579364915a91e38c7748857d435a67fd00aa Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
75de75b346
commit
823f7ff8b9
@@ -63,6 +63,11 @@ using namespace QmlJS;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
static inline bool isSupportedAttachedProperties(const QString &propertyName)
|
||||||
|
{
|
||||||
|
return propertyName.startsWith(QLatin1String("Layout."));
|
||||||
|
}
|
||||||
|
|
||||||
static inline QStringList supportedVersionsList()
|
static inline QStringList supportedVersionsList()
|
||||||
{
|
{
|
||||||
QStringList list;
|
QStringList list;
|
||||||
@@ -1294,7 +1299,8 @@ QmlDesigner::PropertyName TextToModelMerger::syncScriptBinding(ModelNode &modelN
|
|||||||
} else { // Not an enum, so:
|
} else { // Not an enum, so:
|
||||||
if (isPropertyChangesType(modelNode.type())
|
if (isPropertyChangesType(modelNode.type())
|
||||||
|| isConnectionsType(modelNode.type())
|
|| isConnectionsType(modelNode.type())
|
||||||
|| context->lookupProperty(prefix, script->qualifiedId)) {
|
|| context->lookupProperty(prefix, script->qualifiedId)
|
||||||
|
|| isSupportedAttachedProperties(astPropertyName)) {
|
||||||
AbstractProperty modelProperty = modelNode.property(astPropertyName.toUtf8());
|
AbstractProperty modelProperty = modelNode.property(astPropertyName.toUtf8());
|
||||||
syncExpressionProperty(modelProperty, astValue, TypeName(), differenceHandler); // TODO: parse type
|
syncExpressionProperty(modelProperty, astValue, TypeName(), differenceHandler); // TODO: parse type
|
||||||
return astPropertyName.toUtf8();
|
return astPropertyName.toUtf8();
|
||||||
|
Reference in New Issue
Block a user