[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-release-team
Subject: Re: KCalc's Future
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2007-12-08 21:52:48
Message-ID: 475B1230.7020904 () gmx ! de
[Download RAW message or body]
Albert Astals Cid schrieb:
> A Dissabte 08 Desembre 2007, Richard Moore va escriure:
>> On 12/8/07, Albert Astals Cid <aacid@kde.org> wrote:
>>> So you mean typing 3 + 3 Enter and getting a 0 is the expected behaviour?
>> As I said in the previous discussion this works fine here. It only
>> seems to be an issue for people on 64 bit machines, and I suspect not
>> even all of those. If people would get together info about things like
>> which version of gmp they're using, which compiler etc. then maybe we
>> could make some progress on this issue.
>
> I know it's weird, actually i'm using exactly the same configuration (ubuntu
> version, installed libraries and cpu model) than John Tapsell and it works
> for him.
>
> I've already volunteered givin remove access to my machine to David Johnson so
> he can try fixing the bug but he said it was not necessary.
>
> For the record:
> gmp version: 4.2.1+dfsg-5ubuntu4
> g++ version: g++-4.1 (GCC) 4.1.3 20070929 (prerelease) (Ubuntu
> 4.1.2-16ubuntu2)
> machine: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
>
OpenSuSE 10.3 64bit, gcc 4.2.1
The attached patch fixes the problem (better: avoids the problem).
After this 3+3 is 6 again on my system. It was ever, but displaying did
not work correct.
Christian
["kcalc.diff" (text/plain)]
Index: knumber/knumber.cpp
===================================================================
--- knumber/knumber.cpp (Revision 746388)
+++ knumber/knumber.cpp (Arbeitskopie)
@@ -366,7 +366,7 @@
if (width > 0) { //result needs to be cut-off
bool tmp_bool = _fraction_input; // stupid work-around
_fraction_input = false;
- tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1);
+ tmp_str = (KNumber(1.0)*(*this)).toQString(width, -1);
_fraction_input = tmp_bool;
} else
tmp_str = QString(_num->ascii());
@@ -375,7 +375,7 @@
if (_float_output) {
bool tmp_bool = _fraction_input; // stupid work-around
_fraction_input = false;
- tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1);
+ tmp_str = (KNumber(1.0)*(*this)).toQString(width, -1);
_fraction_input = tmp_bool;
} else { // _float_output == false
if(_splitoffinteger_output) {
@@ -394,7 +394,7 @@
//result needs to be cut-off
bool tmp_bool = _fraction_input; // stupid work-around
_fraction_input = false;
- tmp_str = (KNumber("1.0")*(*this)).toQString(width, -1);
+ tmp_str = (KNumber(1.0)*(*this)).toQString(width, -1);
_fraction_input = tmp_bool;
}
}
_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic