Going crazy?
-
In my .pro file I have added a definition:
DEFINES += QT_PRECATED_WARNINGS TRAINERIs this the correct way to add a second definition?
When I look at the source in Qt Creator:
#if defined(TRAINER) /*Source is not greyed out which is what I expect*/ #else /*Source IS greyed again what I expect*/ #endifWhat is confusing me is that when I launch the application in debugger, It steps into the code that IS greyed, whats going on?
Now trying:
DEFINES += QT_PRECATED_WARNINGS DEFINES += TRAINERThis works, so its just confusing that it works either way in Qt Creator but not when debugging.
-
DEFINES_DEBUG
Specifies preprocessor defines for the debug configuration. The values of this variable get added to DEFINES after the project is loaded. This variable is typically set in qmake.conf and rarely needs to be modified.
This variable was introduced in Qt 5.13.2.
DEFINES_RELEASESpecifies preprocessor defines for the release configuration. The values of this variable get added to DEFINES after the project is loaded. This variable is typically set in qmake.conf and rarely needs to be modified.
https://doc.qt.io/qt-5/qmake-variable-reference.html#defines
-
BTW: Do you mean
QT_DEPRECATED_WARNINGSinstead ofQT_PRECATED_WARNINGS? -
BTW: Do you mean
QT_DEPRECATED_WARNINGSinstead ofQT_PRECATED_WARNINGS?@SimonSchroeder said in Going crazy?:
QT_DEPRECATED_WARNINGS
Yes, QT_DEPRECATED_WARNINGS is correct:
https://doc.qt.io/qt-5/qtglobal.html