diff options
| author | Patrick Lodder <[email protected]> | 2021-03-10 12:08:36 +0100 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2021-03-11 10:02:18 +0100 |
| commit | 843281ce8708c9d2278918bed3d037372c4f22da (patch) | |
| tree | 081ce70f0bd20a41fbf5ae0b39626be361eb7bee /src | |
| parent | Merge pull request #1785 from suprnurd/1.14-dev-fix-depends-links (diff) | |
| download | discoin-843281ce8708c9d2278918bed3d037372c4f22da.tar.xz discoin-843281ce8708c9d2278918bed3d037372c4f22da.zip | |
[qt] User-friendly interpretation of null responses in rpc console
Translates "null" (UniValueNull) to "Empty response".
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 77e5e03e6..7bf01c906 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -752,10 +752,19 @@ void RPCConsole::message(int category, const QString &message, bool html) out += "<table><tr><td class=\"time\" width=\"65\">" + timeString + "</td>"; out += "<td class=\"icon\" width=\"32\"><img src=\"" + categoryClass(category) + "\"></td>"; out += "<td class=\"message " + categoryClass(category) + "\" valign=\"middle\">"; + + QString interpretedMessage; + if(category == CMD_REPLY && message == "null") + { + interpretedMessage = "Empty response"; + } else { + interpretedMessage = message; + } + if(html) - out += message; + out += interpretedMessage; else - out += GUIUtil::HtmlEscape(message, false); + out += GUIUtil::HtmlEscape(interpretedMessage, false); out += "</td></tr></table>"; ui->messagesWidget->append(out); } |