diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-05-30 14:16:49 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-06-15 06:19:51 +0000 |
commit | 1ef97c39c371f469df932236f9ede4da408734cb (patch) | |
tree | 421fb5f3b5b136f6f314e31c636b7c9078dee69e /src/quick/items/qquickmousearea.cpp | |
parent | a6c0a864751eb017da63317a67bc61541fddb480 (diff) |
categorized logging: trace hover events
Tracing is a kind of logging designed specifically for use with
http://code.qt.io/cgit/qt-labs/umlquick.git, to generate UML
Sequence diagrams. Here it is being used to trace the delivery
of hover events. Due to use of the QT_MESSAGE_PATTERN backtrace
directive, and backtrace splicing, it's not necessary to emit
trace messages for every step: it's mainly important to catch
the final destinations of hover processing, where state is
changed and signals emitted.
Change-Id: I5f640732f90990ef9f89767a56f3978b9c28a410
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick/items/qquickmousearea.cpp')
-rw-r--r-- | src/quick/items/qquickmousearea.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index 0219bc809f..297a57e672 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlVisualTouchDebugging, QML_VISUAL_TOUCH_DEBUGGING) +Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE) + QQuickMouseAreaPrivate::QQuickMouseAreaPrivate() : enabled(true), scrollGestureEnabled(true), hovered(false), longPress(false), moved(false), stealMouse(false), doubleClick(false), preventStealing(false), @@ -1129,6 +1131,7 @@ void QQuickMouseArea::setHovered(bool h) { Q_D(QQuickMouseArea); if (d->hovered != h) { + qCDebug(DBG_HOVER_TRACE) << this << d->hovered << "->" << h; d->hovered = h; emit hoveredChanged(); d->hovered ? emit entered() : emit exited(); |