Summary: | Add data units (bits, bytes, kilobits, kibibytes, etc) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kunitconversion | Reporter: | Jonathan Rubenstein <jrubcop> |
Component: | general | Assignee: | John Layt <jlayt> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | bugseforuns, kdelibs-bugs, nate |
Priority: | NOR | ||
Version: | 5.53.0 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kunitconversion/6c193856f9f472f350ba7634eb2c1bdcd89bb2ea | Version Fixed In: | 5.61 |
Description
Jonathan Rubenstein
2019-01-02 19:25:00 UTC
Good idea. This kind of thing is really easy to add; would you like to try your hand at it? Here's an example of how it's done: https://cgit.kde.org/kunitconversion.git/commit/?id=b2419e57eeea5cd98b3bfb42c3032b421633bf39 I'd be happy to help you if you'd like! I would be fine with doing it. I'll give it my best shot. Do I submit a patch here, or to Phabricator? Also, how do I temporarily replace my system's kunitconversion for testing? (In reply to Jonathan Rubenstein from comment #2) > I would be fine with doing it. I'll give it my best shot. Do I submit a > patch here, or to Phabricator? On Phabricator. Here are the instructions: https://community.kde.org/Infrastructure/Phabricator > Also, how do I temporarily replace my system's kunitconversion for testing? There are three ways: 1. Source the prefix.sh file created by CMake (which is located at ~/kde/build/frameworks-kunitconversion/prefix.sh if you're using kdesrc-build) and then restart krunner. 2. Do your development in a KDE Neon dev unstable VM and configure kdesrc-build to copy all built binaries to /usr automatically, then reboot. 3. Copy the build binaries to the appropriate locations in /usr and restart krunner. Once you're done testing, reinstall your distro-provided package. Needless to say, this is a bit more risky. :) I have no excuse for taking this long, sorry. Here's a Phabricator Differential https://phabricator.kde.org/D20181 D20181 is taking a while but is still open. https://phabricator.kde.org/D20181 Git commit 6c193856f9f472f350ba7634eb2c1bdcd89bb2ea by Nate Graham, on behalf of Jonathan Rubenstein. Committed on 17/07/2019 at 02:03. Pushed by ngraham into branch 'master'. Add Binary Data units (bits, kilobytes, kibibytes ... yottabytes) Summary: New data category BinaryDataCategory featuring bits and bytes, both SI units and powers of two, from normal bits all the way up to Yibibytes. This only features ( positive SI prefix | IEC power of two prefix ) + ( bits | bytes ), and does not include units like nibbles (half a byte), octets (alternative form of byte), or prefixes that are less than 1. My reasoning behind this is to keep it clean and uncluttered. FIXED-IN: 5.61 {F6743030} {F6743029} Test Plan: Open KRunner and attempt to use new units. New units show up successfully. Reviewers: broulik, #plasma, ngraham Reviewed By: ngraham Subscribers: abetts, cfeck, apol, aacid, ngraham, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20181 M +1 -0 README.md M +1 -0 src/CMakeLists.txt A +365 -0 src/binary_data.cpp [License: LGPL (v2+)] A +36 -0 src/binary_data_p.h [License: LGPL (v2+)] M +2 -0 src/converter.cpp M +73 -2 src/unit.h https://commits.kde.org/kunitconversion/6c193856f9f472f350ba7634eb2c1bdcd89bb2ea |