woboq / verdigris

Qt without moc: set of macros to use Qt without needing moc
https://woboq.com/blog/verdigris-qt-without-moc.html
GNU Lesser General Public License v3.0
643 stars 60 forks source link

WIP: Attempt at name override #61

Closed strfry closed 5 years ago

strfry commented 5 years ago

Refers to #55

I hacked together this solution to resolve our naming of templates problem.

Now custom type names can be specified like this:

constexpr auto W_ClassNameOverride(w_internal::W_TypeWrap<StageQml> = {}) {
    return w_internal::makeStaticString("Stage");
}

There's a few points for discussion in there:

Please have a look and comment.

Regards, Jonathan

ogoffart commented 5 years ago

The namespacing is off, it isn't so nice to require users to reach into the w_internal namespace

Maybe the function should be a member function.

ogoffart commented 5 years ago

Implemented as part of https://github.com/woboq/verdigris/pull/69