Merge #14374: qt: Add "Blocksdir" to Debug window
2ab9140c92
Add tooltips for both datadir and blocksdir (Hennadii Stepanov)3045704502
Add "Blocksdir" to Debug window (Hennadii Stepanov) Pull request description: To get the current `blocksdir` is valuable for debug purposes after merging #12653. ![screenshot from 2018-10-02 23-16-52](https://user-images.githubusercontent.com/32963518/46374770-2ef6f580-c69a-11e8-85c2-44a49fa36b28.png) Tree-SHA512: a93f2c00ee19cf6acb499d3bd9bccf4be8ef01c53c44d917ad401aa4797db02cbccb71a9c24e05262ea09345e15f9299381367fdc6951f21dd3788a4a58d2132
This commit is contained in:
commit
fe23553edd
4 changed files with 60 additions and 18 deletions
|
@ -177,6 +177,11 @@ QString ClientModel::dataDir() const
|
||||||
return GUIUtil::boostPathToQString(GetDataDir());
|
return GUIUtil::boostPathToQString(GetDataDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ClientModel::blocksDir() const
|
||||||
|
{
|
||||||
|
return GUIUtil::boostPathToQString(GetBlocksDir());
|
||||||
|
}
|
||||||
|
|
||||||
void ClientModel::updateBanlist()
|
void ClientModel::updateBanlist()
|
||||||
{
|
{
|
||||||
banTableModel->refresh();
|
banTableModel->refresh();
|
||||||
|
|
|
@ -69,6 +69,7 @@ public:
|
||||||
bool isReleaseVersion() const;
|
bool isReleaseVersion() const;
|
||||||
QString formatClientStartupTime() const;
|
QString formatClientStartupTime() const;
|
||||||
QString dataDir() const;
|
QString dataDir() const;
|
||||||
|
QString blocksDir() const;
|
||||||
|
|
||||||
bool getProxyInfo(std::string& ip_port) const;
|
bool getProxyInfo(std::string& ip_port) const;
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,9 @@
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>To specify a non-default location of the data directory use the '%1' option.</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>N/A</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -142,13 +145,42 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Blocksdir</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" colspan="2">
|
||||||
|
<widget class="QLabel" name="blocksDir">
|
||||||
|
<property name="cursor">
|
||||||
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>To specify a non-default location of the blocks directory use the '%1' option.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>N/A</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" 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="5" column="1" colspan="2">
|
<item row="6" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="startupTime">
|
<widget class="QLabel" name="startupTime">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -164,7 +196,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="labelNetwork">
|
<widget class="QLabel" name="labelNetwork">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -177,14 +209,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" 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="7" column="1" colspan="2">
|
<item row="8" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="networkName">
|
<widget class="QLabel" name="networkName">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -200,14 +232,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" 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="8" column="1" colspan="2">
|
<item row="9" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="numberOfConnections">
|
<widget class="QLabel" name="numberOfConnections">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -223,7 +255,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -236,14 +268,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="11" 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="10" column="1" colspan="2">
|
<item row="11" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="numberOfBlocks">
|
<widget class="QLabel" name="numberOfBlocks">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -259,14 +291,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="12" column="0">
|
||||||
<widget class="QLabel" name="labelLastBlockTime">
|
<widget class="QLabel" name="labelLastBlockTime">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Last block time</string>
|
<string>Last block time</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1" colspan="2">
|
<item row="12" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="lastBlockTime">
|
<widget class="QLabel" name="lastBlockTime">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -282,7 +314,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="13" column="0">
|
||||||
<widget class="QLabel" name="labelMempoolTitle">
|
<widget class="QLabel" name="labelMempoolTitle">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -295,14 +327,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0">
|
<item row="14" column="0">
|
||||||
<widget class="QLabel" name="labelNumberOfTransactions">
|
<widget class="QLabel" name="labelNumberOfTransactions">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Current number of transactions</string>
|
<string>Current number of transactions</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QLabel" name="mempoolNumberTxs">
|
<widget class="QLabel" name="mempoolNumberTxs">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -318,14 +350,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="0">
|
<item row="15" column="0">
|
||||||
<widget class="QLabel" name="labelMemoryUsage">
|
<widget class="QLabel" name="labelMemoryUsage">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Memory usage</string>
|
<string>Memory usage</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="15" column="1">
|
||||||
<widget class="QLabel" name="mempoolSize">
|
<widget class="QLabel" name="mempoolSize">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -341,7 +373,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="2" rowspan="3">
|
<item row="13" column="2" rowspan="3">
|
||||||
<layout class="QVBoxLayout" name="verticalLayoutDebugButton">
|
<layout class="QVBoxLayout" name="verticalLayoutDebugButton">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
|
@ -381,7 +413,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="0">
|
<item row="16" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
|
@ -459,6 +459,9 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||||
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
|
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QChar nonbreaking_hyphen(8209);
|
||||||
|
ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir"));
|
||||||
|
ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir"));
|
||||||
ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(tr(PACKAGE_NAME)));
|
ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(tr(PACKAGE_NAME)));
|
||||||
|
|
||||||
if (platformStyle->getImagesOnButtons()) {
|
if (platformStyle->getImagesOnButtons()) {
|
||||||
|
@ -662,6 +665,7 @@ void RPCConsole::setClientModel(ClientModel *model)
|
||||||
ui->clientVersion->setText(model->formatFullVersion());
|
ui->clientVersion->setText(model->formatFullVersion());
|
||||||
ui->clientUserAgent->setText(model->formatSubVersion());
|
ui->clientUserAgent->setText(model->formatSubVersion());
|
||||||
ui->dataDir->setText(model->dataDir());
|
ui->dataDir->setText(model->dataDir());
|
||||||
|
ui->blocksDir->setText(model->blocksDir());
|
||||||
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…
Reference in a new issue