diff options
| author | David Schulz <david.schulz@qt.io> | 2021-06-03 11:21:28 +0200 |
|---|---|---|
| committer | David Schulz <david.schulz@qt.io> | 2021-06-04 09:33:24 +0000 |
| commit | f4ed1d20ec259281cab4e009cd454ff6a274a3e8 (patch) | |
| tree | c370bb8a35364c5c1ad17cacb873ff84da95efee /src/plugins/languageclient/progressmanager.cpp | |
| parent | aa8d2dc2d1ec7575fe9a8fc1170e97cd7f7c951d (diff) | |
| download | qt-creator-f4ed1d20ec259281cab4e009cd454ff6a274a3e8.tar.gz | |
LanguageClient: Use double for progress reports
Some servers *cough* clangd *cough* report their progress in double
instead of the uint defined by the protocol. Since this does not make a
huge difference for the LanguageClient or json switch to double for
progress.
Change-Id: I76454285e5a3b582d6c6a23a6dfbeb5f1cd7631f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/languageclient/progressmanager.cpp')
| -rw-r--r-- | src/plugins/languageclient/progressmanager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/languageclient/progressmanager.cpp b/src/plugins/languageclient/progressmanager.cpp index a854337833..d25da8a3e0 100644 --- a/src/plugins/languageclient/progressmanager.cpp +++ b/src/plugins/languageclient/progressmanager.cpp @@ -107,9 +107,8 @@ void ProgressManager::reportProgress(const ProgressToken &token, } } if (progress.futureInterface) { - const Utils::optional<int> &progressValue = report.percentage(); - if (progressValue.has_value()) - progress.futureInterface->setProgressValue(*progressValue); + if (const Utils::optional<double> &percentage = report.percentage(); percentage.has_value()) + progress.futureInterface->setProgressValue(*percentage); } } |
