diff options
| author | Jonas Schnelli <[email protected]> | 2016-09-21 10:29:57 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-09-23 16:07:21 +0200 |
| commit | 08827df3ecce925928dc3bedcdef63bfca290300 (patch) | |
| tree | 29d9b9a06371b8f4d6b66036d9f98f3def55b7ae /src/qt/modaloverlay.cpp | |
| parent | [Qt] only update "amount of blocks left" when the header chain is in-sync (diff) | |
| download | discoin-08827df3ecce925928dc3bedcdef63bfca290300.tar.xz discoin-08827df3ecce925928dc3bedcdef63bfca290300.zip | |
[Qt] modalinfolayer: removed unused comments, renamed signal, code style overhaul
Diffstat (limited to 'src/qt/modaloverlay.cpp')
| -rw-r--r-- | src/qt/modaloverlay.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp index c54889039..7b121e9e8 100644 --- a/src/qt/modaloverlay.cpp +++ b/src/qt/modaloverlay.cpp @@ -86,7 +86,6 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri // show progress speed if we have more then one sample if (blockProcessTime.size() >= 2) { - // try to get the window from the last 500 seconds or at least 10 samples double progressStart = blockProcessTime[0].second; double progressDelta = 0; double progressPerHour = 0; @@ -114,9 +113,9 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri ui->expectedTimeLeft->setText(GUIUtil::formateNiceTimeOffset(remainingMSecs/1000.0)); // keep maximal 5000 samples - static int maxSamples = 5000; - if (blockProcessTime.count() > maxSamples) - blockProcessTime.remove(maxSamples, blockProcessTime.count()-maxSamples); + static const int MAX_SAMPLES = 5000; + if (blockProcessTime.count() > MAX_SAMPLES) + blockProcessTime.remove(MAX_SAMPLES, blockProcessTime.count()-MAX_SAMPLES); } // show the last block date |