MCPcopy Create free account
hub / github.com/KDAB/GammaRay / dumpObject

Function dumpObject

core/probe.cpp:144–160  ·  view source on GitHub ↗

useful for debugging, dumps the object and all it's parents also usable from GDB!

Source from the content-addressed store, hash-verified

142// useful for debugging, dumps the object and all it's parents
143// also usable from GDB!
144void dumpObject(QObject *obj)
145{
146 if (!obj) {
147 cout << "QObject(0x0)" << endl;
148 return;
149 }
150
151 const std::ios::fmtflags oldFlags(cout.flags());
152 do {
153 cout << obj->metaObject()->className() << "(" << hex << obj << ")";
154 obj = obj->parent();
155 if (obj)
156 cout << " <- ";
157 } while (obj);
158 cout << endl;
159 cout.flags(oldFlags);
160}
161
162struct Listener
163{

Callers

nothing calls this directly

Calls 4

flagsMethod · 0.45
classNameMethod · 0.45
metaObjectMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected