- QString Minicli::calculate(const QString &exp)
+ QString Minicli::calculate(const QString &input)
{
QString result, cmd;
+ QString exp = input;
+ //replace commas with dots so european decimals can be calculated
+ exp.replace(QChar(','), ".");
If someone out there could apply it and confirm that it indeed works (symptoms of success would include "100,3*4" coming out as
As I don't have a KDE3 codebase kicking around, it's a little inconvenient for me to test this. Any takers? =)

14 comments:
This is offtopic but you know there are millions of people in your own country that also use the comma as a decimal point? :)
(symptoms of success would include "100,3*4" coming out as 101.2)
Make that 401.2. ;)
doh! =)
I'm trying to do it but in a VirtualBox environment, so it will take me some time.
If anyone is willing to test it with as a redundancy test / with a better setup, I would really appreciate it :-)
Hmm, It's failing [0]. I will give it a try tomorrow.
[0] http://paste.debian.net/18740/
Should this be getting the decimal point character from the locale? Something like:
lconv *localeInfo = localeconv();
then using localeInfo->decimal_point?
version which can actually be applied
I'm running this through Koji (the Fedora build system) now, I'll test as soon as it's built.
Actually even better would be to use KLocale::decimalSeparator()
As far as I can tell, the goal here is to be flexible and just accept both. The minicli calculator doesn't support thousands separators anyway, so there's no confusion possible. Or is your suggestion to remove the thousands separators automatically too?
For any Fedora 8 users wanting to test: Koji build (i386 and x86_64 already completed). I'm testing it now.
I don't think I'll push this out as an official update though, unless there's some more stuff in kdebase needing an update anyway.
I can confirm that the patch works.
Hint: to test it, you have to run this in minicli first:
killall kdesktop ; sleep 2; kdesktop
(i.e. kdesktop has to be reloaded for the changes to take effect.)
But shouldn't the result be given in the komma notation, as well? :-)
Totally the wrong place, but I came across this quote from Steve Grand and thought the plasma team might want to write in on their shields... er... keyboards.
"The trouble with the British these days is that they want innovation, but they don't want to change anything to get it."
More good qoutes from him here.
Tested using Gentoo Linux and works here.
Post a Comment