extragear/sdk/kdevelop/languages/cpp

Milian Wolff mail at milianw.de
Mon Apr 12 12:34:21 UTC 2010


Milian Wolff, 12.04.2010:
> David Nolden, 12.04.2010:
> > 2010/4/12 Milian Wolff <mail at milianw.de>:
> > > SVN commit 1113952 by mwolff:
> > > 
> > > Change our custom implementation of the Q_PRIVATE_SLOT to be
> > > 
> > > private slots: sig; private:
> > > 
> > > this way the items in there are properly reported as private and as
> > > slots.
> > > 
> > > Note: at least in kdelibs, Q_PRIVATE_SLOT is always used in a
> > > 'private:' section, not in a 'slots:' or 'private slots:' section.
> > > 
> > > CCMAIL: david.nolden.kdevelop at art-master.de
> > 
> > I think this is wrong, because the "private:" you add to the end makes
> > everything behind the slot private, so this may cause more problems
> > than it causes good. The "Q_PRIVATE_SLOT" just means that the
> > implementation is private, doesn't it?
> 
> First: Note that e.g. Q_OBJECT does the same. But since it's mostly/always
> used in a class at the top it's fine.
> 
> Secondly the ~20 files I checked in lxr.kde.org always had the usage:
> 
> private:
>     Q_PRIVATE_SLOT(...);

correction: without the semicolon.

> Third, Q_PRIVATE_SLOT means that there is a slot in the dptr that doesn't
> actually have to be a QObject. And since it's in the dptr, it's private,
> yes.
> 
> But since we don't actually cope with these things properly (e.g. the slot
> is reported as child of the base class, not of the dptr), I still think
> that the above is somewhat "correct".
> 
> At least I don't see a better way to make sure that the item in there is a
> private slot... I might use private Q_SLOTS: or similar if you prefer?


-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100412/88a58279/attachment.sig>


More information about the KDevelop-devel mailing list