Skip to content

Commit 3045704

Browse files
committed
Add "Blocksdir" to Debug window
To get the current blocksdir is valuable for debug purposes after merging #12653.
1 parent 4b4e948 commit 3045704

File tree

4 files changed

+51
-18
lines changed

4 files changed

+51
-18
lines changed

src/qt/clientmodel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ QString ClientModel::dataDir() const
177177
return GUIUtil::boostPathToQString(GetDataDir());
178178
}
179179

180+
QString ClientModel::blocksDir() const
181+
{
182+
return GUIUtil::boostPathToQString(GetBlocksDir());
183+
}
184+
180185
void ClientModel::updateBanlist()
181186
{
182187
banTableModel->refresh();

src/qt/clientmodel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class ClientModel : public QObject
6969
bool isReleaseVersion() const;
7070
QString formatClientStartupTime() const;
7171
QString dataDir() const;
72+
QString blocksDir() const;
7273

7374
bool getProxyInfo(std::string& ip_port) const;
7475

src/qt/forms/debugwindow.ui

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,39 @@
142142
</widget>
143143
</item>
144144
<item row="5" column="0">
145+
<widget class="QLabel" name="label_11">
146+
<property name="text">
147+
<string>Blocksdir</string>
148+
</property>
149+
</widget>
150+
</item>
151+
<item row="5" column="1" colspan="2">
152+
<widget class="QLabel" name="blocksDir">
153+
<property name="cursor">
154+
<cursorShape>IBeamCursor</cursorShape>
155+
</property>
156+
<property name="text">
157+
<string>N/A</string>
158+
</property>
159+
<property name="textFormat">
160+
<enum>Qt::PlainText</enum>
161+
</property>
162+
<property name="wordWrap">
163+
<bool>true</bool>
164+
</property>
165+
<property name="textInteractionFlags">
166+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
167+
</property>
168+
</widget>
169+
</item>
170+
<item row="6" column="0">
145171
<widget class="QLabel" name="label_13">
146172
<property name="text">
147173
<string>Startup time</string>
148174
</property>
149175
</widget>
150176
</item>
151-
<item row="5" column="1" colspan="2">
177+
<item row="6" column="1" colspan="2">
152178
<widget class="QLabel" name="startupTime">
153179
<property name="cursor">
154180
<cursorShape>IBeamCursor</cursorShape>
@@ -164,7 +190,7 @@
164190
</property>
165191
</widget>
166192
</item>
167-
<item row="6" column="0">
193+
<item row="7" column="0">
168194
<widget class="QLabel" name="labelNetwork">
169195
<property name="font">
170196
<font>
@@ -177,14 +203,14 @@
177203
</property>
178204
</widget>
179205
</item>
180-
<item row="7" column="0">
206+
<item row="8" column="0">
181207
<widget class="QLabel" name="label_8">
182208
<property name="text">
183209
<string>Name</string>
184210
</property>
185211
</widget>
186212
</item>
187-
<item row="7" column="1" colspan="2">
213+
<item row="8" column="1" colspan="2">
188214
<widget class="QLabel" name="networkName">
189215
<property name="cursor">
190216
<cursorShape>IBeamCursor</cursorShape>
@@ -200,14 +226,14 @@
200226
</property>
201227
</widget>
202228
</item>
203-
<item row="8" column="0">
229+
<item row="9" column="0">
204230
<widget class="QLabel" name="label_7">
205231
<property name="text">
206232
<string>Number of connections</string>
207233
</property>
208234
</widget>
209235
</item>
210-
<item row="8" column="1" colspan="2">
236+
<item row="9" column="1" colspan="2">
211237
<widget class="QLabel" name="numberOfConnections">
212238
<property name="cursor">
213239
<cursorShape>IBeamCursor</cursorShape>
@@ -223,7 +249,7 @@
223249
</property>
224250
</widget>
225251
</item>
226-
<item row="9" column="0">
252+
<item row="10" column="0">
227253
<widget class="QLabel" name="label_10">
228254
<property name="font">
229255
<font>
@@ -236,14 +262,14 @@
236262
</property>
237263
</widget>
238264
</item>
239-
<item row="10" column="0">
265+
<item row="11" column="0">
240266
<widget class="QLabel" name="label_3">
241267
<property name="text">
242268
<string>Current number of blocks</string>
243269
</property>
244270
</widget>
245271
</item>
246-
<item row="10" column="1" colspan="2">
272+
<item row="11" column="1" colspan="2">
247273
<widget class="QLabel" name="numberOfBlocks">
248274
<property name="cursor">
249275
<cursorShape>IBeamCursor</cursorShape>
@@ -259,14 +285,14 @@
259285
</property>
260286
</widget>
261287
</item>
262-
<item row="11" column="0">
288+
<item row="12" column="0">
263289
<widget class="QLabel" name="labelLastBlockTime">
264290
<property name="text">
265291
<string>Last block time</string>
266292
</property>
267293
</widget>
268294
</item>
269-
<item row="11" column="1" colspan="2">
295+
<item row="12" column="1" colspan="2">
270296
<widget class="QLabel" name="lastBlockTime">
271297
<property name="cursor">
272298
<cursorShape>IBeamCursor</cursorShape>
@@ -282,7 +308,7 @@
282308
</property>
283309
</widget>
284310
</item>
285-
<item row="12" column="0">
311+
<item row="13" column="0">
286312
<widget class="QLabel" name="labelMempoolTitle">
287313
<property name="font">
288314
<font>
@@ -295,14 +321,14 @@
295321
</property>
296322
</widget>
297323
</item>
298-
<item row="13" column="0">
324+
<item row="14" column="0">
299325
<widget class="QLabel" name="labelNumberOfTransactions">
300326
<property name="text">
301327
<string>Current number of transactions</string>
302328
</property>
303329
</widget>
304330
</item>
305-
<item row="13" column="1">
331+
<item row="14" column="1">
306332
<widget class="QLabel" name="mempoolNumberTxs">
307333
<property name="cursor">
308334
<cursorShape>IBeamCursor</cursorShape>
@@ -318,14 +344,14 @@
318344
</property>
319345
</widget>
320346
</item>
321-
<item row="14" column="0">
347+
<item row="15" column="0">
322348
<widget class="QLabel" name="labelMemoryUsage">
323349
<property name="text">
324350
<string>Memory usage</string>
325351
</property>
326352
</widget>
327353
</item>
328-
<item row="14" column="1">
354+
<item row="15" column="1">
329355
<widget class="QLabel" name="mempoolSize">
330356
<property name="cursor">
331357
<cursorShape>IBeamCursor</cursorShape>
@@ -341,7 +367,7 @@
341367
</property>
342368
</widget>
343369
</item>
344-
<item row="12" column="2" rowspan="3">
370+
<item row="13" column="2" rowspan="3">
345371
<layout class="QVBoxLayout" name="verticalLayoutDebugButton">
346372
<property name="spacing">
347373
<number>3</number>
@@ -381,7 +407,7 @@
381407
</item>
382408
</layout>
383409
</item>
384-
<item row="15" column="0">
410+
<item row="16" column="0">
385411
<spacer name="verticalSpacer">
386412
<property name="orientation">
387413
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ void RPCConsole::setClientModel(ClientModel *model)
661661
ui->clientVersion->setText(model->formatFullVersion());
662662
ui->clientUserAgent->setText(model->formatSubVersion());
663663
ui->dataDir->setText(model->dataDir());
664+
ui->blocksDir->setText(model->blocksDir());
664665
ui->startupTime->setText(model->formatClientStartupTime());
665666
ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));
666667

0 commit comments

Comments
 (0)