File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 2323************************************************************************/
2424
2525#include " logging.h"
26+ #include < QLoggingCategory>
2627
2728// Global for debug output
2829static bool showDebug = false ;
@@ -119,6 +120,12 @@ void closeDebugFile(void)
119120void setDebug (bool state)
120121{
121122 showDebug = state;
123+
124+ // Enable Qt debug logging if debug mode is enabled
125+ // In Qt 5.2+, qDebug() is suppressed by default in release builds
126+ if (state) {
127+ QLoggingCategory::setFilterRules (" *.debug=true" );
128+ }
122129}
123130
124131// Control the quiet flag (if set all output is suppressed)
Original file line number Diff line number Diff line change 2424************************************************************************/
2525
2626#include " logging.h"
27+ #include < QLoggingCategory>
2728
2829// Global for debug output
2930static bool showDebug = false ;
@@ -114,6 +115,12 @@ void closeDebugFile(void)
114115void setDebug (bool state)
115116{
116117 showDebug = state;
118+
119+ // Enable Qt debug logging if debug mode is enabled
120+ // In Qt 5.2+, qDebug() is suppressed by default in release builds
121+ if (state) {
122+ QLoggingCategory::setFilterRules (" *.debug=true" );
123+ }
117124}
118125
119126// Control the quiet flag (if set all output is suppressed)
You can’t perform that action at this time.
0 commit comments