On Mon, Sep 26, 2011 at 06:02:50PM +0200, ext Thiago Macieira wrote:
> On Monday, 26 de September de 2011 17:48:27 Oswald Buddenhagen wrote:
> > On Sat, Sep 24, 2011 at 05:01:15PM +0200, ext Thiago Macieira wrote:
> > > On Saturday, 24 de September de 2011 14:49:50 Peter Kuemmel wrote:
> > > > For instance qobject.h:
> > > > 
> > > > #ifndef QOBJECT_H
> > > > #define QOBJECT_H
> > > > 
> > > > #ifndef QT_NO_QOBJECT
> > > > 
> > > > #include <QtCore/qobjectdefs.h>
> > > > #include <QtCore/qstring.h>
> > > > #include <QtCore/qbytearray.h>
> > > > 
> > > > // generated by moc into the build directory
> > > > #include <qobject_moc.h>
> > > 
> > > This means that qobject_moc.h depends on qobject.h and qobject.h depends
> > > on
> > > qobject_moc.h.
> > 
> > this is actually wrong. there is no dependency of qobject.h on
> > qobject_moc.h. the *objects* which include qobject.h would also depend
> > on qobject_moc.h.
> 
> Not if you put the #include like it was in the above example.
> 
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.
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to