aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-04 12:30:14 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-04 12:39:07 +0200
commit5c6b3d5b350888b2a5ab93c757205f22601f95a2 (patch)
treedc9e8bd7e3a0038837da52ff73e7f8c544ea6888 /src/qt/rpcconsole.cpp
parent515200298b555845696a07ae2bc0a84a5dd02ae4 (diff)
parentf7a19ef774ef92ce348215593e3590a750c345e1 (diff)
downloadbitcoin-5c6b3d5b350888b2a5ab93c757205f22601f95a2.tar.xz
Merge bitcoin-core/gui#524: Replace int with std::chrono in for the timer->setInterval() argument
f7a19ef774ef92ce348215593e3590a750c345e1 qt,refactor: Use std::chrono in TrafficGraphWidget class (Shashwat) Pull request description: The PR is a follow-up to #517 - It addresses the change suggested in [this](https://github.com/bitcoin-core/gui/pull/517#pullrequestreview-850260826) comment. - This PR changes the type of `msecsPerSample` from **int** to **std::chrono::minutes** and makes other relevant subsequent changes that were limited to the **trafficgraphwidget** file. ACKs for top commit: RandyMcMillan: tACK f7a19ef774ef92ce348215593e3590a750c345e1 hebasto: ACK f7a19ef774ef92ce348215593e3590a750c345e1 promag: Code review ACK f7a19ef774ef92ce348215593e3590a750c345e1. Tree-SHA512: 5094ba894f3051fc99148cb8f408fc6f9d6571188673dcb7bf24366cdfb3eaf6d4e41083685d578ad2a9fbe31cc491a5f3fa9b7c9ab6eb90e4dc1356f89ae18a
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 08729a7722..c5e5e69df6 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -54,6 +54,8 @@
#include <QTimer>
#include <QVariant>
+#include <chrono>
+
const int CONSOLE_HISTORY = 50;
const int INITIAL_TRAFFIC_GRAPH_MINS = 30;
const QSize FONT_RANGE(4, 40);
@@ -1140,7 +1142,7 @@ void RPCConsole::on_sldGraphRange_valueChanged(int value)
void RPCConsole::setTrafficGraphRange(int mins)
{
- ui->trafficGraph->setGraphRangeMins(mins);
+ ui->trafficGraph->setGraphRange(std::chrono::minutes{mins});
ui->lblGraphRange->setText(GUIUtil::formatDurationStr(std::chrono::minutes{mins}));
}