[Qt-interest] Fix some moc bugs/flaws (patch enclosed)
Frank Hemer
frank at hemer.org
Mon Dec 22 16:17:10 CET 2008
Hello list,
moc - as stated in the docs - does currently not expand C/C++ macros.
Some users allready have claimed for such a moc extension (see
https://trolltech.com/developer/task-tracker/index_html?method=entry&id=104309)
Please find enclosed a patch against Qt442 src/tools/moc/preprocessor.cpp that
fixes following issues:
1. Moc does not expand macros.
The enclosed patch fixes this issue - for 'non-function' macros, meaning
macros without parameters.
2. If a file is #included more than once in another file, only the first
#include is recognized by moc, further #include are ignored.
There is a task tracker entry regarding this issue, see
https://trolltech.com/developer/task-tracker/index_html?method=entry&id=234021
back from november 08 that still is not scheduled.
Unfortunately the entry has never been published in the new bugs/suggestions
section as it was not visible to the public when initially created.
As I expect more users to be interested in this enhancement, I publish the
patch again here on the list - maybe some others might vote for it...
Btw, the patch works fine with qt4.5 beta and builds qt and examples without
problem. The compile time seems not to be affected ...
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preprocessor.cpp-qt4.4.2-diff.patch
Type: text/x-diff
Size: 3446 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081222/1eb238ce/attachment.bin
More information about the Qt-interest-old
mailing list