CONFIG-=debug could probably help.
CONFIG-=debug could probably help.
I thought so too. Probably should have included this before, but my .pro file contains
CONFIG+=qt release incremental link_prl
CONFIG-=debug
Do I have syntax wrong or something?
Thanks.
How about "DEFINES += QT_NO_DEBUG_OUTPUT"?
No, my mistake. I had to check the docsAdd something like this to your project file:
DEFINES += QT_NO_DEBUG_OUTPUT
And again... Jacek was faster![]()
Thank you both. But I'm still missing something.
My project file now looks like this, and qDebug still produces output.
Qt Code:
###################################################################### # Automatically generated by qmake (1.07a) Thu Sep 28 17:09:30 2006 ###################################################################### OBJECTS_DIR=.obj/ MOC_DIR=.moc/ DEFINES += QT_NO_DEBUG_OUTPUT CONFIG = qt release incremental link_prl TEMPLATE = app DEPENDPATH += include src INCLUDEPATH += . include # Input HEADERS += include/Chooser.h \ include/Configurator.h \ include/Creator.h \ include/Exerciser.h \ include/ExerciserException.h \ include/FileChooser.h \ include/logo.h \ include/ResultsFile.h \ include/Sender.h \ include/SequenceArguments.h \ include/SequenceSpecifier.h \ include/versioninfo.h SOURCES += src/Chooser.cpp \ src/Configurator.cpp \ src/Creator.cpp \ src/Exerciser.cpp \ src/ExerciserException.cpp \ src/FileChooser.cpp \ src/ResultsFile.cpp \ src/Sender.cpp \ src/SequenceArguments.cpp \ src/SequenceSpecifier.cppTo copy to clipboard, switch view to plain text mode
Did you remember to rerun qmake (and rebuild all files from the project) afterwards?
Maybe you have to define QT_NO_WARNING_OUTPUT too?
I did both of the above things (although I'd probably like to keep warnings on) and I still get it. The compile command being run is like this:
Derekg++ -c -pipe -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fomit-frame-pointer -march=i586 -mtune=pentiumpro -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I. -Iinclude -I/usr/lib/qt3//include -I.moc/ -o .obj/Exerciser.o src/Exerciser.cpp
Last edited by jacek; 29th September 2006 at 14:53. Reason: changed [ code ] to [ quote ] to allow wrapping
Since you use Qt3, not Qt4, try "DEFINES += QT_NO_DEBUG".
Still no luck.
The result of that is that it adds another -DQT_NO_DEBUG to the compile command (there was one there already as well), but I'm still getting output.
Derek
qDebug seems to be a function in Qt3, so it might be impossible to do that through Qt directly. But you can provide your own macro, which would expand to nothing if a certain macro is defined or to qDebug() if it is not (or vice versa) and use that macro instead of qDebug().
I thought it was possible to turn on and off the debug output easily with a compile time flag but I guess not.
The QT 3 docs say that the QT_DEBUG flag "Enables debugging code" and that the QT_NO_DEBUG flag turns off the QT_DEBUG flag. So I guess I don't know what exactly that means.
Anyway, I've created a macro that expands to qDebug, and it works fine.
Thanks to you both,
Derek
Bookmarks