summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2022-08-05 14:53:20 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2022-08-09 12:57:12 +0200
commit75d4958e508e864fada5f7999c14172f758a85c2 (patch)
treec4b15a2cf8212c6ecef783d0136931619b81013f /src
parent38ca34ac935e222d532fc5f6939efaa15c633b39 (diff)
QCommonStyle: use logging categories
Use qCWarning instead of qWarning, to give users more control over debug output if needed. Fixes: QTBUG-105332 Change-Id: I830dd160f75eb9885d80b80336bfb27da676e4bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index bf6aca0380..f1d8a11990 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -78,6 +78,8 @@
#include <private/qstyleanimation_p.h>
#endif
+#include <qloggingcategory.h>
+
#include <limits.h>
#include <private/qtextengine_p.h>
@@ -85,6 +87,8 @@
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcCommonStyle, "qt.widgets.commonstyle");
+
using namespace Qt::StringLiterals;
static qreal qt_getDevicePixelRatio(const QWidget *widget)
@@ -1104,7 +1108,7 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItem *opt, QRect
}
break; }
default:
- qWarning("doLayout: decoration position is invalid");
+ qCWarning(lcCommonStyle, "doLayout: decoration position is invalid");
decoration = *pixmapRect;
break;
}
@@ -3875,7 +3879,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
break;
#endif // QT_CONFIG(mdiarea)
default:
- qWarning("QCommonStyle::drawComplexControl: Control %d not handled", cc);
+ qCWarning(lcCommonStyle, "QCommonStyle::drawComplexControl: Control %d not handled", cc);
}
}
@@ -4011,7 +4015,7 @@ QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const
}
break;
default:
- qWarning("QCommonStyle::hitTestComplexControl: Case %d not handled", cc);
+ qCWarning(lcCommonStyle, "QCommonStyle::hitTestComplexControl: Case %d not handled", cc);
}
return sc;
}
@@ -4450,7 +4454,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
}
#endif // QT_CONFIG(mdiarea)
default:
- qWarning("QCommonStyle::subControlRect: Case %d not handled", cc);
+ qCWarning(lcCommonStyle, "QCommonStyle::subControlRect: Case %d not handled", cc);
}
#if !QT_CONFIG(slider) && !QT_CONFIG(spinbox) && !QT_CONFIG(toolbutton) && !QT_CONFIG(groupbox)
Q_UNUSED(widget);