Re: [Interest] QObject::dumpObjectTree() & const

2016-10-03 Thread Thiago Macieira
On segunda-feira, 3 de outubro de 2016 14:31:06 CEST Giuseppe D'Angelo wrote: > Il 03/10/2016 13:18, Thiago Macieira ha scritto: > > Because they don't need to be. You can call any function from the > > debugger, > > regardless of actual constness of the object. > > > > They were designed to be

Re: [Interest] QObject::dumpObjectTree() & const

2016-10-03 Thread Giuseppe D'Angelo
Il 03/10/2016 13:18, Thiago Macieira ha scritto: > Because they don't need to be. You can call any function from the debugger, > regardless of actual constness of the object. > > They were designed to be called from the debugger itself, never by your code. Come on, that's not a justification

Re: [Interest] QObject::dumpObjectTree() & const

2016-10-03 Thread Thiago Macieira
On domingo, 2 de outubro de 2016 20:05:49 MDT Andy wrote: > Why aren't QObject::dumpObjectTree() and QObject::dumpObjectInfo() const? > Surely they shouldn't be modifying the state of the object. Because they don't need to be. You can call any function from the debugger, regardless of actual

[Interest] QObject::dumpObjectTree() & const

2016-10-02 Thread Andy
Why aren't QObject::dumpObjectTree() and QObject::dumpObjectInfo() const? Surely they shouldn't be modifying the state of the object. I occasionally add them to my own debug dump() methods which are const (ensures no modification is happening accidentally) and have to work around this each time.