Unsolved I am trying to disable qDebug message
-
My
DEFINE += QT_NO_DEBUG_OUTPUT
in .pro fileis ignored due to
" code model" not parsing the .h file .Is there other way to disable qDebug ?
PS I have
#include <QDebug> all over the place , prefer not to remove it. -
@AnneRanch said in I am trying to disable qDebug message:
My
DEFINE += QT_NO_DEBUG_OUTPUT
in .pro file
is ignored due to " code model" not parsing the .h file .The PRO file variable is DEFINES not DEFINE. After changing this you will need to run qmake and rebuild all (it will not happen automatically because the source files have not changed).
The "code model" message is coming from your IDE and relates only to the editor's ability to intelligently help with things like code completion etc. This in no way affects whether the compiled program will build or run.
-
@ChrisW67 said in I am trying to disable qDebug message:
@AnneRanch said in I am trying to disable qDebug message:
My
DEFINE += QT_NO_DEBUG_OUTPUT
in .pro file
is ignored due to " code model" not parsing the .h file .The PRO file variable is DEFINES not DEFINE. After changing this you will need to run qmake and rebuild all (it will not happen automatically because the source files have not changed).
The "code model" message is coming from your IDE and relates only to the editor's ability to intelligently help with things like code completion etc. This in no way affects whether the compiled program will build or run.
Sorry, I did not "cut ans paste" - I do have "DEFINES".
However running qmake makes no difference, still getting all qDebug messages. -
Hi
Just testedDEFINES += QT_NO_DEBUG_OUTPUT
with a button in a test program.
I had to use clean project and then rerun qmake to toggle on/off
-
@AnneRanch said in I am trying to disable qDebug message:
Sorry, I did not "cut ans paste" - I do have "DEFINES".
However running qmake makes no difference, still getting all qDebug messages.Are you sure you have run qmake and rebuild your project/solution?