summaryrefslogtreecommitdiffstats
path: root/kturtle/src/executer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kturtle/src/executer.cpp')
-rw-r--r--kturtle/src/executer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kturtle/src/executer.cpp b/kturtle/src/executer.cpp
index 9f88cc40..e50c64a5 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.").tqarg(funcname), 5010);
+ emit ErrorMsg(node->getToken(), i18n("Call to undefined function: %1.").arg(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.").tqarg(funcname), 5020);
+ emit ErrorMsg(node->getToken(), i18n("Call to function '%1' with wrong number of parameters.").arg(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.").tqarg( node->getLook() ), 5030);
+ emit ErrorMsg(node->getToken(), i18n("Function %1 did not return a value.").arg( node->getLook() ), 5030);
return;
}
node->setValue( runStack.top() ); // set return val
@@ -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.").tqarg( node->getLook() ), 5065);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of function %1 must be within range: 0 to 350.").arg( 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.").tqarg( node->getLook() ), 7030);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 1 to 10000.").arg( 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.").tqarg( node->getLook() ), 6090);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").arg( 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.").tqarg( node->getLook() ), 6090);
+ emit ErrorMsg(node->getToken(), i18n("The parameters of the %1 command must be numbers in the range: 0 to 255.").arg( 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.").tqarg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command accepts no parameters.").arg( 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).tqarg( node->getLook() ).tqarg(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).arg( node->getLook() ).arg(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).tqarg( node->getLook() ).tqarg(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).arg( node->getLook() ).arg(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.").tqarg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a string as its parameter.").arg( node->getLook() ), errorCode);
else
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts strings as its parameters.").tqarg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts strings as its parameters.").arg( node->getLook() ), errorCode);
break;
case numberValue:
if (quantity == 1)
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a number as its parameter.").tqarg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts a number as its parameter.").arg( node->getLook() ), errorCode);
else
- emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts numbers as its parameters.").tqarg( node->getLook() ), errorCode);
+ emit ErrorMsg(node->getToken(), i18n("The %1 command only accepts numbers as its parameters.").arg( node->getLook() ), errorCode);
break;
}
return false;