This screenshots shows that KDevelop can guess the type of an object accurately even in a complex scenario.
More information about formatting options
KDevelop 4.5.0Apr 26, 2013 (KDE 4.5 or higher)
KDevelop 4.1.2Jan 14, 2011 (KDE 4.4)
Learn to use KDevelop: