automoc4 and subdirs

Matthias Kretz kretz at kde.org
Thu Jul 31 14:07:06 BST 2008


On Thursday 31 July 2008 01:47:28 Aaron J. Seigo wrote:
> hi all...
>
> so i just found out that automoc4 will fail on things like:
>
> #include "subdir/foo.moc"

That pattern doesn't exist anywhere else in the KDE sources AFAIK. What is 
supported now, is to add
AUTOMOC4_MOC_HEADERS(subdir/foo.h)
to your CMakeLists.txt and not #include the moc file. Of course this is only 
possible if you don't use Q_PRIVATE_SLOT.

> the attached patch is a quick hack to make it work, by preserving the path
> and trying to create the moc file properly.

The patch looks good except for an incorrect (I think) s/basename/currentMoc/ 
on line 384.

Also the mkpath looks more complicated than I'd expect. QDir::mkpath could 
certainly use some better docs...

See attached patch.

> is there any particular reason why automoc4 doesn't already support this
> other than "nobody has done it" or is something like this ok to commit?

"nobody has done it"

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: automoc.diff
Type: text/x-patch
Size: 4217 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080731/fb865e2e/attachment.bin>


More information about the kde-core-devel mailing list