QmlDesigner: Add transaction option to ValuesChangedCommand

This option allows to define transactions for
ValuesChangedCommand and ValuesModifiedCommand.

Change-Id: Ia603027b5c431f1a1912d8959561f92a19fd0243
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-25 15:47:43 +02:00
parent fea693d9f9
commit 7b2b040f41
4 changed files with 39 additions and 11 deletions
@@ -42,6 +42,13 @@ PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const Property
{
}
PropertyValueContainer::PropertyValueContainer(qint32 option)
: m_instanceId(option),
m_name("-option-")
{
// '-option-' is not a valid property name and indicates that we store the transaction option.
}
qint32 PropertyValueContainer::instanceId() const
{
return m_instanceId;
@@ -43,6 +43,7 @@ class PropertyValueContainer
public:
PropertyValueContainer();
PropertyValueContainer(qint32 instanceId, const PropertyName &name, const QVariant &value, const TypeName &dynamicTypeName);
PropertyValueContainer(qint32 option);
qint32 instanceId() const;
PropertyName name() const;