From 3045704502e8a241b60b847fd52fcbed3129a2e4 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:12:17 +0300 Subject: [PATCH] Add "Blocksdir" to Debug window To get the current blocksdir is valuable for debug purposes after merging #12653. --- src/qt/clientmodel.cpp | 5 +++ src/qt/clientmodel.h | 1 + src/qt/forms/debugwindow.ui | 62 ++++++++++++++++++++++++++----------- src/qt/rpcconsole.cpp | 1 + 4 files changed, 51 insertions(+), 18 deletions(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index b2cf4b6399..183444efab 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -177,6 +177,11 @@ QString ClientModel::dataDir() const return GUIUtil::boostPathToQString(GetDataDir()); } +QString ClientModel::blocksDir() const +{ + return GUIUtil::boostPathToQString(GetBlocksDir()); +} + void ClientModel::updateBanlist() { banTableModel->refresh(); diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index ed7ecbf73b..79e7074cca 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -69,6 +69,7 @@ class ClientModel : public QObject bool isReleaseVersion() const; QString formatClientStartupTime() const; QString dataDir() const; + QString blocksDir() const; bool getProxyInfo(std::string& ip_port) const; diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 695ed61228..322a84ee92 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -142,13 +142,39 @@ + + + Blocksdir + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Startup time - + IBeamCursor @@ -164,7 +190,7 @@ - + @@ -177,14 +203,14 @@ - + Name - + IBeamCursor @@ -200,14 +226,14 @@ - + Number of connections - + IBeamCursor @@ -223,7 +249,7 @@ - + @@ -236,14 +262,14 @@ - + Current number of blocks - + IBeamCursor @@ -259,14 +285,14 @@ - + Last block time - + IBeamCursor @@ -282,7 +308,7 @@ - + @@ -295,14 +321,14 @@ - + Current number of transactions - + IBeamCursor @@ -318,14 +344,14 @@ - + Memory usage - + IBeamCursor @@ -341,7 +367,7 @@ - + 3 @@ -381,7 +407,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 3857befdf2..5bf9893141 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -661,6 +661,7 @@ void RPCConsole::setClientModel(ClientModel *model) ui->clientVersion->setText(model->formatFullVersion()); ui->clientUserAgent->setText(model->formatSubVersion()); ui->dataDir->setText(model->dataDir()); + ui->blocksDir->setText(model->blocksDir()); ui->startupTime->setText(model->formatClientStartupTime()); ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));