[Interest] Is moc obsolete?

Thiago Macieira thiago.macieira at intel.com
Thu Jul 9 07:20:59 CEST 2015


On Wednesday 08 July 2015 22:08:18 Igor Mironchik wrote:
> With Qt 5.4.1 I had a problem with moc. One my QObject-derived class was 
> declared in source file (.cpp) and this source file at the end included 
> #include "source.moc". And what I had... When I run qmake and make from 
> command prompt all was ok. But when I compiled from QtCreator 
> compilation failed with: can't find "source.moc".
> 
> If moc will be in C++ reflection magic such problems will not be.

That's not a moc problem, it's a buildsystem problem.

qmake scans your sources to see if you #include the moc output. But sometimes 
its parser gets lost.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list