Browse Source

[Qt] Debug window: replace "Build date" with "Datadir"

The build date does only makes sense for custom/self-compiled bitcoin-core versions because we are using static build-dates for our deterministic release builds.
Having a quick option to get the current datadir is much more valuable for debug purposes.
pull/1/head
Jonas Schnelli 6 years ago
parent
commit
4856f1d671
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
  1. 5
      src/qt/clientmodel.cpp
  2. 1
      src/qt/clientmodel.h
  3. 7
      src/qt/forms/debugwindow.ui
  4. 2
      src/qt/rpcconsole.cpp

5
src/qt/clientmodel.cpp

@ -193,6 +193,11 @@ QString ClientModel::formatClientStartupTime() const @@ -193,6 +193,11 @@ QString ClientModel::formatClientStartupTime() const
return QDateTime::fromTime_t(nClientStartupTime).toString();
}
QString ClientModel::dataDir() const
{
return QString::fromStdString(GetDataDir().string());
}
void ClientModel::updateBanlist()
{
banTableModel->refresh();

1
src/qt/clientmodel.h

@ -76,6 +76,7 @@ public: @@ -76,6 +76,7 @@ public:
bool isReleaseVersion() const;
QString clientName() const;
QString formatClientStartupTime() const;
QString dataDir() const;
private:
OptionsModel *optionsModel;

7
src/qt/forms/debugwindow.ui

@ -141,12 +141,12 @@ @@ -141,12 +141,12 @@
<item row="5" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Build date</string>
<string>Datadir</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QLabel" name="buildDate">
<widget class="QLabel" name="dataDir">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -156,6 +156,9 @@ @@ -156,6 +156,9 @@
<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>

2
src/qt/rpcconsole.cpp

@ -444,7 +444,7 @@ void RPCConsole::setClientModel(ClientModel *model) @@ -444,7 +444,7 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->clientVersion->setText(model->formatFullVersion());
ui->clientUserAgent->setText(model->formatSubVersion());
ui->clientName->setText(model->clientName());
ui->buildDate->setText(model->formatBuildDate());
ui->dataDir->setText(model->dataDir());
ui->startupTime->setText(model->formatClientStartupTime());
ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));

Loading…
Cancel
Save