From 54bd28fa758d9753464b3eb07d203521b50de1c6 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 6 Aug 2015 15:40:50 +0200 Subject: [PATCH] [Qt] show client user agent in debug window --- src/qt/clientmodel.cpp | 5 +++ src/qt/clientmodel.h | 1 + src/qt/forms/rpcconsole.ui | 76 +++++++++++++++++++++++++------------- src/qt/rpcconsole.cpp | 2 +- 4 files changed, 58 insertions(+), 26 deletions(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 41dc2ea77..97d671156 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -181,6 +181,11 @@ QString ClientModel::formatFullVersion() const return QString::fromStdString(FormatFullVersion()); } +QString ClientModel::formatSubVersion() const +{ + return QString::fromStdString(strSubVersion); +} + QString ClientModel::formatBuildDate() const { return QString::fromStdString(CLIENT_DATE); diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 68434f404..ca2da3dde 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -63,6 +63,7 @@ public: QString getStatusBarWarnings() const; QString formatFullVersion() const; + QString formatSubVersion() const; QString formatBuildDate() const; bool isReleaseVersion() const; QString clientName() const; diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 7ae823747..e8d9a958a 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -87,9 +87,9 @@ - + - Using OpenSSL version + User Agent 10 @@ -97,7 +97,7 @@ - + IBeamCursor @@ -113,9 +113,9 @@ - + - Using BerkeleyDB version + Using OpenSSL version 10 @@ -123,7 +123,7 @@ - + IBeamCursor @@ -139,14 +139,17 @@ - + - Build date + Using BerkeleyDB version + + + 10 - + IBeamCursor @@ -162,14 +165,14 @@ - + - Startup time + Build date - + IBeamCursor @@ -185,6 +188,29 @@ + + + Startup time + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + @@ -197,14 +223,14 @@ - + Name - + IBeamCursor @@ -220,14 +246,14 @@ - + Number of connections - + IBeamCursor @@ -243,7 +269,7 @@ - + @@ -256,14 +282,14 @@ - + Current number of blocks - + IBeamCursor @@ -279,14 +305,14 @@ - + Last block time - + IBeamCursor @@ -302,7 +328,7 @@ - + Qt::Vertical @@ -315,7 +341,7 @@ - + @@ -328,7 +354,7 @@ - + Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files. @@ -341,7 +367,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 3231b392f..35729bbb8 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -330,10 +330,10 @@ void RPCConsole::setClientModel(ClientModel *model) // Provide initial values ui->clientVersion->setText(model->formatFullVersion()); + ui->clientUserAgent->setText(model->formatSubVersion()); ui->clientName->setText(model->clientName()); ui->buildDate->setText(model->formatBuildDate()); ui->startupTime->setText(model->formatClientStartupTime()); - ui->networkName->setText(QString::fromStdString(Params().NetworkIDString())); } }