Bug 78565 - [WISH] Augment Watch Window type information for QObject derivatives with the result of the className() method (gives true type)
Summary: [WISH] Augment Watch Window type information for QObject derivatives with the...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 4.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-27 19:17 UTC by Jonathan Solomon
Modified: 2008-06-29 19:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Solomon 2004-03-27 19:17:13 UTC
Version:           3.0.2 (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources

Most debuggers I've worked with display the true type of a C++ object pointer. It's possible that some of the code I'm looking at is compiled without RTTI but it doesn't appear the KDevelop debugger does that. Special casing instances of QObject descendant classes to use the "className()" method (as has been done for QStrings) would seem to be a reasonable work-around and a great help.
Comment 1 John Birch 2004-03-27 20:48:31 UTC
Not sure I completely understand you. Could you give a concrete example of what it shows and what you think it should show.
Comment 2 Jonathan Solomon 2004-03-27 20:56:22 UTC
Ok. If in the current frame stack a pointer "foo" is declared as

QObject*    foo = getTheFoo();

the Watch window will show

Name		Type		Value
foo		QObject*	(QObject*)0x12345678

when the most derived type of the object returned by "getTheFoo()" above might actually be KDockWidget (or what have you). Not sure the best way to show this but you could put the true type in either the Type or Value column and the variable's type in the other.

foo		KDockWidget*	(QObject*)0x12345678
	or
foo (QObject*)	KDockWidget*	(KDockWidget*)0x12345678

etc. Ideally the tree should show the members of the true type also. Maybe I'm missing something and it does this now but it doesn't appear to.
Comment 3 Jonathan Solomon 2004-03-27 21:00:39 UTC
Dang. Lost my tabs. Oh well, hope you can make out what I was trying to say.
Comment 4 Vladimir Prus 2005-09-07 14:13:23 UTC
If you know how to ask gdb is a class is derived from QObject, I'm all ears. The "whatis" command will tell the exact type (say "QWidget*"), but how to do check if QWidget is derived from QObject?
Comment 5 Andreas Pakulat 2008-06-29 19:23:51 UTC
apparently there's no further interest from the reporter and seemingly also very little from us.