summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2026-03-07 11:07:19 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2026-03-07 11:07:19 +0900
commit0c99f6e80f183a4cc9148fa7cbaa8b22ca5e0759 (patch)
treed41cf0e0a039c482a9d427f33a93bd906958edd7
parent08ba408de01dceba440b580facf991dec09df404 (diff)
downloadkatapult-0c99f6e80f183a4cc9148fa7cbaa8b22ca5e0759.tar.gz
katapult-0c99f6e80f183a4cc9148fa7cbaa8b22ca5e0759.zip
Remove use of KDE_IS_VERSION
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp b/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp
index b613c00..9f19b52 100644
--- a/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp
+++ b/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp
@@ -36,64 +36,11 @@
#include "actionevalexpr.h"
-// Conditional compilation to not bloat the lib if
-// KDE already has the following functions.
-// Prevents a deprecated function warning too.
-
-#if !KDE_IS_VERSION(3, 5, 0)
-
-// Copied some code from KDE 3.5 to make it compile on 3.4.
-
-// insert (thousands)-"separator"s into the non-fractional part of str
-static void _insertSeparator(TQString &str, const TQString &separator, const TQString &decimalSymbol)
-{
- // leave fractional part untouched
- TQString mainPart = str.section(decimalSymbol, 0, 0);
- TQString fracPart = str.section(decimalSymbol, 1, 1, TQString::SectionIncludeLeadingSep);
- if (fracPart==decimalSymbol) fracPart=TQString();
- for (int pos = mainPart.length() - 3; pos > 0; pos -= 3)
- mainPart.insert(pos, separator);
- str = mainPart + fracPart;
-}
-
-// This was TDELocale::formatNumber(const TQString&, bool, int)
-
-static TQString formatNumber(const TQString &numStr)
-{
- TQString tmpString = numStr;
-
- // Skip the sign (for now)
- bool neg = (tmpString[0] == '-');
- if (neg || tmpString[0] == '+') tmpString.remove(0, 1);
-
- // Split off exponential part (including 'e'-symbol)
- TQString mantString = tmpString.section('e', 0, 0, TQString::SectionCaseInsensitiveSeps);
- TQString expString = tmpString.section('e', 1, 1, TQString::SectionCaseInsensitiveSeps | TQString::SectionIncludeLeadingSep);
- if (expString.length()==1) expString=TQString();
-
- // Replace dot with locale decimal separator
- mantString.replace(TQChar('.'), TDEGlobal::locale()->decimalSymbol());
-
- // Insert the thousand separators
- _insertSeparator(mantString, TDEGlobal::locale()->thousandsSeparator(), TDEGlobal::locale()->decimalSymbol());
-
- // How can we know where we should put the sign?
- mantString.prepend(neg?TDEGlobal::locale()->negativeSign():TDEGlobal::locale()->positiveSign());
-
- return mantString + expString;
-}
-
-#else
-// TDE_VERSION >= 3.5.0
-
static TQString formatNumber(const TQString& numStr)
{
return TDEGlobal::locale()->formatNumber(numStr, false, 0);
}
-#endif
-
-
ActionEvaluateExpression::ActionEvaluateExpression()
: KatapultAction(), _expr(0)
{