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/qquicktextcontrol.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/qquicktextcontrol.cpp')
-rw-r--r-- | src/quick/items/qquicktextcontrol.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp index 45238e2d0c..ef7485a8e9 100644 --- a/src/quick/items/qquicktextcontrol.cpp +++ b/src/quick/items/qquicktextcontrol.cpp @@ -58,6 +58,7 @@ #include "qtextlist.h" #include "qtextdocumentwriter.h" #include "private/qtextcursor_p.h" +#include <QtCore/qloggingcategory.h> #include <qtextformat.h> #include <qdatetime.h> @@ -76,6 +77,7 @@ const int textCursorWidth = 1; QT_BEGIN_NAMESPACE +Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE) #ifndef QT_NO_CONTEXTMENU #endif @@ -1513,6 +1515,7 @@ void QQuickTextControlPrivate::hoverEvent(QHoverEvent *e, const QPointF &pos) hoveredLink = link; emit q->linkHovered(link); } + qCDebug(DBG_HOVER_TRACE) << q << e->type() << pos << "hoveredLink" << hoveredLink; } bool QQuickTextControl::hasImState() const |