forked from qt-creator/qt-creator
QmlDesigner: Type of the propertyname is now PropertyName
And PropertyName is a typedef for QByteArray. Because we don't use the features of QString and the source would be cluttered with QLatin1Strings we changed the property name to QByteArray. Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -99,7 +99,7 @@ bool QmlStateNodeInstance::isStateActive() const
|
||||
return stateObject() && stateGroup() && stateGroup()->state() == property("name");
|
||||
}
|
||||
|
||||
void QmlStateNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
|
||||
void QmlStateNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
|
||||
{
|
||||
bool hasParent = parent();
|
||||
bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance();
|
||||
@@ -109,7 +109,7 @@ void QmlStateNodeInstance::setPropertyVariant(const QString &name, const QVarian
|
||||
ObjectNodeInstance::setPropertyVariant(name, value);
|
||||
}
|
||||
|
||||
void QmlStateNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
|
||||
void QmlStateNodeInstance::setPropertyBinding(const PropertyName &name, const QString &expression)
|
||||
{
|
||||
bool hasParent = parent();
|
||||
bool isStateOfTheRootModelNode = parentInstance() && parentInstance()->isRootNodeInstance();
|
||||
@@ -119,19 +119,19 @@ void QmlStateNodeInstance::setPropertyBinding(const QString &name, const QString
|
||||
ObjectNodeInstance::setPropertyBinding(name, expression);
|
||||
}
|
||||
|
||||
bool QmlStateNodeInstance::updateStateVariant(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant &value)
|
||||
bool QmlStateNodeInstance::updateStateVariant(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &value)
|
||||
{
|
||||
return stateObject()->changeValueInRevertList(target->object(), propertyName.toLatin1(), value);
|
||||
return stateObject()->changeValueInRevertList(target->object(), QString::fromUtf8(propertyName), value);
|
||||
}
|
||||
|
||||
bool QmlStateNodeInstance::updateStateBinding(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QString &expression)
|
||||
bool QmlStateNodeInstance::updateStateBinding(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QString &expression)
|
||||
{
|
||||
return stateObject()->changeValueInRevertList(target->object(), propertyName.toLatin1(), expression);
|
||||
return stateObject()->changeValueInRevertList(target->object(), QString::fromUtf8(propertyName), expression);
|
||||
}
|
||||
|
||||
bool QmlStateNodeInstance::resetStateProperty(const ObjectNodeInstance::Pointer &target, const QString &propertyName, const QVariant & /* resetValue */)
|
||||
bool QmlStateNodeInstance::resetStateProperty(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant & /* resetValue */)
|
||||
{
|
||||
return stateObject()->removeEntryFromRevertList(target->object(), propertyName.toLatin1());
|
||||
return stateObject()->removeEntryFromRevertList(target->object(), QString::fromUtf8(propertyName));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user