[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: private slots
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2007-01-04 18:26:06
Message-ID: 200701041926.16720.ogoffart () kde ! org
[Download RAW message or body]
Le jeudi 4 janvier 2007 18:51, Simon Hausmann a écrit :
> On Thursday 04 January 2007 18:45, André Wöbbeking wrote:
> > On Thursday 04 January 2007 17:45, Simon Hausmann wrote:
> > > On Thursday 04 January 2007 17:24, André Wöbbeking wrote:
> > > > Can you still connect to private slots from "outside"? If so you
> > > > can call every private slot.
> > >
> > > Yes, that is correct.
> >
> > Why is that still possible? Couldn't it be disallowed in
> > QObject::connect()? Of course this should be done for protected slots
> > too.
>
> Sure could disallow it, but how do you detect when to allow it then? :)
line 2460 of qobject.cpp
in QObject::connect
QMetaMethod rmethod = rmeta->method(method_index);
if ( receiver != this && rmethod.access() == Private)
qWarning("cannot connect to a private slot");
but wait... QObject::connect is static ... so there is no this :-(
(but i'm sure this can be worked around.)
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic