Skip to content

Commit 3d583db

Browse files
committed
Re-enable the --debug switch for all Qt tools
1 parent e08a916 commit 3d583db

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tools/efm-decoder/libs/efm/src/logging.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
************************************************************************/
2424

2525
#include "logging.h"
26+
#include <QLoggingCategory>
2627

2728
// Global for debug output
2829
static bool showDebug = false;
@@ -119,6 +120,12 @@ void closeDebugFile(void)
119120
void 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)

tools/library/tbc/logging.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
************************************************************************/
2525

2626
#include "logging.h"
27+
#include <QLoggingCategory>
2728

2829
// Global for debug output
2930
static bool showDebug = false;
@@ -114,6 +115,12 @@ void closeDebugFile(void)
114115
void 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)

0 commit comments

Comments
 (0)