[Qt-interest] QTest: Marking slots as not test functions

Murray Cumming murrayc at murrayc.com
Mon Feb 22 13:28:25 CET 2010


On Mon, 2010-02-22 at 13:25 +0100, Thiago Macieira wrote:
> Em Segunda-feira 22 Fevereiro 2010, às 12:59:05, Murray Cumming escreveu:
> > QTest assumes that all private slots are test functions that it should
> > call. That's rather strange, though I understand why it's reusing
> > QObject's introspection slot-introspection feature to list methods.
> > 
> > But I want to handle signals in my tests. For instance, how can I tell
> > QTest not my QTimer::singleShot() slot directly?
> 
> Don't make them private slots. Make them protected or public slots.

OK. Thanks.

That is rather counter-intuitive right? I mean, I'm marking as private
the methods that should be called from outside, while marking as public
the methods that don't need to be called from outside.


-- 
murrayc at murrayc.com
www.murrayc.com
www.openismus.com




More information about the Qt-interest-old mailing list