Bo Peng wrote:
When I rename a file that is mocable scons does not automatically run
moc on this renamed file. I always have to do that by hand. Do you think
it is possible to automate that?


Scons lists mocable files. You will have to rename it in SConstruct.

Ah, I understand now. I thought indeed that they were automatically detected.

If there is a signature of which files should be moced, I can glob
them. Or, I can simply moc all the files, will that take some time?

Two solutions:
1) detect a Q_OBJECT inside the header.
2) moc all qt4/*.h

If 1) is complicated I would go for two as moc won't give an error on non-mocable file, only a warning, ex:

D:\devel\lyx\trunk\development\scons>moc D:\devel\lyx\trunk\src\frontends\qt4\ColorCache.h > msvc-debug\common\frontends\qt4\ColorCache_moc.cpp D:\devel\lyx\trunk\src\frontends\qt4\ColorCache.h:0: Warning: No relevant classes found. No output generated.

moc is very fast so I don't think we'll loose time here.

Abdel.


Bo


Reply via email to