dbus: Print out 'serial' and 'serial reply to' with DBusMessage operator<<.
The reply serial is displayed for method call returns and errors, while the serial is displayed for all message types. To see a message serial it is required to dump messages after sending, not before. Task-number: QTBUG-44490 Change-Id: I859f50d739ed059d5b2dfe1a2efdf04b906891a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
618e2cc081
commit
d3fe4f066f
@ -1819,8 +1819,8 @@ bool QDBusConnectionPrivate::send(const QDBusMessage& message)
|
||||
}
|
||||
|
||||
q_dbus_message_set_no_reply(msg, true); // the reply would not be delivered to anything
|
||||
qDBusDebug() << this << "sending message (no reply):" << message;
|
||||
emit messageNeedsSending(Q_NULLPTR, msg);
|
||||
qDBusDebug() << this << "sending message (no reply):" << message;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2019,8 +2019,8 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
|
||||
lastError = error;
|
||||
processFinishedCall(pcall);
|
||||
} else {
|
||||
qDBusDebug() << this << "sending message:" << message;
|
||||
emit messageNeedsSending(pcall, msg, timeout);
|
||||
qDBusDebug() << this << "sending message:" << message;
|
||||
}
|
||||
return pcall;
|
||||
}
|
||||
|
@ -861,10 +861,16 @@ QDebug operator<<(QDebug dbg, const QDBusMessage &msg)
|
||||
msg.type() == QDBusMessage::SignalMessage)
|
||||
dbg.nospace() << ", path=" << msg.path()
|
||||
<< ", interface=" << msg.interface()
|
||||
<< ", member=" << msg.member();
|
||||
<< ", member=" << msg.member()
|
||||
<< ", serial=" << msg.serial();
|
||||
if (msg.type() == QDBusMessage::ErrorMessage)
|
||||
dbg.nospace() << ", error name=" << msg.errorName()
|
||||
<< ", error message=" << msg.errorMessage();
|
||||
<< ", error message=" << msg.errorMessage()
|
||||
<< ", serial=" << msg.serial()
|
||||
<< ", reply serial=" << msg.replySerial();
|
||||
else if (msg.type() == QDBusMessage::ReplyMessage)
|
||||
dbg.nospace() << ", serial=" << msg.serial()
|
||||
<< ", reply serial=" << msg.replySerial();
|
||||
dbg.nospace() << ", signature=" << msg.signature()
|
||||
<< ", contents=(";
|
||||
debugVariantList(dbg, msg.arguments());
|
||||
|
Loading…
Reference in New Issue
Block a user