KDBindings icon indicating copy to clipboard operation
KDBindings copied to clipboard

Allow having bindings referencing const Properties

Open lemirep opened this issue 2 years ago • 1 comments

At the moment I cannot use a const Property in a binding.

const Property<float> someValue = makeBinding(someExpression);
Property<float> boundValue = makeBinding(someValue); // This does not compile

A const Property means it cannot be assigned to again but its value still might change (if the value of the const property is a binding). Therefore, being able to use a const Property in a binding would make sense.

lemirep avatar Mar 31 '22 14:03 lemirep

Hm, this is an issue with the makeBinding function and node operators. These functions currently take a reference to a Property, even though that could be a const reference.

LeonMatthesKDAB avatar Apr 01 '22 08:04 LeonMatthesKDAB

Closed as of #72

LeonMatthesKDAB avatar Jul 02 '24 11:07 LeonMatthesKDAB