4

I am using Qt, and sometimes it gives a warning message starts with [E] in the debug window. Most of the time, the [E] warning message will also provides the information about the line information about the cpp file that gives this warning. Like this one:

at kernel\qmetatype.cpp:597 Type conversion already registered from type QPair<QByteArray,QByteArray> to type QtMetaTypePrivate::QPairVariantInterfaceImpl

However, usually these cpp files are Qt's own files and usually dlls in windows. The thing is, I have never registered such a type conversion in my own code. And this warning seems something to do with multi-threading since it doesn't appear every time. Is there any method, function,tools or techniques that could help me identify which line of my own source code triggered this warning?

Nyaruko
  • 4,329
  • 9
  • 54
  • 105

1 Answers1

0

qWarning and others QDebug methods send their logs through message handler.

You can replace the default one with your own using qInstallMsgHandler and place a breakpoint inside.

Cedric
  • 46
  • 5