[Qt-interest] QTest: Marking slots as not test functions
Thiago Macieira
thiago at kde.org
Mon Feb 22 13:58:44 CET 2010
Em Segunda-feira 22 Fevereiro 2010, às 13:28:25, Murray Cumming escreveu:
> 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.
Yeah.
It's probably some legacy reason.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100222/defaf8f8/attachment.bin
More information about the Qt-interest-old
mailing list