diff options
| author | Patrick Lodder <[email protected]> | 2021-03-18 23:58:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-18 23:58:49 +0100 |
| commit | 8e7d8eed221a9b76a26b4ceaa317011cd4c836c7 (patch) | |
| tree | 1e67b0127899481ad8d3ce5b46486e5929e492b1 /src | |
| parent | Merge pull request #1791 from DemonRx/rename-pixmaps (diff) | |
| parent | [qt] User-friendly interpretation of null responses in rpc console (diff) | |
| download | discoin-8e7d8eed221a9b76a26b4ceaa317011cd4c836c7.tar.xz discoin-8e7d8eed221a9b76a26b4ceaa317011cd4c836c7.zip | |
Merge pull request #1788 from patricklodder/1.14-fix-rpc-null-responses
QT: User-friendly interpretation of "null" responses in rpc console
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); } |