edbee-lib
edbee-lib copied to clipboard
Mutable field
View components use mutable fields. Is this really required?
Which ones do you mean specifically?
https://github.com/edbee/edbee-lib/blob/fce89540c784eceb58d9c4845dfe361b4ee8c15d/edbee-lib/edbee/views/components/textmargincomponent.h#L104-L105
Ah. I'd stay away from such a mechanic in my own code.
Well it's used for caching the width in the withHint() const
call ... (Which interface is defined by QWidget so it cannot be changed)
https://github.com/edbee/edbee-lib/blob/fce89540c784eceb58d9c4845dfe361b4ee8c15d/edbee-lib/edbee/views/components/textmargincomponent.cpp#L170
Guess it isn't a big issue since width_ is a private member.