Skip to content

Commit

Permalink
[Qt] use qint64 in BitcoinGUI::setNumBlocks
Browse files Browse the repository at this point in the history
- as QDateTime.secsTo() returns a qint64 also store in a qint64 and not in
  an integer
  • Loading branch information
Philip Kaufmann committed Feb 9, 2015
1 parent 32a8b6a commit 47ee8cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ void BitcoinGUI::setNumBlocks(int count)

QDateTime lastBlockDate = clientModel->getLastBlockDate();
QDateTime currentDate = QDateTime::currentDateTime();
int secs = lastBlockDate.secsTo(currentDate);
qint64 secs = lastBlockDate.secsTo(currentDate);

tooltip = tr("Processed %n blocks of transaction history.", "", count);

Expand Down Expand Up @@ -722,8 +722,8 @@ void BitcoinGUI::setNumBlocks(int count)
}
else
{
int years = secs / YEAR_IN_SECONDS;
int remainder = secs % YEAR_IN_SECONDS;
qint64 years = secs / YEAR_IN_SECONDS;
qint64 remainder = secs % YEAR_IN_SECONDS;
timeBehindText = tr("%1 and %2").arg(tr("%n year(s)", "", years)).arg(tr("%n week(s)","", remainder/WEEK_IN_SECONDS));
}

Expand Down

0 comments on commit 47ee8cf

Please sign in to comment.