[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: private slots
From: Thiago Macieira <thiago () kde ! org>
Date: 2007-01-03 15:40:31
Message-ID: 200701031340.31605.thiago () kde ! org
[Download RAW message or body]
Thomas Zander wrote:
>On Wednesday 03 January 2007 16:05, Simon Hausmann wrote:
>> This slot is not intended for applications to call/use and it is
>> connected to the internal widgets. There's no need to have it in the
>> public API and exported. You can use the following instead:
>>
>> ...
>> private:
>> Q_PRIVATE_SLOT(d, void slotDateChanged())
>>
>> KDateWidgetPrivate *d;
>> ...
>
>How is this better than the following?
>
>private slots:
> void slotDateChanged();
That's still a member function and subject to #define private public.
Friends can also call it.
The most benefit comes when the Private class is more than just a big
struct with member fields: when you actually write code in it.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
[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