someclass.h, someclass_alternative.cpp and auto moc
René J.V. Bertin
rjvbertin at gmail.com
Thu Oct 19 12:42:10 UTC 2017
On Thursday October 19 2017 14:03:16 Milian Wolff wrote:
>Are you maybe missing the explicit moc include?
No, the problem is that there's no way to specify the right moc. Qt imposes that it matches the filename (so with the _qtb suffix), but then it won't include anything defined in the headerfile if the header doesn't also have the _qtb suffix. (Is that clear? =) )
>But in principle, I would claim that this pattern above isn't nice in the
>first place. Rather, have the standarddocumentationview.h include either the
>_qtb or the _web.h, and then have accompanying .cpp files for those headers.
>That should fix it.
I've gone for a different approach, as you've seen, similar to what Qt do themselves. I could indeed have moved the web* specific code to its own dedicated file too - I'm not even sure that would not have been less work in the end :)
More information about the KDevelop-devel