Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
Re: QHttp, moc and code writing guideline


Message 1 in thread

On Tuesday 21 November 2006 22:20, troll@xxxxxxxxxxxx wrote:
> > A bug in g++ ? does C++ tell that members have a higher
> > priority than methods parameters ? I don't know and I don't
> > want to :-]
> >
> > The only thing I know is that my bug has disappeared since I
> > have renamed _id into _hid :-)
>
> On the other hand identifiers starting with an underscore are reserved
> vy the C++ standard for library use, so your naming choice has been bad
> in the first place. (Some coding style guidelines propose id_ instead)
>
> Besides, I doubt that
>
> int TexCache::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
> {
>    _id = QThread::qt_metacall(_c, _id, _a);
>    ....
> }
>
> would change the value of TexCache::_id. I didn't hear of any bug of
> that "quality" in gcc for quite a long time.

MyClass::_id is perfectly valid, while simply _id isn't. What counts is the 
fully qualified name IIRC.

Regards,
Flo

-- 
 [ signature omitted ]