On Mon, 2011-09-26 at 18:16 +0200, ext Oswald Buddenhagen wrote:

> no. including a file does *not* add a dependency of the "includer" on the
> "includee". dependencies are always from generated artifacts to their
> sources. the _moc.h is generated from the .h, so it has a dependency on
> it (and the files it includes; excluding the _moc.h's would be qmake's
> responsibility - it can do that, because it knows that the inclusion of
> the generated files themselves does not change what will go into the
> generated files). the .o is generated from the .cpp and the .h and the
> _moc.h, so it has dependencies on them.

And we already have such a case with our current moc:

--myobject.cpp--
class MyObject :public QObject {
    Q_OBJECT
// ...
};

#include "myobject.moc"
----------------

If includes would add dependencies then we would have a circle:

myobject.cpp -> myobject.moc -> myobject.cpp


Jörg


_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to