QML equivalents to __FILE__, __LINE__ etc ?
-
In my debugging of QML I regularly have console log outputs reporting the QML file and line number, this requires adjustment after every edit, which can be quite time consuming, in C/C++ there are preprocessor macros like:
__ FILE__ and __LINE__That are replaced at compile time with the fill path of the source file ad the line number, is there anything in QML that can be used to do the same?
-
Not a direct equivalent. But if you want to just the origin of logging messages, you can include file, line information in the logging output by calling qSetMessagePattern(), or setting the QT_MESSAGE_PATTERN environment variable.
-
Not a direct equivalent. But if you want to just the origin of logging messages, you can include file, line information in the logging output by calling qSetMessagePattern(), or setting the QT_MESSAGE_PATTERN environment variable.