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
|
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);
|
emit messageNeedsSending(Q_NULLPTR, msg);
|
||||||
|
qDBusDebug() << this << "sending message (no reply):" << message;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2019,8 +2019,8 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
|
|||||||
lastError = error;
|
lastError = error;
|
||||||
processFinishedCall(pcall);
|
processFinishedCall(pcall);
|
||||||
} else {
|
} else {
|
||||||
qDBusDebug() << this << "sending message:" << message;
|
|
||||||
emit messageNeedsSending(pcall, msg, timeout);
|
emit messageNeedsSending(pcall, msg, timeout);
|
||||||
|
qDBusDebug() << this << "sending message:" << message;
|
||||||
}
|
}
|
||||||
return pcall;
|
return pcall;
|
||||||
}
|
}
|
||||||
|
@ -861,10 +861,16 @@ QDebug operator<<(QDebug dbg, const QDBusMessage &msg)
|
|||||||
msg.type() == QDBusMessage::SignalMessage)
|
msg.type() == QDBusMessage::SignalMessage)
|
||||||
dbg.nospace() << ", path=" << msg.path()
|
dbg.nospace() << ", path=" << msg.path()
|
||||||
<< ", interface=" << msg.interface()
|
<< ", interface=" << msg.interface()
|
||||||
<< ", member=" << msg.member();
|
<< ", member=" << msg.member()
|
||||||
|
<< ", serial=" << msg.serial();
|
||||||
if (msg.type() == QDBusMessage::ErrorMessage)
|
if (msg.type() == QDBusMessage::ErrorMessage)
|
||||||
dbg.nospace() << ", error name=" << msg.errorName()
|
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()
|
dbg.nospace() << ", signature=" << msg.signature()
|
||||||
<< ", contents=(";
|
<< ", contents=(";
|
||||||
debugVariantList(dbg, msg.arguments());
|
debugVariantList(dbg, msg.arguments());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user