diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-01 18:29:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-01 12:26:59 -0700 |
commit | d7d01ab8a677b4c03476f48fc05633ce45c22263 (patch) | |
tree | a6530e9a593e41306344fa06224bcf50f1e2d225 /desktop-widgets/subsurfacewebservices.cpp | |
parent | 2a802721f4955b4d48a55d20dbba3a67d62a7bf8 (diff) | |
download | subsurface-d7d01ab8a677b4c03476f48fc05633ce45c22263.tar.gz |
cleanup: explicitly cast to int to silence a compiler warning
In DivelogsDeWebServices::updateProgress() QProgressBar::setRange()
and QProgressBar::setValue() were passed floats even though they
expect ints. To silence a compiler warning, cast by hand. Use the
lrint() function, since we generally do it this way. However,
it is not clear whether this is necessary here.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
-rw-r--r-- | desktop-widgets/subsurfacewebservices.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index 658b8196a..80a17af2a 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -430,8 +430,8 @@ void DivelogsDeWebServices::downloadError(QNetworkReply::NetworkError) void DivelogsDeWebServices::updateProgress(qreal current, qreal total) { - ui.progressBar->setRange(0, total); - ui.progressBar->setValue(current); + ui.progressBar->setRange(0, lrint(total)); + ui.progressBar->setValue(lrint(current)); ui.status->setText(tr("Transferring data...")); } |