Add source to debug output of QMouseEvent.

Change-Id: Ibf55a2697ca0ac85624097299be92c1055dcb8aa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Friedemann Kleint 2014-02-28 12:40:11 +01:00 committed by The Qt Project
parent d4a4ef9e38
commit fdd8a1b42c

View File

@ -3295,11 +3295,14 @@ QDebug operator<<(QDebug dbg, const QEvent *e) {
n = "MouseButtonDblClick";
break;
}
dbg.nospace() << "QMouseEvent(" << n
QDebug nsp = dbg.nospace();
nsp << "QMouseEvent(" << n
<< ", " << me->button()
<< ", " << hex << (int)me->buttons()
<< ", " << hex << (int)me->modifiers()
<< ')';
<< ", " << hex << (int)me->modifiers() << dec;
if (const Qt::MouseEventSource source = me->source())
nsp << ", source = " << source;
nsp << ')';
}
return dbg.space();