Skip to content

Add policy about "registrar" coding practice

I have a few requests-for-comments actually about this practice:

  1. 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, like KoColor and KoResource.

  2. Should we wrap these "registrars" into some kind of unnamed namespace?

Merge request reports