Qt component defines

David Faure faure at kde.org
Tue Sep 1 20:21:17 CEST 2009


On Friday 28 August 2009, Thiago Macieira wrote:
> Em Sexta-feira 28. Agosto 2009, às 22.12.41, David Faure escreveu:
> > > For the QTEST_MAIN macro, that would work. But there are also some
> > > other functions available in other headrs, like mouse events, etc. that
> > > need to be enabled or disabled.
> >
> > I don't understand the problem. It's all inline, so there's no linking
> > problem, as long as you don't use mouse stuff in a core-only test,
> > but that would be stupidity, nothing we can do anything about.
> 
> That only works as long as everything in those headers that is QtGui is
> inline.
> 
> That includes headers included by those headers, which means QtGui 
headers
> too. It's very easy to break that, by forgetting to add "inline" somewhere.

You lost me.
A test that uses the mouse stuff from QtTest obviously links to QtGui so it's
just fine if that uses non-inline methods.

All we need is a macro that allows choosing between QCoreApplication
and QApplication. The rest is standard link stuff: if you use gui stuff
you need QtGui, obviously.

-- 
David Faure, faure at kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list