Linked by Thom Holwerda on Wed 7th May 2008 08:54 UTC, submitted by elsewhere
Thread beginning with comment 313472
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
Almost nobody calls moc manually. It is the job of your build-system to call it for you or to let 'make' call it for you. For example the KDE projects uses CMake and therefore KDE developers never run the MOC manually. Even, say, on the Windows platform, CMake can generate Visual Studio project files and have the MOC be automatically run, I believe (I have no experience with that, though). So, from the point for view of build automation, the MOC is just like the compiler, the linker, etc. Nothing specific to it. By the way Trolltech doesn't 'sponsor' any IDE, as far as I know.
No doubt that the MOC has many benefits, but some programmers (myself included) may not use the IDEs sponsored by Qt, and therefore having to call the MOC manually. If Qt also supported signals and slots templates, there would not be a need to invoke the MOC manually.
You don't need to invoke MOC manually, even if you do not use an IDE with Qt integration.
Basically all IDEs are capable of working with a Makefile based project, at least I don't know anyone which doesn't.
And Makefiles generated by qmake contains all the rules for MOC, UIC and a rule to update the Makefile itself if the .pro file changed, making it very pleasent to work with, independent of platform.
Nice additional advantage is that one can use the very same Makefiles for automated builds during the night, again on all platforms (e.g. using nmake and VS commandline compiler cl.exe on Windows)






Member since:
2006-03-20
No doubt that the MOC has many benefits, but some programmers (myself included) may not use the IDEs sponsored by Qt, and therefore having to call the MOC manually. If Qt also supported signals and slots templates, there would not be a need to invoke the MOC manually.