Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom data size formatting #11252

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

erikjv
Copy link
Collaborator

@erikjv erikjv commented Sep 29, 2023

It is replaced by QLocale::formattedDataSize.

Fixes: #11024

@erikjv erikjv requested a review from TheOneRing September 29, 2023 14:43
@erikjv erikjv self-assigned this Sep 29, 2023
@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from 80f5596 to 6696d45 Compare September 29, 2023 14:43
@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from 6696d45 to 87b723f Compare October 4, 2023 13:58
src/common/utility.cpp Outdated Show resolved Hide resolved
@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from 87b723f to 8c24249 Compare October 19, 2023 15:40
@erikjv erikjv requested a review from TheOneRing October 19, 2023 15:40
@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from 8c24249 to d7a239b Compare October 19, 2023 15:41
src/common/utility.cpp Outdated Show resolved Hide resolved
@michaelstingl
Copy link
Contributor

@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from d7a239b to 03e5fec Compare November 16, 2023 14:12
It is replaced by `QLocale::formattedDataSize`. The precision is now:
0 fraction digits for bytes and KB, 1 for MB, and 2 for GB and above.

Fixes: #11024
@erikjv erikjv force-pushed the work/replace-custom-filesize-formatting branch from 03e5fec to 8aad44c Compare November 16, 2023 14:28
@TheOneRing TheOneRing enabled auto-merge (rebase) November 16, 2023 14:30
Copy link

sonarcloud bot commented Nov 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@TheOneRing TheOneRing merged commit 9ded5ae into master Nov 16, 2023
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the work/replace-custom-filesize-formatting branch November 16, 2023 14:55
@HanaGemela
Copy link
Contributor

HanaGemela commented Nov 20, 2023

Scenarios to test:

  1. File sizes every where in the client have to be the same - selective sync, quota, Activity tab, sync progress

  2. Correct number of decimal places.
    Expected result:
    bytes and kB without decimal places
    MB one decimal place
    GB and above two decimal places

  3. Decimal places are marked correctly by decimal point (e.g. United Kingdom) or decimal comma (e.g. Spain, France, Norway, the Czech Republic, Denmark) according to a country

@erikjv
Copy link
Collaborator Author

erikjv commented Nov 23, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use QLocale to format filesize
4 participants