Switching from Qt 5.3 to 5.4, all of a sudden my custom message handler gets neither line number nor file name from Qt libraries that use qDebug (), qWarning () and qCritical ().
Documents show that this was a change in Qt 5.4. To get this information, you must explicitly define QT_MESSAGELOGCONTEXT. So I did. I downloaded the Qt 5.4 source code, configured it, compiled and installed my code using the new libraries. The problem is that I still do not get the file name and line number.
This is how I configure the Qt build:
configure.bat -platform win32-msvc2010 -debug-and-release -nomake examples -nomake tests -opensource -opengl desktop -c++11 -no-strip -D QT_MESSAGELOGCONTEXT
mjk99 source
share