diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-26 17:34:35 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-28 13:22:50 +0200 |
commit | 984df39c79e6129250fd0f8516fbfb2e28bcefd7 (patch) | |
tree | 21224b2716ef27eb67bfbb0dd848596fade8dc3b /src/widgets/kernel/qwidget.cpp | |
parent | 271d3bae38ffa009f9718ffdd3a808cc75163a3a (diff) |
widgets: Add logging for widget painting
Change-Id: I551ec290812369e3848c1096fed7e813cd9e1cd6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 9e8c0cb500..45be132e59 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -119,6 +119,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcWidgetPainting, "qt.widgets.painting", QtWarningMsg); + static inline bool qRectIntersects(const QRect &r1, const QRect &r2) { return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && @@ -5273,10 +5275,14 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP if (rgn.isEmpty()) return; + Q_Q(QWidget); + + qCInfo(lcWidgetPainting) << "Drawing" << rgn << "of" << q << "at" << offset + << "into paint device" << pdev << "with" << flags; + const bool asRoot = flags & DrawAsRoot; bool onScreen = shouldPaintOnScreen(); - Q_Q(QWidget); #if QT_CONFIG(graphicseffect) if (graphicsEffect && graphicsEffect->isEnabled()) { QGraphicsEffectSource *source = graphicsEffect->d_func()->source; |