Add debug output for QScrollPrepareEvent and QScrollEvent

Change-Id: If283cecbefdf20c80ce00f689003f6a0ed9fe42b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Friedemann Kleint 2017-04-18 16:45:12 +02:00
parent 47cc9e23a3
commit c5dafb177f

View File

@ -4090,6 +4090,20 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
}
dbg << ')';
break;
case QEvent::ScrollPrepare: {
const QScrollPrepareEvent *se = static_cast<const QScrollPrepareEvent *>(e);
dbg << "QScrollPrepareEvent(viewportSize=" << se->viewportSize()
<< ", contentPosRange=" << se->contentPosRange()
<< ", contentPos=" << se->contentPos() << ')';
}
break;
case QEvent::Scroll: {
const QScrollEvent *se = static_cast<const QScrollEvent *>(e);
dbg << "QScrollEvent(contentPos=" << se->contentPos()
<< ", overshootDistance=" << se->overshootDistance()
<< ", scrollState=" << se->scrollState() << ')';
}
break;
default:
dbg << eventClassName(type) << '(';
QtDebugUtils::formatQEnum(dbg, type);