On Mon, Aug 5, 2013 at 8:27 PM, Thiago Macieira
<[email protected]>wrote:

> On segunda-feira, 5 de agosto de 2013 19:51:00, Chris Meyer wrote:
> > I assume that means that it includes the qdesktopwidget.h file (which I
> > _do_ see is properly included)... but how does it know to include
> > qdesktopwidget_qpa_p.h (or even qdesktopwidget_p.h), neither of which I
> see
> > included? via the Q_DECLARE_PRIVATE macro?
>
> It doesn't.
>
> > I don't see _any_ private header files get included from moc files, and
> yet
> > they seem to be required for the Q_PRIVATE_SLOT macro... so I don't
> > understand this yet.
>
> For a Q_PRIVATE_SLOT macro to work, which requires access to the private
> header, the moc output must be #included at the end of the .cpp file.


I'm understanding more... but there is still something I don't understand.
Don't the moc_*.cpp files get compiled directly too? How does qmake know
not to generate Makefile instructions to directly compile the moc_*.cpp
files that use Q_PRIVATE_SLOT? If it were to compile them directly, it
would be missing the private headers, which was the error I was seeing.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to