diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kcalc/knumber/knumber.cpp | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcalc/knumber/knumber.cpp')
-rw-r--r-- | kcalc/knumber/knumber.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kcalc/knumber/knumber.cpp b/kcalc/knumber/knumber.cpp index 80bae1f..123fee7 100644 --- a/kcalc/knumber/knumber.cpp +++ b/kcalc/knumber/knumber.cpp @@ -276,7 +276,7 @@ static void _inc_by_one(TQString &str, int position) // Cut off if more digits in fractional part than 'precision' static void _round(TQString &str, int precision) { - int decimalSymbolPos = str.find('.'); + int decimalSymbolPos = str.tqfind('.'); if (decimalSymbolPos == -1) if (precision == 0) return; @@ -312,7 +312,7 @@ static void _round(TQString &str, int precision) break; } - decimalSymbolPos = str.find('.'); + decimalSymbolPos = str.tqfind('.'); str.truncate(decimalSymbolPos + precision + 1); // if precision == 0 delete also '.' @@ -349,7 +349,7 @@ static TQString roundNumber(const TQString &numStr, int precision) } -TQString const KNumber::toQString(int width, int prec) const +TQString const KNumber::toTQString(int width, int prec) const { TQString tmp_str; @@ -360,7 +360,7 @@ TQString const KNumber::toQString(int width, int prec) const 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)).toTQString(width, -1); _fraction_input = tmp_bool; } else tmp_str = TQString(_num->ascii()); @@ -369,7 +369,7 @@ TQString const KNumber::toQString(int width, int prec) const 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)).toTQString(width, -1); _fraction_input = tmp_bool; } else { // _float_output == false if(_splitoffinteger_output) { @@ -378,9 +378,9 @@ TQString const KNumber::toQString(int width, int prec) const if (int_part == Zero) tmp_str = TQString(_num->ascii()); else if (int_part < Zero) - tmp_str = int_part.toQString() + " " + (int_part - *this)._num->ascii(); + tmp_str = int_part.toTQString() + " " + (int_part - *this)._num->ascii(); else - tmp_str = int_part.toQString() + " " + (*this - int_part)._num->ascii(); + tmp_str = int_part.toTQString() + " " + (*this - int_part)._num->ascii(); } else tmp_str = TQString(_num->ascii()); @@ -388,7 +388,7 @@ TQString const KNumber::toQString(int width, int prec) const //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)).toTQString(width, -1); _fraction_input = tmp_bool; } } |