summaryrefslogtreecommitdiffstats
path: root/kturtle/src
diff options
context:
space:
mode:
Diffstat (limited to 'kturtle/src')
-rw-r--r--kturtle/src/dialogs.cpp4
-rw-r--r--kturtle/src/executer.cpp28
-rw-r--r--kturtle/src/kturtle.cpp36
-rw-r--r--kturtle/src/parser.cpp20
-rw-r--r--kturtle/src/translate.cpp2
-rw-r--r--kturtle/src/treenode.cpp2
6 files changed, 46 insertions, 46 deletions
diff --git a/kturtle/src/dialogs.cpp b/kturtle/src/dialogs.cpp
index 315c1f84..ac275842 100644
--- a/kturtle/src/dialogs.cpp
+++ b/kturtle/src/dialogs.cpp
@@ -228,7 +228,7 @@ void ColorPicker::updatePal()
valuePal->setSaturation(s);
valuePal->setValue(v);
valuePal->updateContents();
- valuePal->tqrepaint(false);
+ valuePal->repaint(false);
}
void ColorPicker::updatePatch()
@@ -239,7 +239,7 @@ void ColorPicker::updatePatch()
void ColorPicker::updateColorCode()
{
color.getRgb(&r, &g, &b);
- colorcode->setText( TQString("%1, %2, %3").tqarg(r).tqarg(g).tqarg(b) );
+ colorcode->setText( TQString("%1, %2, %3").arg(r).arg(g).arg(b) );
colorcode->selectAll();
}
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;
diff --git a/kturtle/src/kturtle.cpp b/kturtle/src/kturtle.cpp
index b9963a2e..7e0b773e 100644
--- a/kturtle/src/kturtle.cpp
+++ b/kturtle/src/kturtle.cpp
@@ -221,7 +221,7 @@ void MainWindow::setupStatusBar()
// fill the statusbar
slotStatusBar(i18n("Welcome to KTurtle..."), IDS_STATUS); // the message part
- slotStatusBar(i18n("Line: %1 Column: %2").tqarg(1).tqarg(1), IDS_LINECOLUMN);
+ slotStatusBar(i18n("Line: %1 Column: %2").arg(1).arg(1), IDS_LINECOLUMN);
slotStatusBar(i18n("INS"), IDS_INS);
}
@@ -256,7 +256,7 @@ void MainWindow::slotCursorStatusBar()
uint cursorLine;
uint cursorCol;
dynamic_cast<KTextEditor::ViewCursorInterface*>(editor)->cursorPositionReal(&cursorLine, &cursorCol);
- TQString linenumber = i18n(" Line: %1 Column: %2 ").tqarg(cursorLine + 1).tqarg(cursorCol + 1);
+ TQString linenumber = i18n(" Line: %1 Column: %2 ").arg(cursorLine + 1).arg(cursorCol + 1);
statusBar()->changeItem(linenumber, IDS_LINECOLUMN);
}
@@ -330,7 +330,7 @@ void MainWindow::loadFile(const KURL &url)
file.close();
m_recentFiles->addURL(url);
setCaption( url.fileName() );
- slotStatusBar(i18n("Opened file: %1").tqarg( url.fileName() ), IDS_STATUS);
+ slotStatusBar(i18n("Opened file: %1").arg( url.fileName() ), IDS_STATUS);
editor->document()->setModified(false);
CurrentFile = url;
return;
@@ -338,7 +338,7 @@ void MainWindow::loadFile(const KURL &url)
else
{
KMessageBox::error( this,
- i18n("KTurtle was unable to open: \n%1.").tqarg( url.prettyURL() ),
+ i18n("KTurtle was unable to open: \n%1.").arg( url.prettyURL() ),
i18n("Open Error") );
slotStatusBar(i18n("Opening aborted because of error."), IDS_STATUS);
return;
@@ -367,7 +367,7 @@ void MainWindow::slotSaveAs()
{
int result = KMessageBox::warningContinueCancel ( this,
i18n("A program named \"%1\" already exists in this folder. "
- "Do you want to overwrite it?").tqarg( url.fileName() ),
+ "Do you want to overwrite it?").arg( url.fileName() ),
i18n("Overwrite?"), i18n("&Overwrite") );
if (result != KMessageBox::Continue) return;
}
@@ -384,7 +384,7 @@ void MainWindow::writeFile(const KURL &url)
editor->document()->saveAs(url); // use the KateParts method for saving
loadFile(url); // reload the file as utf8 otherwise display weird chars
setCaption( url.fileName() );
- slotStatusBar(i18n("Saved to: %1").tqarg( url.fileName() ), IDS_STATUS);
+ slotStatusBar(i18n("Saved to: %1").arg( url.fileName() ), IDS_STATUS);
m_recentFiles->addURL(url);
editor->document()->setModified(false);
CurrentFile = url;
@@ -405,7 +405,7 @@ void MainWindow::slotSaveCanvas()
{
int result = KMessageBox::warningContinueCancel( this,
i18n("A picture named \"%1\" already in this folder. "
- "Do you want to overwrite it?").tqarg( url.fileName() ),
+ "Do you want to overwrite it?").arg( url.fileName() ),
i18n("Overwrite?"), i18n("&Overwrite") );
if (result != KMessageBox::Continue) return;
}
@@ -428,12 +428,12 @@ void MainWindow::slotSaveCanvas()
{
kdWarning() << "KTurtle was unable to save the canvas drawing" << endl;
KMessageBox::error(this,
- i18n("KTurtle was unable to save the image to: \n%1.").tqarg( url.prettyURL() ),
+ i18n("KTurtle was unable to save the image to: \n%1.").arg( url.prettyURL() ),
i18n("Unable to Save Image") );
slotStatusBar(i18n("Could not save image."), IDS_STATUS);
return;
}
- slotStatusBar(i18n("Saved canvas to: %1").tqarg( url.fileName() ), IDS_STATUS);
+ slotStatusBar(i18n("Saved canvas to: %1").arg( url.fileName() ), IDS_STATUS);
}
@@ -967,7 +967,7 @@ void MainWindow::slotUpdateSettings()
// TODO maybe this language name can be more pretty by not using ".left(2)", ie "American English" would than be possible... [if this is possible this should be fixed at more places.]
KConfig entry(locate("locale", "all_languages"));
entry.setGroup(Settings::logoLanguage().left(2));
- slotStatusBar(i18n("Command language: %1").tqarg( entry.readEntry("Name") ), IDS_LANG);
+ slotStatusBar(i18n("Command language: %1").arg( entry.readEntry("Name") ), IDS_LANG);
delete translate; // to update the currently used language
translate = new Translate();
@@ -979,7 +979,7 @@ void MainWindow::readConfig(KConfig *config)
m_recentFiles->loadEntries(config, "Recent Files");
KConfig entry(locate("locale", "all_languages"));
entry.setGroup(Settings::logoLanguage().left(2));
- slotStatusBar(i18n("Command language: %1").tqarg( entry.readEntry("Name") ), IDS_LANG);
+ slotStatusBar(i18n("Command language: %1").arg( entry.readEntry("Name") ), IDS_LANG);
}
void MainWindow::slotSettingsHelp()
@@ -1044,8 +1044,8 @@ void MainWindow::slotContextHelp()
TQString help2statusBar;
if ( helpKeyword.startsWith("<") ) help2statusBar = helpKeyword;
- else help2statusBar = i18n("\"%1\"").tqarg(helpKeyword);
- slotStatusBar(i18n("Displaying help on %1").tqarg(help2statusBar), IDS_STATUS);
+ else help2statusBar = i18n("\"%1\"").arg(helpKeyword);
+ slotStatusBar(i18n("Displaying help on %1").arg(help2statusBar), IDS_STATUS);
}
void MainWindow::slotContextHelpUpdate()
@@ -1058,13 +1058,13 @@ void MainWindow::slotContextHelpUpdate()
if ( line.stripWhiteSpace().startsWith("#") )
{
helpKeyword = i18n("<comment>");
- ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) );
+ ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) );
return;
}
if ( line.stripWhiteSpace().isEmpty() || line.mid(col-1,2).stripWhiteSpace().isEmpty() )
{
helpKeyword = i18n("<no keyword>");
- ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) );
+ ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) );
return;
}
@@ -1082,7 +1082,7 @@ void MainWindow::slotContextHelpUpdate()
if ( col >= (uint)start && col < (uint)(start+length) )
{
helpKeyword = i18n("<string>");
- ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) );
+ ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) );
return;
}
pos += (length <= 0 ? 1 : length);
@@ -1125,7 +1125,7 @@ void MainWindow::slotContextHelpUpdate()
else helpKeyword = i18n("<name>");
- ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) );
+ ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) );
return;
}
pos += (length <= 0 ? 1 : length); // the pos had to be increased with at least one
@@ -1133,7 +1133,7 @@ void MainWindow::slotContextHelpUpdate()
// we allready cached some in the beginning of this method; yet its still needed as fall-through
helpKeyword = i18n("<no keyword>");
- ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) );
+ ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) );
}
// END
diff --git a/kturtle/src/parser.cpp b/kturtle/src/parser.cpp
index 1d8fc5c4..07a33aea 100644
--- a/kturtle/src/parser.cpp
+++ b/kturtle/src/parser.cpp
@@ -94,7 +94,7 @@ void Parser::matchToken(int expectedToken)
switch (expectedToken)
{
case tokEOL:
- Error(currentToken, i18n("Unexpected intruction after the '%1' command, please use only one instruction per line").tqarg(preservedToken.look), 1010);
+ Error(currentToken, i18n("Unexpected intruction after the '%1' command, please use only one instruction per line").arg(preservedToken.look), 1010);
break;
case tokBegin:
@@ -102,23 +102,23 @@ void Parser::matchToken(int expectedToken)
break;
case tokTo:
- Error(currentToken, i18n("Expected 'to' after the '%1' command").tqarg(preservedToken.look), 1010);
+ Error(currentToken, i18n("Expected 'to' after the '%1' command").arg(preservedToken.look), 1010);
break;
case tokAssign:
- Error(currentToken, i18n("Expected '=' after the '%1' command").tqarg(preservedToken.look), 1010);
+ Error(currentToken, i18n("Expected '=' after the '%1' command").arg(preservedToken.look), 1010);
break;
case tokEnd:
- Error(currentToken, i18n("Expected ']' after the '%1' command").tqarg(preservedToken.look), 1010);
+ Error(currentToken, i18n("Expected ']' after the '%1' command").arg(preservedToken.look), 1010);
break;
case tokUnknown:
- Error(preservedToken, i18n("Expected a name after the '%1' command").tqarg(preservedToken.look), 1010);
+ Error(preservedToken, i18n("Expected a name after the '%1' command").arg(preservedToken.look), 1010);
break;
default:
- Error(currentToken, i18n("UNDEFINED ERROR NR %1: please send this Logo script to the KTurtle developers").tqarg(expectedToken), 1010);
+ Error(currentToken, i18n("UNDEFINED ERROR NR %1: please send this Logo script to the KTurtle developers").arg(expectedToken), 1010);
break;
}
}
@@ -241,12 +241,12 @@ TreeNode* Parser::Factor()
TQString s = currentToken.look;
if ( s.isEmpty() || currentToken.type == tokEOF )
{
- Error(currentToken, i18n("INTERNAL ERROR NR %1: please sent this Logo script to KTurtle developers").tqarg(1), 1020);
+ Error(currentToken, i18n("INTERNAL ERROR NR %1: please sent this Logo script to KTurtle developers").arg(1), 1020);
// if this error occurs the see the Parser::Repeat for the good solution using 'preservedToken'
}
else
{
- Error(currentToken, i18n("Cannot understand '%1', expected an expression after the '%2' command").tqarg(s).tqarg(preservedToken.look), 1020);
+ Error(currentToken, i18n("Cannot understand '%1', expected an expression after the '%2' command").arg(s).arg(preservedToken.look), 1020);
}
node = new TreeNode(currentToken, Unknown);
getToken();
@@ -538,7 +538,7 @@ TreeNode* Parser::Statement()
}
if (currentToken.type != tokEnd)
{
- Error(currentToken, i18n("Cannot understand '%1'").tqarg(currentToken.look), 1060);
+ Error(currentToken, i18n("Cannot understand '%1'").arg(currentToken.look), 1060);
}
getToken();
@@ -1065,7 +1065,7 @@ TreeNode* Parser::Other()
return node;
}
- Error(rememberedToken, i18n("'%1' is neither a Logo command nor a learned command.").tqarg(rememberedToken.look), 1020);
+ Error(rememberedToken, i18n("'%1' is neither a Logo command nor a learned command.").arg(rememberedToken.look), 1020);
TreeNode* errNode = new TreeNode(rememberedToken, Unknown);
// skip the rest of the line
diff --git a/kturtle/src/translate.cpp b/kturtle/src/translate.cpp
index 06e874a5..10ad2b07 100644
--- a/kturtle/src/translate.cpp
+++ b/kturtle/src/translate.cpp
@@ -38,7 +38,7 @@ TQString Translate::name2fuzzy(const TQString &name)
{
if ( !aliasMap[name].isEmpty() ) // translate the alias if any
{
- return TQString( i18n("'%1' (%2)").tqarg(keyMap[name]).tqarg(reverseAliasMap[name]) );
+ return TQString( i18n("'%1' (%2)").arg(keyMap[name]).arg(reverseAliasMap[name]) );
}
return TQString( "'" + keyMap[name] + "'");
}
diff --git a/kturtle/src/treenode.cpp b/kturtle/src/treenode.cpp
index 0579af7e..0b5619a5 100644
--- a/kturtle/src/treenode.cpp
+++ b/kturtle/src/treenode.cpp
@@ -248,7 +248,7 @@ void TreeNode::destroy(TreeNode* node)
for ( TreeNode::iterator i = node->begin(); i != node->end(); ++i )
{
destroy(*i);
- (*i)->clear(); //free tqchildren
+ (*i)->clear(); //free children
//delete ( *i ); //free mem
}
}