Browse Source

[Qt] show client user agent in debug window

0.13
Philip Kaufmann 9 years ago
parent
commit
54bd28fa75
  1. 5
      src/qt/clientmodel.cpp
  2. 1
      src/qt/clientmodel.h
  3. 68
      src/qt/forms/rpcconsole.ui
  4. 2
      src/qt/rpcconsole.cpp

5
src/qt/clientmodel.cpp

@ -181,6 +181,11 @@ QString ClientModel::formatFullVersion() const
return QString::fromStdString(FormatFullVersion()); return QString::fromStdString(FormatFullVersion());
} }
QString ClientModel::formatSubVersion() const
{
return QString::fromStdString(strSubVersion);
}
QString ClientModel::formatBuildDate() const QString ClientModel::formatBuildDate() const
{ {
return QString::fromStdString(CLIENT_DATE); return QString::fromStdString(CLIENT_DATE);

1
src/qt/clientmodel.h

@ -63,6 +63,7 @@ public:
QString getStatusBarWarnings() const; QString getStatusBarWarnings() const;
QString formatFullVersion() const; QString formatFullVersion() const;
QString formatSubVersion() const;
QString formatBuildDate() const; QString formatBuildDate() const;
bool isReleaseVersion() const; bool isReleaseVersion() const;
QString clientName() const; QString clientName() const;

68
src/qt/forms/rpcconsole.ui

@ -87,6 +87,32 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="labelClientUserAgent">
<property name="text">
<string>User Agent</string>
</property>
<property name="indent">
<number>10</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="clientUserAgent">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string>N/A</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="text"> <property name="text">
<string>Using OpenSSL version</string> <string>Using OpenSSL version</string>
@ -96,7 +122,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="4" column="1">
<widget class="QLabel" name="openSSLVersion"> <widget class="QLabel" name="openSSLVersion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -112,7 +138,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_berkeleyDBVersion"> <widget class="QLabel" name="label_berkeleyDBVersion">
<property name="text"> <property name="text">
<string>Using BerkeleyDB version</string> <string>Using BerkeleyDB version</string>
@ -122,7 +148,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="5" column="1">
<widget class="QLabel" name="berkeleyDBVersion"> <widget class="QLabel" name="berkeleyDBVersion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -138,14 +164,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="6" column="0">
<widget class="QLabel" name="label_12"> <widget class="QLabel" name="label_12">
<property name="text"> <property name="text">
<string>Build date</string> <string>Build date</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="6" column="1">
<widget class="QLabel" name="buildDate"> <widget class="QLabel" name="buildDate">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -161,14 +187,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="text"> <property name="text">
<string>Startup time</string> <string>Startup time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="7" column="1">
<widget class="QLabel" name="startupTime"> <widget class="QLabel" name="startupTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -184,7 +210,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="8" column="0">
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="label_11">
<property name="font"> <property name="font">
<font> <font>
@ -197,14 +223,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="9" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1"> <item row="9" column="1">
<widget class="QLabel" name="networkName"> <widget class="QLabel" name="networkName">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -220,14 +246,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="10" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string>Number of connections</string> <string>Number of connections</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1"> <item row="10" column="1">
<widget class="QLabel" name="numberOfConnections"> <widget class="QLabel" name="numberOfConnections">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -243,7 +269,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="font"> <property name="font">
<font> <font>
@ -256,14 +282,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0"> <item row="12" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Current number of blocks</string> <string>Current number of blocks</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="1"> <item row="12" column="1">
<widget class="QLabel" name="numberOfBlocks"> <widget class="QLabel" name="numberOfBlocks">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -279,14 +305,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Last block time</string> <string>Last block time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="1"> <item row="13" column="1">
<widget class="QLabel" name="lastBlockTime"> <widget class="QLabel" name="lastBlockTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -302,7 +328,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="0"> <item row="14" column="0">
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -315,7 +341,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="14" column="0"> <item row="15" column="0">
<widget class="QLabel" name="labelDebugLogfile"> <widget class="QLabel" name="labelDebugLogfile">
<property name="font"> <property name="font">
<font> <font>
@ -328,7 +354,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="0"> <item row="16" column="0">
<widget class="QPushButton" name="openDebugLogfileButton"> <widget class="QPushButton" name="openDebugLogfileButton">
<property name="toolTip"> <property name="toolTip">
<string>Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files.</string> <string>Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files.</string>
@ -341,7 +367,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="17" column="0">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

2
src/qt/rpcconsole.cpp

@ -330,10 +330,10 @@ void RPCConsole::setClientModel(ClientModel *model)
// Provide initial values // Provide initial values
ui->clientVersion->setText(model->formatFullVersion()); ui->clientVersion->setText(model->formatFullVersion());
ui->clientUserAgent->setText(model->formatSubVersion());
ui->clientName->setText(model->clientName()); ui->clientName->setText(model->clientName());
ui->buildDate->setText(model->formatBuildDate()); ui->buildDate->setText(model->formatBuildDate());
ui->startupTime->setText(model->formatClientStartupTime()); ui->startupTime->setText(model->formatClientStartupTime());
ui->networkName->setText(QString::fromStdString(Params().NetworkIDString())); ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));
} }
} }

Loading…
Cancel
Save