summaryrefslogtreecommitdiffstats
path: root/kommander/widget/functionlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widget/functionlib.cpp')
-rw-r--r--kommander/widget/functionlib.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp
index c85303ae..bf08888a 100644
--- a/kommander/widget/functionlib.cpp
+++ b/kommander/widget/functionlib.cpp
@@ -164,7 +164,7 @@ static ParseNode f_return(Parser* p, const ParameterList& params)
static ParseNode f_stringRound(Parser*, const ParameterList& params)
{
TQString s;
- s.sprintf("%."+params[1].toString()+"f", params[0].toDouble());
+ s.sprintf("%.*f", params[1].toInt(), params[0].toDouble());
return s;
}
@@ -172,7 +172,7 @@ static ParseNode f_stringRound(Parser*, const ParameterList& params)
static ParseNode f_debug(Parser*, const ParameterList& params)
{
for (uint i=0; i<params.count(); i++)
- std::cerr << params[i].toString();
+ std::cerr << params[i].toString().local8Bit();
std::cerr << "\n";
fflush(stderr);
return ParseNode();
@@ -181,7 +181,7 @@ static ParseNode f_debug(Parser*, const ParameterList& params)
static ParseNode f_echo(Parser*, const ParameterList& params)
{
for (uint i=0; i<params.count(); i++)
- std::cout << params[i].toString();
+ std::cout << params[i].toString().local8Bit();
fflush(stdout);
return ParseNode();
}
@@ -510,7 +510,7 @@ static ParseNode f_dialog(Parser* P, const ParameterList& params)
static ParseNode f_i18n(Parser*, const ParameterList& params)
{
- return TDEGlobal::locale()->translate(params[0].toString());
+ return TDEGlobal::locale()->translate(params[0].toString().utf8());
}
static ParseNode f_env(Parser*, const ParameterList& params)
@@ -567,13 +567,11 @@ static ParseNode f_arrayToString(Parser* P, const ParameterList& params)
TQStringList keys = P->array(name).keys();
TQValueList<ParseNode> values = P->array(name).values();
- TQStringList::Iterator it = keys.begin();
+ TQStringList::Iterator it = keys.begin();
TQValueList<ParseNode>::Iterator itval = values.begin();
- while (*it)
+ for (; it != keys.end(); ++it, ++itval)
{
array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString());
- ++it;
- ++itval;
}
return array;
}