summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-02-15 11:53:00 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-15 19:27:35 +0000
commitc0775e9a9cfb9541fc61d788516cfc635338b4f8 (patch)
tree9222e3a92cfce6425f9fc6d39b87b836cba28051
parente337ba277beb6d08dbb9ca78e74d6cc22f56e3b6 (diff)
Rename DBG_* logging categories in Qt Quick
We prefer camelCase rather than SHOUTING for module constants. It fits well to have logging categories as constants that start with lc. That has become conventional in various modules, and we've been using that convention already for some time when defining new logging categories. Now we finish renaming the Qt Quick ones, ahead of a refactoring which will result in moving some of them around. Change-Id: I47003b9e525fe70d35dbd2450d03379b52d67c1d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a8685fdb4d57c0ba36d80c395c2ae878595f04da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/handlers/qquickhandlerpoint.cpp2
-rw-r--r--src/quick/handlers/qquicksinglepointhandler.cpp4
-rw-r--r--src/quick/items/qquickitem.cpp24
-rw-r--r--src/quick/items/qquickmousearea.cpp4
-rw-r--r--src/quick/items/qquicktext.cpp4
-rw-r--r--src/quick/items/qquicktextcontrol.cpp6
-rw-r--r--src/quick/items/qquickwindow.cpp90
-rw-r--r--src/quick/qtquickglobal_p.h8
8 files changed, 71 insertions, 71 deletions
diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp
index 35c3bb1b3f..7b804a477c 100644
--- a/src/quick/handlers/qquickhandlerpoint.cpp
+++ b/src/quick/handlers/qquickhandlerpoint.cpp
@@ -41,7 +41,7 @@
#include "private/qquickevents_p_p.h"
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(DBG_TOUCH_TARGET)
+Q_DECLARE_LOGGING_CATEGORY(lcTouchTarget)
/*!
\qmltype HandlerPoint
diff --git a/src/quick/handlers/qquicksinglepointhandler.cpp b/src/quick/handlers/qquicksinglepointhandler.cpp
index 18636991e6..6289177894 100644
--- a/src/quick/handlers/qquicksinglepointhandler.cpp
+++ b/src/quick/handlers/qquicksinglepointhandler.cpp
@@ -41,7 +41,7 @@
#include "qquicksinglepointhandler_p_p.h"
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(DBG_TOUCH_TARGET)
+Q_DECLARE_LOGGING_CATEGORY(lcTouchTarget)
/*!
\qmltype SinglePointHandler
@@ -94,7 +94,7 @@ bool QQuickSinglePointHandler::wantsPointerEvent(QPointerEvent *event)
}
}
if (missing)
- qCWarning(DBG_TOUCH_TARGET) << this << "pointId" << Qt::hex << d->pointInfo.id()
+ qCWarning(lcTouchTarget) << this << "pointId" << Qt::hex << d->pointInfo.id()
<< "is missing from current event, but was neither canceled nor released";
if (point) {
if (candidatePointCount == 1 || (candidatePointCount > 1 && d->ignoreAdditionalPoints)) {
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index dfa255c05b..93512d70f8 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -89,15 +89,15 @@
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(DBG_MOUSE_TARGET)
-Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
+Q_DECLARE_LOGGING_CATEGORY(lcMouseTarget)
+Q_DECLARE_LOGGING_CATEGORY(lcHoverTrace)
Q_DECLARE_LOGGING_CATEGORY(lcTransient)
Q_LOGGING_CATEGORY(lcHandlerParent, "qt.quick.handler.parent")
void debugFocusTree(QQuickItem *item, QQuickItem *scope = nullptr, int depth = 1)
{
- if (DBG_FOCUS().isEnabled(QtDebugMsg)) {
- qCDebug(DBG_FOCUS)
+ if (lcFocus().isEnabled(QtDebugMsg)) {
+ qCDebug(lcFocus)
<< QByteArray(depth, '\t').constData()
<< (scope && QQuickItemPrivate::get(scope)->subFocusItem == item ? '*' : ' ')
<< item->hasFocus()
@@ -2493,7 +2493,7 @@ QQuickItem *QQuickItemPrivate::prevTabChildItem(const QQuickItem *item, int star
QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, bool forward)
{
Q_ASSERT(item);
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: item:" << item << ", forward:" << forward;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: item:" << item << ", forward:" << forward;
if (!item->window())
return item;
@@ -2530,11 +2530,11 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
QQuickItem *firstFromItem = from;
QQuickItem *current = item;
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: startItem:" << startItem;
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: firstFromItem:" << firstFromItem;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: startItem:" << startItem;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: firstFromItem:" << firstFromItem;
do {
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: current:" << current;
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: from:" << from;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: current:" << current;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: from:" << from;
skip = false;
QQuickItem *last = current;
@@ -2601,10 +2601,10 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
if ((current == startItem || current == originalStartItem) && from == firstFromItem) {
// wrapped around, avoid endless loops
if (item == contentItem) {
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return contentItem";
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return contentItem";
return item;
} else {
- qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return " << startItem;
+ qCDebug(lcFocus) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return " << startItem;
return startItem;
}
}
@@ -7528,7 +7528,7 @@ void QQuickItemPrivate::setHasHoverInChild(bool hasHover)
}
}
- qCDebug(DBG_HOVER_TRACE) << q << subtreeHoverEnabled << "->" << hasHover;
+ qCDebug(lcHoverTrace) << q << subtreeHoverEnabled << "->" << hasHover;
subtreeHoverEnabled = hasHover;
QQuickItem *parent = q->parentItem();
if (parent) {
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index ac7c23f7a2..037eddd6a8 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(qmlVisualTouchDebugging, QML_VISUAL_TOUCH_DEBUGGING)
-Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
+Q_DECLARE_LOGGING_CATEGORY(lcHoverTrace)
QQuickMouseAreaPrivate::QQuickMouseAreaPrivate()
: enabled(true), scrollGestureEnabled(true), hovered(false), longPress(false),
@@ -1146,7 +1146,7 @@ void QQuickMouseArea::setHovered(bool h)
{
Q_D(QQuickMouseArea);
if (d->hovered != h) {
- qCDebug(DBG_HOVER_TRACE) << this << d->hovered << "->" << h;
+ qCDebug(lcHoverTrace) << this << d->hovered << "->" << h;
d->hovered = h;
emit hoveredChanged();
d->hovered ? emit entered() : emit exited();
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 9e56bd45e9..10399b4e27 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -72,7 +72,7 @@
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
+Q_DECLARE_LOGGING_CATEGORY(lcHoverTrace)
const QChar QQuickTextPrivate::elideChar = QChar(0x2026);
@@ -2909,7 +2909,7 @@ QString QQuickText::hoveredLink() const
void QQuickTextPrivate::processHoverEvent(QHoverEvent *event)
{
Q_Q(QQuickText);
- qCDebug(DBG_HOVER_TRACE) << q;
+ qCDebug(lcHoverTrace) << q;
QString link;
if (isLinkHoveredConnected()) {
if (event->type() != QEvent::HoverLeave)
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index 6c0ad0ae7d..a0281d1fb2 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -77,7 +77,7 @@
const int textCursorWidth = 1;
QT_BEGIN_NAMESPACE
-Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
+Q_DECLARE_LOGGING_CATEGORY(lcHoverTrace)
// could go into QTextCursor...
static QTextLine currentTextLine(const QTextCursor &cursor)
@@ -1501,14 +1501,14 @@ void QQuickTextControlPrivate::hoverEvent(QHoverEvent *e, const QPointF &pos)
if (hoveredLink != link) {
hoveredLink = link;
emit q->linkHovered(link);
- qCDebug(DBG_HOVER_TRACE) << q << e->type() << pos << "hoveredLink" << hoveredLink;
+ qCDebug(lcHoverTrace) << q << e->type() << pos << "hoveredLink" << hoveredLink;
} else {
QTextBlock block = q->blockWithMarkerAt(pos);
if (block.isValid() != hoveredMarker)
emit q->markerHovered(block.isValid());
hoveredMarker = block.isValid();
if (hoveredMarker)
- qCDebug(DBG_HOVER_TRACE) << q << e->type() << pos << "hovered marker" << int(block.blockFormat().marker()) << block.text();
+ qCDebug(lcHoverTrace) << q << e->type() << pos << "hovered marker" << int(block.blockFormat().marker()) << block.text();
}
}
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 5e4fa0c43f..acc220bba3 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -96,19 +96,19 @@
QT_BEGIN_NAMESPACE
-Q_LOGGING_CATEGORY(DBG_TOUCH, "qt.quick.touch")
+Q_LOGGING_CATEGORY(lcTouch, "qt.quick.touch")
Q_LOGGING_CATEGORY(lcTouchCmprs, "qt.quick.touch.compression")
-Q_LOGGING_CATEGORY(DBG_TOUCH_TARGET, "qt.quick.touch.target")
-Q_LOGGING_CATEGORY(DBG_MOUSE, "qt.quick.mouse")
-Q_LOGGING_CATEGORY(DBG_MOUSE_TARGET, "qt.quick.mouse.target")
+Q_LOGGING_CATEGORY(lcTouchTarget, "qt.quick.touch.target")
+Q_LOGGING_CATEGORY(lcMouse, "qt.quick.mouse")
+Q_LOGGING_CATEGORY(lcMouseTarget, "qt.quick.mouse.target")
Q_LOGGING_CATEGORY(lcPtr, "qt.quick.pointer")
Q_LOGGING_CATEGORY(lcPtrGrab, "qt.quick.pointer.grab")
Q_LOGGING_CATEGORY(lcTablet, "qt.quick.tablet")
Q_LOGGING_CATEGORY(lcWheelTarget, "qt.quick.wheel.target")
Q_LOGGING_CATEGORY(lcGestureTarget, "qt.quick.gesture.target")
-Q_LOGGING_CATEGORY(DBG_HOVER_TRACE, "qt.quick.hover.trace")
-Q_LOGGING_CATEGORY(DBG_FOCUS, "qt.quick.focus")
-Q_LOGGING_CATEGORY(DBG_DIRTY, "qt.quick.dirty")
+Q_LOGGING_CATEGORY(lcHoverTrace, "qt.quick.hover.trace")
+Q_LOGGING_CATEGORY(lcFocus, "qt.quick.focus")
+Q_LOGGING_CATEGORY(lcDirty, "qt.quick.dirty")
Q_LOGGING_CATEGORY(lcTransient, "qt.quick.window.transient")
extern Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1);
@@ -928,7 +928,7 @@ QPointingDevicePrivate::EventPointData *QQuickWindowPrivate::mousePointData()
void QQuickWindowPrivate::cancelTouchMouseSynthesis()
{
- qCDebug(DBG_TOUCH_TARGET) << "id" << touchMouseId << "on" << touchMouseDevice;
+ qCDebug(lcTouchTarget) << "id" << touchMouseId << "on" << touchMouseDevice;
touchMouseId = -1;
touchMouseDevice = nullptr;
}
@@ -940,7 +940,7 @@ bool QQuickWindowPrivate::deliverTouchAsMouse(QQuickItem *item, QTouchEvent *poi
// A touch event from a trackpad is likely to be followed by a mouse or gesture event, so mouse event synth is redundant
if (device->type() == QInputDevice::DeviceType::TouchPad && device->capabilities().testFlag(QInputDevice::Capability::MouseEmulation)) {
- qCDebug(DBG_TOUCH_TARGET) << "skipping delivery of synth-mouse event from" << device;
+ qCDebug(lcTouchTarget) << "skipping delivery of synth-mouse event from" << device;
return false;
}
@@ -962,7 +962,7 @@ bool QQuickWindowPrivate::deliverTouchAsMouse(QQuickItem *item, QTouchEvent *poi
if (!item->contains(pos))
break;
- qCDebug(DBG_TOUCH_TARGET) << device << "TP (mouse)" << Qt::hex << p.id() << "->" << item;
+ qCDebug(lcTouchTarget) << device << "TP (mouse)" << Qt::hex << p.id() << "->" << item;
QMutableSinglePointEvent mousePress;
touchToMouseEvent(QEvent::MouseButtonPress, p, &event, &mousePress);
@@ -1006,7 +1006,7 @@ bool QQuickWindowPrivate::deliverTouchAsMouse(QQuickItem *item, QTouchEvent *poi
QCoreApplication::sendEvent(item, &me);
event.setAccepted(me.isAccepted());
if (me.isAccepted())
- qCDebug(DBG_TOUCH_TARGET) << device << "TP (mouse)" << Qt::hex << p.id() << "->" << mouseGrabberItem;
+ qCDebug(lcTouchTarget) << device << "TP (mouse)" << Qt::hex << p.id() << "->" << mouseGrabberItem;
return event.isAccepted();
} else {
// no grabber, check if we care about mouse hover
@@ -1080,7 +1080,7 @@ void QQuickWindowPrivate::removeGrabber(QQuickItem *grabber, bool mouse, bool to
auto point = eventInDelivery->pointById(fromTouch ? touchMouseId : 0);
Q_ASSERT(point);
QQuickItem *oldGrabber = qobject_cast<QQuickItem *>(eventInDelivery->exclusiveGrabber(*point));
- qCDebug(DBG_MOUSE_TARGET) << "removeGrabber" << oldGrabber << "-> null";
+ qCDebug(lcMouseTarget) << "removeGrabber" << oldGrabber << "-> null";
eventInDelivery->setExclusiveGrabber(*point, nullptr);
}
if (Q_LIKELY(touch)) {
@@ -1147,12 +1147,12 @@ void QQuickWindowPrivate::setFocusInScope(QQuickItem *scope, QQuickItem *item, Q
Q_ASSERT(item);
Q_ASSERT(scope || item == contentItem);
- qCDebug(DBG_FOCUS) << "QQuickWindowPrivate::setFocusInScope():";
- qCDebug(DBG_FOCUS) << " scope:" << (QObject *)scope;
+ qCDebug(lcFocus) << "QQuickWindowPrivate::setFocusInScope():";
+ qCDebug(lcFocus) << " scope:" << (QObject *)scope;
if (scope)
- qCDebug(DBG_FOCUS) << " scopeSubFocusItem:" << (QObject *)QQuickItemPrivate::get(scope)->subFocusItem;
- qCDebug(DBG_FOCUS) << " item:" << (QObject *)item;
- qCDebug(DBG_FOCUS) << " activeFocusItem:" << (QObject *)activeFocusItem;
+ qCDebug(lcFocus) << " scopeSubFocusItem:" << (QObject *)QQuickItemPrivate::get(scope)->subFocusItem;
+ qCDebug(lcFocus) << " item:" << (QObject *)item;
+ qCDebug(lcFocus) << " activeFocusItem:" << (QObject *)activeFocusItem;
QQuickItemPrivate *scopePrivate = scope ? QQuickItemPrivate::get(scope) : nullptr;
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
@@ -1267,10 +1267,10 @@ void QQuickWindowPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item,
Q_ASSERT(item);
Q_ASSERT(scope || item == contentItem);
- qCDebug(DBG_FOCUS) << "QQuickWindowPrivate::clearFocusInScope():";
- qCDebug(DBG_FOCUS) << " scope:" << (QObject *)scope;
- qCDebug(DBG_FOCUS) << " item:" << (QObject *)item;
- qCDebug(DBG_FOCUS) << " activeFocusItem:" << (QObject *)activeFocusItem;
+ qCDebug(lcFocus) << "QQuickWindowPrivate::clearFocusInScope():";
+ qCDebug(lcFocus) << " scope:" << (QObject *)scope;
+ qCDebug(lcFocus) << " item:" << (QObject *)item;
+ qCDebug(lcFocus) << " activeFocusItem:" << (QObject *)activeFocusItem;
QQuickItemPrivate *scopePrivate = nullptr;
if (scope) {
@@ -1878,7 +1878,7 @@ QQuickItem *QQuickWindow::mouseGrabberItem() const
Q_D(const QQuickWindow);
auto epd = const_cast<QQuickWindowPrivate *>(d)->mousePointData();
if (!epd && d->eventsInDelivery.isEmpty()) {
- qCDebug(DBG_MOUSE, "mouse grabber ambiguous: no event is currently being delivered");
+ qCDebug(lcMouse, "mouse grabber ambiguous: no event is currently being delivered");
return qmlobject_cast<QQuickItem *>(QPointingDevicePrivate::get(QPointingDevice::primaryPointingDevice())->
firstPointExclusiveGrabber());
}
@@ -2142,11 +2142,11 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
return false;
}
- if (Q_UNLIKELY(DBG_HOVER_TRACE().isDebugEnabled())) {
+ if (Q_UNLIKELY(lcHoverTrace().isDebugEnabled())) {
if (lastScenePos == scenePos)
- qCDebug(DBG_HOVER_TRACE) << scenePos << "(unchanged)" << item << "subtreeHoverEnabled" << itemPrivate->subtreeHoverEnabled << "in window" << windowTitle;
+ qCDebug(lcHoverTrace) << scenePos << "(unchanged)" << item << "subtreeHoverEnabled" << itemPrivate->subtreeHoverEnabled << "in window" << windowTitle;
else
- qCDebug(DBG_HOVER_TRACE) << lastScenePos << "->" << scenePos << item << "subtreeHoverEnabled" << itemPrivate->subtreeHoverEnabled << "in window" << windowTitle;
+ qCDebug(lcHoverTrace) << lastScenePos << "->" << scenePos << item << "subtreeHoverEnabled" << itemPrivate->subtreeHoverEnabled << "in window" << windowTitle;
}
if (itemPrivate->subtreeHoverEnabled) {
QList<QQuickItem *> children = itemPrivate->paintOrderChildItems();
@@ -2259,7 +2259,7 @@ void QQuickWindow::wheelEvent(QWheelEvent *event)
Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseWheel,
event->angleDelta().x(), event->angleDelta().y());
- qCDebug(DBG_MOUSE) << event;
+ qCDebug(lcMouse) << event;
//if the actual wheel event was accepted, accept the compatibility wheel event and return early
if (d->lastWheelEventAccepted && event->angleDelta().isNull() && event->phase() == Qt::ScrollUpdate)
@@ -2284,7 +2284,7 @@ void QQuickWindow::tabletEvent(QTabletEvent *event)
bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event)
{
- qCDebug(DBG_TOUCH) << event;
+ qCDebug(lcTouch) << event;
// An incoming TouchCancel event will typically not contain any points,
// but sendTouchCancelEvent() adds the points that have grabbers to the event.
@@ -2318,7 +2318,7 @@ void QQuickWindowPrivate::deliverDelayedTouchEvent()
void QQuickWindowPrivate::handleWindowDeactivate()
{
Q_Q(QQuickWindow);
- qCDebug(DBG_FOCUS) << "deactivated" << windowTitle;
+ qCDebug(lcFocus) << "deactivated" << windowTitle;
const auto inputDevices = QInputDevice::devices();
for (auto device : inputDevices) {
if (auto pointingDevice = qobject_cast<const QPointingDevice *>(device)) {
@@ -2493,7 +2493,7 @@ void QQuickWindowPrivate::handleTouchEvent(QTouchEvent *event)
}
}
- qCDebug(DBG_TOUCH) << event;
+ qCDebug(lcTouch) << event;
static bool qquickwindow_no_touch_compression = qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
@@ -2542,7 +2542,7 @@ void QQuickWindowPrivate::handleMouseEvent(QMouseEvent *event)
event->accept();
return;
}
- qCDebug(DBG_MOUSE) << event;
+ qCDebug(lcMouse) << event;
switch (event->type()) {
case QEvent::MouseButtonPress:
@@ -2568,7 +2568,7 @@ void QQuickWindowPrivate::handleMouseEvent(QMouseEvent *event)
Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseMove,
event->position().x(), event->position().y());
- qCDebug(DBG_HOVER_TRACE) << this;
+ qCDebug(lcHoverTrace) << this;
#if QT_CONFIG(cursor)
updateCursor(event->scenePosition());
@@ -2883,7 +2883,7 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QPointerEvent *event, bool
if (qobject_cast<QQuickPointerHandler *>(event->exclusiveGrabber(point->eventPoint)))
cancelTouchMouseSynthesis();
} else {
- qCWarning(DBG_TOUCH_TARGET) << "during delivery of touch press, synth-mouse ID" << Qt::hex << touchMouseId << "is missing from" << event;
+ qCWarning(lcTouchTarget) << "during delivery of touch press, synth-mouse ID" << Qt::hex << touchMouseId << "is missing from" << event;
}
}
for (int i = 0; i < event->pointCount(); ++i) {
@@ -3002,7 +3002,7 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, bool isG
return; // no points inside this item
if (item->acceptTouchEvents()) {
- qCDebug(DBG_TOUCH) << "considering delivering" << &touchEvent << " to " << item;
+ qCDebug(lcTouch) << "considering delivering" << &touchEvent << " to " << item;
// If any parent filters the event, we're done.
hasFiltered.clear();
@@ -3010,7 +3010,7 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, bool isG
return;
// Deliver the touch event to the given item
- qCDebug(DBG_TOUCH) << "actually delivering" << &touchEvent << " to " << item;
+ qCDebug(lcTouch) << "actually delivering" << &touchEvent << " to " << item;
QCoreApplication::sendEvent(item, &touchEvent);
eventAccepted = touchEvent.isAccepted();
} else if (Q_LIKELY(QCoreApplication::testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents))) {
@@ -3039,7 +3039,7 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, bool isG
for (const auto &point: touchEvent.points()) {
if (point.state() == QEventPoint::State::Pressed) {
if (pointerEvent->exclusiveGrabber(point) == item) {
- qCDebug(DBG_TOUCH_TARGET) << "TP" << Qt::hex << point.id() << "disassociated";
+ qCDebug(lcTouchTarget) << "TP" << Qt::hex << point.id() << "disassociated";
pointerEvent->setExclusiveGrabber(point, nullptr);
}
}
@@ -3287,7 +3287,7 @@ bool QQuickWindowPrivate::sendFilteredPointerEventImpl(QPointerEvent *event, QQu
event->setAccepted(true);
auto oldMouseGrabber = event->exclusiveGrabber(event->point(0));
if (filteringParent->childMouseEventFilter(receiver, event)) {
- qCDebug(DBG_MOUSE) << "mouse event intercepted by childMouseEventFilter of " << filteringParent;
+ qCDebug(lcMouse) << "mouse event intercepted by childMouseEventFilter of " << filteringParent;
skipDelivery.append(filteringParent);
filtered = true;
if (event->isAccepted() && event->isBeginEvent()) {
@@ -3309,23 +3309,23 @@ bool QQuickWindowPrivate::sendFilteredPointerEventImpl(QPointerEvent *event, QQu
auto device = event->device();
if (device->type() == QInputDevice::DeviceType::TouchPad &&
device->capabilities().testFlag(QInputDevice::Capability::MouseEmulation)) {
- qCDebug(DBG_TOUCH_TARGET) << "skipping filtering of synth-mouse event from" << device;
+ qCDebug(lcTouchTarget) << "skipping filtering of synth-mouse event from" << device;
} else if (acceptsTouchEvents || receiver->acceptedMouseButtons()) {
// get a touch event customized for delivery to filteringParent
// TODO should not be necessary? because QQuickWindowPrivate::deliverMatchingPointsToItem() does it
QMutableTouchEvent filteringParentTouchEvent;
QQuickItemPrivate::get(receiver)->localizedTouchEvent(static_cast<QTouchEvent *>(event), true, &filteringParentTouchEvent);
if (filteringParentTouchEvent.type() != QEvent::None) {
- qCDebug(DBG_TOUCH) << "letting parent" << filteringParent << "filter for" << receiver << &filteringParentTouchEvent;
+ qCDebug(lcTouch) << "letting parent" << filteringParent << "filter for" << receiver << &filteringParentTouchEvent;
if (filteringParent->childMouseEventFilter(receiver, &filteringParentTouchEvent)) {
- qCDebug(DBG_TOUCH) << "touch event intercepted by childMouseEventFilter of " << filteringParent;
+ qCDebug(lcTouch) << "touch event intercepted by childMouseEventFilter of " << filteringParent;
skipDelivery.append(filteringParent);
for (auto point : filteringParentTouchEvent.points())
event->setExclusiveGrabber(point, filteringParent);
return true;
} else if (Q_LIKELY(QCoreApplication::testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)) &&
!filteringParent->acceptTouchEvents()) {
- qCDebug(DBG_TOUCH) << "touch event NOT intercepted by childMouseEventFilter of " << filteringParent
+ qCDebug(lcTouch) << "touch event NOT intercepted by childMouseEventFilter of " << filteringParent
<< "; accepts touch?" << filteringParent->acceptTouchEvents()
<< "receiver accepts touch?" << acceptsTouchEvents
<< "so, letting parent filter a synth-mouse event";
@@ -3359,10 +3359,10 @@ bool QQuickWindowPrivate::sendFilteredPointerEventImpl(QPointerEvent *event, QQu
touchMouseId = tp.id();
touchMouseDevice = event->pointingDevice();
if (filteringParent->childMouseEventFilter(receiver, &mouseEvent)) {
- qCDebug(DBG_TOUCH) << "touch event intercepted as synth mouse event by childMouseEventFilter of " << filteringParent;
+ qCDebug(lcTouch) << "touch event intercepted as synth mouse event by childMouseEventFilter of " << filteringParent;
skipDelivery.append(filteringParent);
if (t != QEvent::MouseButtonRelease) {
- qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << Qt::hex << tp.id() << "->" << filteringParent;
+ qCDebug(lcTouchTarget) << "TP (mouse)" << Qt::hex << tp.id() << "->" << filteringParent;
filteringParentTouchEvent.setExclusiveGrabber(tp, filteringParent);
touchMouseUnset = false; // We want to leave touchMouseId and touchMouseDevice set
if (mouseEvent.isAccepted())
@@ -3404,7 +3404,7 @@ bool QQuickWindowPrivate::sendFilteredMouseEvent(QEvent *event, QQuickItem *rece
filtered = true;
skipDelivery.append(filteringParent);
}
- qCDebug(DBG_MOUSE_TARGET) << "for" << receiver << filteringParent << "childMouseEventFilter ->" << filtered;
+ qCDebug(lcMouseTarget) << "for" << receiver << filteringParent << "childMouseEventFilter ->" << filtered;
}
return sendFilteredMouseEvent(event, receiver, filteringParent->parentItem()) || filtered;
@@ -3587,7 +3587,7 @@ void QQuickWindowPrivate::cleanupNodesOnShutdown()
void QQuickWindowPrivate::updateDirtyNodes()
{
- qCDebug(DBG_DIRTY) << "QQuickWindowPrivate::updateDirtyNodes():";
+ qCDebug(lcDirty) << "QQuickWindowPrivate::updateDirtyNodes():";
cleanupNodes();
@@ -3600,7 +3600,7 @@ void QQuickWindowPrivate::updateDirtyNodes()
QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item);
itemPriv->removeFromDirtyList();
- qCDebug(DBG_DIRTY) << " QSGNode:" << item << qPrintable(itemPriv->dirtyToString());
+ qCDebug(lcDirty) << " QSGNode:" << item << qPrintable(itemPriv->dirtyToString());
updateDirtyNode(item);
}
}
diff --git a/src/quick/qtquickglobal_p.h b/src/quick/qtquickglobal_p.h
index e527428808..797d9f169a 100644
--- a/src/quick/qtquickglobal_p.h
+++ b/src/quick/qtquickglobal_p.h
@@ -67,10 +67,10 @@ QT_BEGIN_NAMESPACE
void Q_QUICK_PRIVATE_EXPORT QQuick_initializeModule();
-Q_DECLARE_LOGGING_CATEGORY(DBG_TOUCH)
-Q_DECLARE_LOGGING_CATEGORY(DBG_MOUSE)
-Q_DECLARE_LOGGING_CATEGORY(DBG_FOCUS)
-Q_DECLARE_LOGGING_CATEGORY(DBG_DIRTY)
+Q_DECLARE_LOGGING_CATEGORY(lcTouch)
+Q_DECLARE_LOGGING_CATEGORY(lcMouse)
+Q_DECLARE_LOGGING_CATEGORY(lcFocus)
+Q_DECLARE_LOGGING_CATEGORY(lcDirty)
QT_END_NAMESPACE