Skip to content

Commit c0f66ce

Browse files
committed
Merge pull request #6529
54bd28f [Qt] show client user agent in debug window (Philip Kaufmann)
2 parents 0c465f5 + 54bd28f commit c0f66ce

File tree

4 files changed

+54
-22
lines changed

4 files changed

+54
-22
lines changed

src/qt/clientmodel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ QString ClientModel::formatFullVersion() const
181181
return QString::fromStdString(FormatFullVersion());
182182
}
183183

184+
QString ClientModel::formatSubVersion() const
185+
{
186+
return QString::fromStdString(strSubVersion);
187+
}
188+
184189
QString ClientModel::formatBuildDate() const
185190
{
186191
return QString::fromStdString(CLIENT_DATE);

src/qt/clientmodel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class ClientModel : public QObject
6363
QString getStatusBarWarnings() const;
6464

6565
QString formatFullVersion() const;
66+
QString formatSubVersion() const;
6667
QString formatBuildDate() const;
6768
bool isReleaseVersion() const;
6869
QString clientName() const;

src/qt/forms/rpcconsole.ui

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,32 @@
8787
</widget>
8888
</item>
8989
<item row="3" column="0">
90+
<widget class="QLabel" name="labelClientUserAgent">
91+
<property name="text">
92+
<string>User Agent</string>
93+
</property>
94+
<property name="indent">
95+
<number>10</number>
96+
</property>
97+
</widget>
98+
</item>
99+
<item row="3" column="1">
100+
<widget class="QLabel" name="clientUserAgent">
101+
<property name="cursor">
102+
<cursorShape>IBeamCursor</cursorShape>
103+
</property>
104+
<property name="text">
105+
<string>N/A</string>
106+
</property>
107+
<property name="textFormat">
108+
<enum>Qt::PlainText</enum>
109+
</property>
110+
<property name="textInteractionFlags">
111+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
112+
</property>
113+
</widget>
114+
</item>
115+
<item row="4" column="0">
90116
<widget class="QLabel" name="label_14">
91117
<property name="text">
92118
<string>Using OpenSSL version</string>
@@ -96,7 +122,7 @@
96122
</property>
97123
</widget>
98124
</item>
99-
<item row="3" column="1">
125+
<item row="4" column="1">
100126
<widget class="QLabel" name="openSSLVersion">
101127
<property name="cursor">
102128
<cursorShape>IBeamCursor</cursorShape>
@@ -112,7 +138,7 @@
112138
</property>
113139
</widget>
114140
</item>
115-
<item row="4" column="0">
141+
<item row="5" column="0">
116142
<widget class="QLabel" name="label_berkeleyDBVersion">
117143
<property name="text">
118144
<string>Using BerkeleyDB version</string>
@@ -122,7 +148,7 @@
122148
</property>
123149
</widget>
124150
</item>
125-
<item row="4" column="1">
151+
<item row="5" column="1">
126152
<widget class="QLabel" name="berkeleyDBVersion">
127153
<property name="cursor">
128154
<cursorShape>IBeamCursor</cursorShape>
@@ -138,14 +164,14 @@
138164
</property>
139165
</widget>
140166
</item>
141-
<item row="5" column="0">
167+
<item row="6" column="0">
142168
<widget class="QLabel" name="label_12">
143169
<property name="text">
144170
<string>Build date</string>
145171
</property>
146172
</widget>
147173
</item>
148-
<item row="5" column="1">
174+
<item row="6" column="1">
149175
<widget class="QLabel" name="buildDate">
150176
<property name="cursor">
151177
<cursorShape>IBeamCursor</cursorShape>
@@ -161,14 +187,14 @@
161187
</property>
162188
</widget>
163189
</item>
164-
<item row="6" column="0">
190+
<item row="7" column="0">
165191
<widget class="QLabel" name="label_13">
166192
<property name="text">
167193
<string>Startup time</string>
168194
</property>
169195
</widget>
170196
</item>
171-
<item row="6" column="1">
197+
<item row="7" column="1">
172198
<widget class="QLabel" name="startupTime">
173199
<property name="cursor">
174200
<cursorShape>IBeamCursor</cursorShape>
@@ -184,7 +210,7 @@
184210
</property>
185211
</widget>
186212
</item>
187-
<item row="7" column="0">
213+
<item row="8" column="0">
188214
<widget class="QLabel" name="label_11">
189215
<property name="font">
190216
<font>
@@ -197,14 +223,14 @@
197223
</property>
198224
</widget>
199225
</item>
200-
<item row="8" column="0">
226+
<item row="9" column="0">
201227
<widget class="QLabel" name="label_8">
202228
<property name="text">
203229
<string>Name</string>
204230
</property>
205231
</widget>
206232
</item>
207-
<item row="8" column="1">
233+
<item row="9" column="1">
208234
<widget class="QLabel" name="networkName">
209235
<property name="cursor">
210236
<cursorShape>IBeamCursor</cursorShape>
@@ -220,14 +246,14 @@
220246
</property>
221247
</widget>
222248
</item>
223-
<item row="9" column="0">
249+
<item row="10" column="0">
224250
<widget class="QLabel" name="label_7">
225251
<property name="text">
226252
<string>Number of connections</string>
227253
</property>
228254
</widget>
229255
</item>
230-
<item row="9" column="1">
256+
<item row="10" column="1">
231257
<widget class="QLabel" name="numberOfConnections">
232258
<property name="cursor">
233259
<cursorShape>IBeamCursor</cursorShape>
@@ -243,7 +269,7 @@
243269
</property>
244270
</widget>
245271
</item>
246-
<item row="10" column="0">
272+
<item row="11" column="0">
247273
<widget class="QLabel" name="label_10">
248274
<property name="font">
249275
<font>
@@ -256,14 +282,14 @@
256282
</property>
257283
</widget>
258284
</item>
259-
<item row="11" column="0">
285+
<item row="12" column="0">
260286
<widget class="QLabel" name="label_3">
261287
<property name="text">
262288
<string>Current number of blocks</string>
263289
</property>
264290
</widget>
265291
</item>
266-
<item row="11" column="1">
292+
<item row="12" column="1">
267293
<widget class="QLabel" name="numberOfBlocks">
268294
<property name="cursor">
269295
<cursorShape>IBeamCursor</cursorShape>
@@ -279,14 +305,14 @@
279305
</property>
280306
</widget>
281307
</item>
282-
<item row="12" column="0">
308+
<item row="13" column="0">
283309
<widget class="QLabel" name="label_2">
284310
<property name="text">
285311
<string>Last block time</string>
286312
</property>
287313
</widget>
288314
</item>
289-
<item row="12" column="1">
315+
<item row="13" column="1">
290316
<widget class="QLabel" name="lastBlockTime">
291317
<property name="cursor">
292318
<cursorShape>IBeamCursor</cursorShape>
@@ -302,7 +328,7 @@
302328
</property>
303329
</widget>
304330
</item>
305-
<item row="13" column="0">
331+
<item row="14" column="0">
306332
<spacer name="verticalSpacer_2">
307333
<property name="orientation">
308334
<enum>Qt::Vertical</enum>
@@ -315,7 +341,7 @@
315341
</property>
316342
</spacer>
317343
</item>
318-
<item row="14" column="0">
344+
<item row="15" column="0">
319345
<widget class="QLabel" name="labelDebugLogfile">
320346
<property name="font">
321347
<font>
@@ -328,7 +354,7 @@
328354
</property>
329355
</widget>
330356
</item>
331-
<item row="15" column="0">
357+
<item row="16" column="0">
332358
<widget class="QPushButton" name="openDebugLogfileButton">
333359
<property name="toolTip">
334360
<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 @@
341367
</property>
342368
</widget>
343369
</item>
344-
<item row="16" column="0">
370+
<item row="17" column="0">
345371
<spacer name="verticalSpacer">
346372
<property name="orientation">
347373
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ void RPCConsole::setClientModel(ClientModel *model)
330330

331331
// Provide initial values
332332
ui->clientVersion->setText(model->formatFullVersion());
333+
ui->clientUserAgent->setText(model->formatSubVersion());
333334
ui->clientName->setText(model->clientName());
334335
ui->buildDate->setText(model->formatBuildDate());
335336
ui->startupTime->setText(model->formatClientStartupTime());
336-
337337
ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));
338338
}
339339
}

0 commit comments

Comments
 (0)