https://bugs.kde.org/show_bug.cgi?id=466257
--- Comment #3 from Karl Ove Hufthammer <k...@huftis.org> --- (In reply to Stefano Crocco from comment #1) > Thanks for pointing this out. The conversion factor is clearly wrong and > I'll fix it immediately. I'm not sure, instead, about using KFormat here. As > far as I can see, KFormat only returns a string representation of the number > converted to the appropriate unit, but this won't be useful here, as I need > to put the value inside a QSpinBox, which only accepts numbers. Of course I > could use KFormat to convert a dummy value, then extract the unit from the > string, but I'm not sure it's worth doing so. Could you please clarify your > suggestion? Hmm, I’m not actually sure what the best solution is. The idea was that the spinbox would support the BinaryUnitDialect setting (see bug 364321), so that spinbox should hold the number of *bytes*, but would be formatted as 'kB’, ‘KIB’ or ‘KB’ (or ‘MB’/‘MiB’) depending on the user‘s BinaryUnitDialect settings (and with the proper conversion factor, e.g. 1000 or 1024). But this is complicated to implement, and it’s not a good idea that every program with a ‘byte spinbox’ should have a complicated workaround for handling it. There really should be a general ByteSpinBox that would handle this automatically. (See also bug 453853 for a similar problem in Dolphin.) For now, I guess it’s OK to have the text hardcoded as ‘MB’. -- You are receiving this mail because: You are watching all bug changes.