From 41c6b8abc60f90e73ae4ad89b0a922638a61bbea Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 21 May 2012 23:05:54 +0200 Subject: add client startup time as an entry to debug.log (note: logged time in debug.log differs by a few seconds from the one displayed in the Debug window) / make ClientModel::formatClientStartupTime() return a QString --- src/qt/clientmodel.cpp | 4 ++-- src/qt/clientmodel.h | 2 +- src/qt/rpcconsole.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qt') diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 64fd2a9450..cabbd5d240 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -130,9 +130,9 @@ QString ClientModel::clientName() const return QString::fromStdString(CLIENT_NAME); } -QDateTime ClientModel::formatClientStartupTime() const +QString ClientModel::formatClientStartupTime() const { - return QDateTime::fromTime_t(nClientStartupTime); + return QDateTime::fromTime_t(nClientStartupTime).toString(); } // Handlers for core signals diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 0349c389c5..70d816ba9d 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -41,7 +41,7 @@ public: QString formatFullVersion() const; QString formatBuildDate() const; QString clientName() const; - QDateTime formatClientStartupTime() const; + QString formatClientStartupTime() const; private: OptionsModel *optionsModel; diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 7029ee33bc..830ce4face 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -163,7 +163,7 @@ void RPCConsole::setClientModel(ClientModel *model) ui->clientVersion->setText(model->formatFullVersion()); ui->clientName->setText(model->clientName()); ui->buildDate->setText(model->formatBuildDate()); - ui->startupTime->setText(model->formatClientStartupTime().toString()); + ui->startupTime->setText(model->formatClientStartupTime()); setNumConnections(model->getNumConnections()); ui->isTestNet->setChecked(model->isTestNet()); -- cgit v1.2.3