summaryrefslogtreecommitdiffstats
path: root/kturtle/src/executer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kturtle/src/executer.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kturtle/src/executer.cpp')
-rw-r--r--kturtle/src/executer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kturtle/src/executer.cpp b/kturtle/src/executer.cpp
index e50c64a5..e71204b4 100644
--- a/kturtle/src/executer.cpp
+++ b/kturtle/src/executer.cpp
@@ -220,7 +220,7 @@ void Executer::execFunction(TreeNode* node)
functable::iterator p = functionTable.find(funcname);
if ( p == functionTable.end() )
{
- emit ErrorMsg(node->getToken(), i18n("Call to undefined function: %1.").arg(funcname), 5010);
+ emit ErrorMsg(node->getToken(), i18n("Call to undefined function: %1.").tqarg(funcname), 5010);
return;
}
@@ -231,7 +231,7 @@ void Executer::execFunction(TreeNode* node)
// check if number of parameters match
if ( callparams->size() != funcIds->size() )
{
- emit ErrorMsg(node->getToken(), i18n("Call to function '%1' with wrong number of parameters.").arg(funcname), 5020);
+ emit ErrorMsg(node->getToken(), i18n("Call to function '%1' with wrong number of parameters.").tqarg(funcname), 5020);
return;
}
@@ -274,7 +274,7 @@ void Executer::execRetFunction(TreeNode* node)
execFunction(node);
if (runStack.size() == 0)
{
- emit ErrorMsg(node->getToken(), i18n("Function %1 did not return a value.").arg( node->getLook() ), 5030);
+ emit ErrorMsg(node->getToken(), i18n("Function %1 did not return a value.").tqarg( node->getLook() ), 5030);
return;
}
node->setValue( runStack.top() ); // set return val
@@ -329,7 +329,7 @@ void Executer::execForEach(TreeNode* node)
bBreak = false;
- int i = expStr2.contains(expStr1, false);
+ int i = expStr2.tqcontains(expStr1, false);
for ( ; i > 0; i-- )
{
if (bAbort) return;
@@ -839,7 +839,7 @@ void Executer::execFontSize(TreeNode* node)
{
int x = ROUND2INT( param1->getValue().Number() ); // pull the number value & round it to int
if ( x < 0 || x > 350 )
- emit ErrorMsg(node->getToken(), i18n("The parameters of function %1 must be within range: 0 to 350.").arg( node->getLook() ), 5065);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of function %1 must be within range: 0 to 350.").tqarg( node->getLook() ), 5065);
else
emit FontSize(x);
}
@@ -877,7 +877,7 @@ void Executer::execResizeCanvas(TreeNode* node)
int x = ROUND2INT( nodeX->getValue().Number() ); // converting & rounding to int
int y = ROUND2INT( nodeY->getValue().Number() );
if ( ( x < 1 || y < 1 ) || ( x > 10000 || y > 10000 ) )
- emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 1 to 10000.").arg( node->getLook() ), 7030);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 1 to 10000.").tqarg( node->getLook() ), 7030);
else
emit ResizeCanvas(x, y);
}
@@ -917,7 +917,7 @@ void Executer::execSetFgColor(TreeNode* node)
int g = ROUND2INT( nodeG->getValue().Number() );
int b = ROUND2INT( nodeB->getValue().Number() );
if ( ( r < 0 || g < 0 || b < 0 ) || ( r > 255 || g > 255 || b > 255 ) )
- emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").arg( node->getLook() ), 6090);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").tqarg( node->getLook() ), 6090);
else
emit SetFgColor(r, g, b);
}
@@ -938,7 +938,7 @@ void Executer::execSetBgColor(TreeNode* node)
int g = ROUND2INT( nodeG->getValue().Number() );
int b = ROUND2INT( nodeB->getValue().Number() );
if ( ( r < 0 || g < 0 || b < 0 ) || ( r > 255 || g > 255 || b > 255 ) )
- emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").arg( node->getLook() ), 6090);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").tqarg( node->getLook() ), 6090);
else
emit SetBgColor(r, g, b);
}
@@ -1056,7 +1056,7 @@ bool Executer::checkParameterQuantity(TreeNode* node, uint quantity, int errorCo
if (quantity == 0)
{
if (node->size() == 0) return true; // thats easy!
- emit ErrorMsg(node->getToken(), i18n("The %1 command accepts no parameters.").arg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command accepts no parameters.").tqarg( node->getLook() ), errorCode);
return false;
}
@@ -1068,11 +1068,11 @@ bool Executer::checkParameterQuantity(TreeNode* node, uint quantity, int errorCo
{
if (nodeSize < quantity)
{
- emit ErrorMsg(node->getToken(), i18n("The %1 command was called with %2 but needs 1 parameter.", "The %1 command was called with %2 but needs %n parameters.", quantity).arg( node->getLook() ).arg(nodeSize), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command was called with %2 but needs 1 parameter.", "The %1 command was called with %2 but needs %n parameters.", quantity).tqarg( node->getLook() ).tqarg(nodeSize), errorCode);
}
else
{
- emit ErrorMsg(node->getToken(), i18n("The %1 command was called with %2 but only accepts 1 parameter.", "The %1 command was called with %2 but only accepts %n parameters.", quantity).arg( node->getLook() ).arg(nodeSize), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command was called with %2 but only accepts 1 parameter.", "The %1 command was called with %2 but only accepts %n parameters.", quantity).tqarg( node->getLook() ).tqarg(nodeSize), errorCode);
}
return false;
}
@@ -1093,16 +1093,16 @@ bool Executer::checkParameterType(TreeNode* node, int valueType, int errorCode)
{
case stringValue:
if (quantity == 1)
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a string as its parameter.").arg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a string as its parameter.").tqarg( node->getLook() ), errorCode);
else
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts strings as its parameters.").arg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts strings as its parameters.").tqarg( node->getLook() ), errorCode);
break;
case numberValue:
if (quantity == 1)
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a number as its parameter.").arg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a number as its parameter.").tqarg( node->getLook() ), errorCode);
else
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts numbers as its parameters.").arg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts numbers as its parameters.").tqarg( node->getLook() ), errorCode);
break;
}
return false;