summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qevent.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 1b853411f8..29f9c35356 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3595,6 +3595,12 @@ public:
static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("FocusReason");
return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(reason);
}
+
+ static const char *nativeGestureTypeToString(Qt::NativeGestureType type)
+ {
+ static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("NativeGestureType");
+ return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(type);
+ }
};
} // namespace
@@ -3775,7 +3781,8 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
# ifndef QT_NO_GESTURES
case QEvent::NativeGesture: {
const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e);
- dbg << "QNativeGestureEvent(localPos=" << ne->localPos() << ", value=" << ne->value() << ')';
+ dbg << "QNativeGestureEvent(" << DebugHelper::nativeGestureTypeToString(ne->gestureType())
+ << "localPos=" << ne->localPos() << ", value=" << ne->value() << ')';
}
break;
# endif // !QT_NO_GESTURES