Changeset View
Changeset View
Standalone View
Standalone View
src/buffer/katetextrange.h
Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Line(s) | 313 | private: | |||
---|---|---|---|---|---|
351 | * Is this range's attribute only visible in views, not for example prints? | 351 | * Is this range's attribute only visible in views, not for example prints? | ||
352 | */ | 352 | */ | ||
353 | bool m_attributeOnlyForViews; | 353 | bool m_attributeOnlyForViews; | ||
354 | 354 | | |||
355 | /** | 355 | /** | ||
356 | * Will this range invalidate itself if it becomes empty? | 356 | * Will this range invalidate itself if it becomes empty? | ||
357 | */ | 357 | */ | ||
358 | bool m_invalidateIfEmpty; | 358 | bool m_invalidateIfEmpty; | ||
359 | | ||||
360 | /** | ||||
361 | * Should this range be validated? | ||||
362 | * Used by KateTextBlock to avoid double updates without costly hashing. | ||||
363 | */ | ||||
364 | bool m_isCheckValidityRequired = false; | ||||
dhaumann: I would prefer an additional
inline void setValidityCheckRequired();
inline bool… | |||||
cullmann: That makes sense, will change that.
Looks nicer in the code, too. | |||||
359 | }; | 365 | }; | ||
360 | 366 | | |||
361 | } | 367 | } | ||
362 | 368 | | |||
363 | #endif | 369 | #endif |
I would prefer an additional
We don't need a bool in the setter, since we always only mark dirty. And with these accessors, you could add a unit test (in dact, I would like to see one for this).
And instead of 'double' I suggest to use the term 'multiple' in the comment.