Add policy about "registrar" coding practice
I have a few requests-for-comments actually about this practice:
-
Do we have a better way to load metatypes for classes?
We need them loaded in both cases:
- in main Krita binary
- each of the unittests
What Qt does is to call
qRegisterMetatype<>()
in the constructor of the corresponding type. Though it doesn't look to good for our case, since we use this pattern for some rather hotpath types, likeKoColor
andKoResource
. -
Should we wrap these "registrars" into some kind of unnamed namespace?