diff options
Diffstat (limited to 'kturtle')
-rw-r--r-- | kturtle/TODO | 2 | ||||
-rw-r--r-- | kturtle/src/dialogs.cpp | 46 | ||||
-rw-r--r-- | kturtle/src/dialogs.h | 8 | ||||
-rw-r--r-- | kturtle/src/executer.cpp | 28 | ||||
-rw-r--r-- | kturtle/src/kturtle.cpp | 86 | ||||
-rw-r--r-- | kturtle/src/lexer.h | 2 | ||||
-rw-r--r-- | kturtle/src/parser.cpp | 20 | ||||
-rw-r--r-- | kturtle/src/translate.cpp | 2 | ||||
-rw-r--r-- | kturtle/src/treenode.cpp | 2 | ||||
-rw-r--r-- | kturtle/src/value.h | 2 |
10 files changed, 99 insertions, 99 deletions
diff --git a/kturtle/TODO b/kturtle/TODO index 8f280acd..ed20a391 100644 --- a/kturtle/TODO +++ b/kturtle/TODO @@ -293,7 +293,7 @@ Im tryered of this... I can fix it; too much for me. Sorry in tdelibs/tdecore/kapp... : -url = QString("help:/%1?anchor=%2").arg(appname).arg(anchor); +url = QString("help:/%1?anchor=%2").tqarg(appname).tqarg(anchor); and DCOPRef( "khelpcenter", "KHelpCenterIface" ).send( "openUrl", url, startup_id ); diff --git a/kturtle/src/dialogs.cpp b/kturtle/src/dialogs.cpp index fcc6322d..315c1f84 100644 --- a/kturtle/src/dialogs.cpp +++ b/kturtle/src/dialogs.cpp @@ -149,7 +149,7 @@ ColorPicker::ColorPicker(TQWidget *parent) // for toggling convenience connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( slotEmitVisibility() ) ); - // Create the top level page and its layout + // Create the top level page and its tqlayout BaseWidget = new TQWidget(this); setMainWidget(BaseWidget); @@ -157,57 +157,57 @@ ColorPicker::ColorPicker(TQWidget *parent) setButtonText( KDialogBase::User1, i18n("Insert Color Code at Cursor") ); connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotEmitColorCode() ) ); - TQVBoxLayout *vlayout = new TQVBoxLayout(BaseWidget); + TQVBoxLayout *vtqlayout = new TQVBoxLayout(BaseWidget); - vlayout->addSpacing(5); // spacing on top + vtqlayout->addSpacing(5); // spacing on top // the palette and value selector go into a H-box - TQHBoxLayout *h1layout = new TQHBoxLayout(BaseWidget); - vlayout->addLayout(h1layout); + TQHBoxLayout *h1tqlayout = new TQHBoxLayout(BaseWidget); + vtqlayout->addLayout(h1tqlayout); - h1layout->addSpacing(10); // space on the left border + h1tqlayout->addSpacing(10); // space on the left border hsSelector = new KHSSelector(BaseWidget); // the color (SH) selector hsSelector->setMinimumSize(300, 150); - h1layout->addWidget(hsSelector); + h1tqlayout->addWidget(hsSelector); connect( hsSelector, TQT_SIGNAL( valueChanged(int, int) ), TQT_SLOT( slotSelectorChanged(int, int) ) ); - h1layout->addSpacing(5); // space in between + h1tqlayout->addSpacing(5); // space in between valuePal = new KValueSelector(BaseWidget); // the darkness (V) pal valuePal->setFixedWidth(30); - h1layout->addWidget(valuePal); + h1tqlayout->addWidget(valuePal); connect( valuePal, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotPalChanged(int) ) ); - vlayout->addSpacing(15); // space in between the top and the bottom widgets + vtqlayout->addSpacing(15); // space in between the top and the bottom widgets // the patch and the codegenerator also go into a H-box - TQHBoxLayout *h2layout = new TQHBoxLayout(BaseWidget); - vlayout->addLayout(h2layout); + TQHBoxLayout *h2tqlayout = new TQHBoxLayout(BaseWidget); + vtqlayout->addLayout(h2tqlayout); - h2layout->addSpacing(10); // space on the left border + h2tqlayout->addSpacing(10); // space on the left border patch = new KColorPatch(BaseWidget); // the patch (color previewer) patch->setFixedSize(50, 50); - h2layout->addWidget(patch); + h2tqlayout->addWidget(patch); - h2layout->addSpacing(10); // space in between + h2tqlayout->addSpacing(10); // space in between // the label and the codegenerator go in a V-box - TQVBoxLayout *v2layout = new TQVBoxLayout(BaseWidget); - h2layout->addLayout(v2layout); + TQVBoxLayout *v2tqlayout = new TQVBoxLayout(BaseWidget); + h2tqlayout->addLayout(v2tqlayout); copyable = new TQLabel(i18n("Color code:"), BaseWidget); // tha label - v2layout->addWidget(copyable); + v2tqlayout->addWidget(copyable); colorcode = new TQLineEdit(BaseWidget); // the code generator colorcode->setReadOnly(true); - v2layout->addWidget(colorcode); + v2tqlayout->addWidget(colorcode); connect( colorcode, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotReselect() ) ); - h2layout->addSpacing(5); // spacing on the right border + h2tqlayout->addSpacing(5); // spacing on the right border - vlayout->addSpacing(10); // spacing on the bottom + vtqlayout->addSpacing(10); // spacing on the bottom h = g = b = 0; // start with red s = v = r = 255; @@ -228,7 +228,7 @@ void ColorPicker::updatePal() valuePal->setSaturation(s); valuePal->setValue(v); valuePal->updateContents(); - valuePal->repaint(false); + valuePal->tqrepaint(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").arg(r).arg(g).arg(b) ); + colorcode->setText( TQString("%1, %2, %3").tqarg(r).tqarg(g).tqarg(b) ); colorcode->selectAll(); } diff --git a/kturtle/src/dialogs.h b/kturtle/src/dialogs.h index f55342c7..4cd69d1a 100644 --- a/kturtle/src/dialogs.h +++ b/kturtle/src/dialogs.h @@ -27,7 +27,7 @@ #define _DIALOGS_H_ -#include <layout.h> +#include <tqlayout.h> #include <tqlabel.h> #include <tqlineedit.h> #include <tqstring.h> @@ -119,9 +119,9 @@ class ColorPicker : public KDialogBase TQWidget *BaseWidget; KHSSelector *hsSelector; KValueSelector *valuePal; - TQVBoxLayout *vlayout; - TQHBoxLayout *h1layout; - TQHBoxLayout *h2layout; + TQVBoxLayout *vtqlayout; + TQHBoxLayout *h1tqlayout; + TQHBoxLayout *h2tqlayout; KColorPatch *patch; TQLabel *copyable; TQLineEdit *colorcode; diff --git a/kturtle/src/executer.cpp b/kturtle/src/executer.cpp index e50c64a5..9f88cc40 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 @@ -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; diff --git a/kturtle/src/kturtle.cpp b/kturtle/src/kturtle.cpp index da6a9a28..ffa528f3 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").arg(1).arg(1), IDS_LINECOLUMN); + slotStatusBar(i18n("Line: %1 Column: %2").tqarg(1).tqarg(1), IDS_LINECOLUMN); slotStatusBar(i18n("INS"), IDS_INS); } @@ -247,7 +247,7 @@ void MainWindow::setupCanvas() void MainWindow::slotStatusBar(TQString text, int id) { - text = " " + text + " "; // help the layout + text = " " + text + " "; // help the tqlayout statusBar()->changeItem(text, id); } @@ -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 ").arg(cursorLine + 1).arg(cursorCol + 1); + TQString linenumber = i18n(" Line: %1 Column: %2 ").tqarg(cursorLine + 1).tqarg(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").arg( url.fileName() ), IDS_STATUS); + slotStatusBar(i18n("Opened file: %1").tqarg( 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.").arg( url.prettyURL() ), + i18n("KTurtle was unable to open: \n%1.").tqarg( 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?").arg( url.fileName() ), + "Do you want to overwrite it?").tqarg( 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").arg( url.fileName() ), IDS_STATUS); + slotStatusBar(i18n("Saved to: %1").tqarg( 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?").arg( url.fileName() ), + "Do you want to overwrite it?").tqarg( 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.").arg( url.prettyURL() ), + i18n("KTurtle was unable to save the image to: \n%1.").tqarg( url.prettyURL() ), i18n("Unable to Save Image") ); slotStatusBar(i18n("Could not save image."), IDS_STATUS); return; } - slotStatusBar(i18n("Saved canvas to: %1").arg( url.fileName() ), IDS_STATUS); + slotStatusBar(i18n("Saved canvas to: %1").tqarg( url.fileName() ), IDS_STATUS); } @@ -877,39 +877,39 @@ void MainWindow::slotSettings() TQGridLayout *generalLayout = new TQGridLayout( general, 1, 1, 11, 6, "generalLayout"); WidthHeightBox = new TQGroupBox( i18n("Initial Canvas Size"), general ); WidthHeightBox->setColumnLayout(0, Qt::Vertical ); - WidthHeightBox->layout()->setSpacing( 6 ); - WidthHeightBox->layout()->setMargin( 11 ); - TQVBoxLayout *WidthHeightBoxLayout = new TQVBoxLayout( WidthHeightBox->layout() ); - WidthHeightBoxLayout->setAlignment( TQt::AlignTop ); - TQHBoxLayout *layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); - TQVBoxLayout *layout2 = new TQVBoxLayout( 0, 0, 6, "layout2"); + WidthHeightBox->tqlayout()->setSpacing( 6 ); + WidthHeightBox->tqlayout()->setMargin( 11 ); + TQVBoxLayout *WidthHeightBoxLayout = new TQVBoxLayout( WidthHeightBox->tqlayout() ); + WidthHeightBoxLayout->tqsetAlignment( TQt::AlignTop ); + TQHBoxLayout *tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3"); + TQVBoxLayout *tqlayout2 = new TQVBoxLayout( 0, 0, 6, "tqlayout2"); - TQVBoxLayout *layout1 = new TQVBoxLayout( 0, 0, 6, "layout1"); + TQVBoxLayout *tqlayout1 = new TQVBoxLayout( 0, 0, 6, "tqlayout1"); kcfg_CanvasWidth = new KIntNumInput( WidthHeightBox, "kcfg_CanvasWidth" ); kcfg_CanvasWidth->setValue( 400 ); kcfg_CanvasWidth->setMinValue( 1 ); kcfg_CanvasWidth->setReferencePoint( 1 ); - layout1->addWidget( kcfg_CanvasWidth ); + tqlayout1->addWidget( kcfg_CanvasWidth ); kcfg_CanvasHeight = new KIntNumInput( WidthHeightBox, "kcfg_CanvasHeight" ); kcfg_CanvasHeight->setValue( 300 ); kcfg_CanvasHeight->setMinValue( 1 ); kcfg_CanvasHeight->setReferencePoint( 1 ); - layout1->addWidget( kcfg_CanvasHeight ); + tqlayout1->addWidget( kcfg_CanvasHeight ); WidthLabel = new TQLabel( kcfg_CanvasWidth, i18n("Canvas &width:"), WidthHeightBox ); - layout2->addWidget( WidthLabel ); + tqlayout2->addWidget( WidthLabel ); HeightLabel = new TQLabel( kcfg_CanvasHeight, i18n("Ca&nvas height:"), WidthHeightBox ); - layout2->addWidget( HeightLabel ); - layout3->addLayout( layout2 ); + tqlayout2->addWidget( HeightLabel ); + tqlayout3->addLayout( tqlayout2 ); - layout3->addLayout( layout1 ); - WidthHeightBoxLayout->addLayout( layout3 ); + tqlayout3->addLayout( tqlayout1 ); + WidthHeightBoxLayout->addLayout( tqlayout3 ); TQLabel* WidthHeightLabel = new TQLabel(i18n("You need to restart before these settings have effect"), WidthHeightBox); WidthHeightBoxLayout->addWidget( WidthHeightLabel ); generalLayout->addWidget( WidthHeightBox, 0, 0 ); - general->resize( TQSize(234, 109).expandedTo(minimumSizeHint()) ); + general->resize( TQSize(234, 109).expandedTo(tqminimumSizeHint()) ); dialog->addPage( general, i18n("General"), "package_settings", i18n("General Settings") ); @@ -918,12 +918,12 @@ void MainWindow::slotSettings() TQGridLayout *languageLayout = new TQGridLayout( language, 1, 1, 11, 6, "Form1Layout"); TQGroupBox *groupBox1 = new TQGroupBox( language, "groupBox1" ); groupBox1->setColumnLayout(0, Qt::Vertical ); - groupBox1->layout()->setSpacing( 6 ); - groupBox1->layout()->setMargin( 11 ); - TQGridLayout *groupBox1Layout = new TQGridLayout( groupBox1->layout() ); - groupBox1Layout->setAlignment( TQt::AlignTop ); + groupBox1->tqlayout()->setSpacing( 6 ); + groupBox1->tqlayout()->setMargin( 11 ); + TQGridLayout *groupBox1Layout = new TQGridLayout( groupBox1->tqlayout() ); + groupBox1Layout->tqsetAlignment( TQt::AlignTop ); - TQVBoxLayout *layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); + TQVBoxLayout *tqlayout4 = new TQVBoxLayout( 0, 0, 6, "tqlayout4"); kcfg_LanguageComboBox = new KComboBox(groupBox1, "kcfg_LanguageComboBox"); kcfg_LanguageComboBox->setEditable(false); @@ -935,13 +935,13 @@ void MainWindow::slotSettings() kcfg_LanguageComboBox->insertStringList(LogoLanguageList); LanguageLabel = new TQLabel(kcfg_LanguageComboBox, i18n("&Select the language for the Logo commands:"), groupBox1); - layout4->addWidget( LanguageLabel ); - layout4->addWidget( kcfg_LanguageComboBox ); + tqlayout4->addWidget( LanguageLabel ); + tqlayout4->addWidget( kcfg_LanguageComboBox ); LanguageLabel->setBuddy( kcfg_LanguageComboBox ); - groupBox1Layout->addLayout( layout4, 0, 0 ); + groupBox1Layout->addLayout( tqlayout4, 0, 0 ); languageLayout->addWidget( groupBox1, 0, 0 ); - language->resize( TQSize(373, 80).expandedTo(minimumSizeHint()) ); + language->resize( TQSize(373, 80).expandedTo(tqminimumSizeHint()) ); dialog->addPage( language, i18n("Language"), "locale", i18n("Language Settings") ); @@ -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").arg( entry.readEntry("Name") ), IDS_LANG); + slotStatusBar(i18n("Command language: %1").tqarg( 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").arg( entry.readEntry("Name") ), IDS_LANG); + slotStatusBar(i18n("Command language: %1").tqarg( 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\"").arg(helpKeyword); - slotStatusBar(i18n("Displaying help on %1").arg(help2statusBar), IDS_STATUS); + else help2statusBar = i18n("\"%1\"").tqarg(helpKeyword); + slotStatusBar(i18n("Displaying help on %1").tqarg(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").arg(helpKeyword) ); + ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) ); return; } if ( line.stripWhiteSpace().isEmpty() || line.mid(col-1,2).stripWhiteSpace().isEmpty() ) { helpKeyword = i18n("<no keyword>"); - ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) ); + ContextHelp->setText( i18n("Help on: %1").tqarg(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").arg(helpKeyword) ); + ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) ); return; } pos += (length <= 0 ? 1 : length); @@ -1125,7 +1125,7 @@ void MainWindow::slotContextHelpUpdate() else helpKeyword = i18n("<name>"); - ContextHelp->setText( i18n("Help on: %1").arg(helpKeyword) ); + ContextHelp->setText( i18n("Help on: %1").tqarg(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").arg(helpKeyword) ); + ContextHelp->setText( i18n("Help on: %1").tqarg(helpKeyword) ); } // END diff --git a/kturtle/src/lexer.h b/kturtle/src/lexer.h index c6afe078..37dccf08 100644 --- a/kturtle/src/lexer.h +++ b/kturtle/src/lexer.h @@ -22,7 +22,7 @@ #include <tqmap.h> #include <tqstring.h> -#include <textstream.h> +#include <tqtextstream.h> #include "token.h" #include "translate.h" diff --git a/kturtle/src/parser.cpp b/kturtle/src/parser.cpp index 07a33aea..1d8fc5c4 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").arg(preservedToken.look), 1010); + Error(currentToken, i18n("Unexpected intruction after the '%1' command, please use only one instruction per line").tqarg(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").arg(preservedToken.look), 1010); + Error(currentToken, i18n("Expected 'to' after the '%1' command").tqarg(preservedToken.look), 1010); break; case tokAssign: - Error(currentToken, i18n("Expected '=' after the '%1' command").arg(preservedToken.look), 1010); + Error(currentToken, i18n("Expected '=' after the '%1' command").tqarg(preservedToken.look), 1010); break; case tokEnd: - Error(currentToken, i18n("Expected ']' after the '%1' command").arg(preservedToken.look), 1010); + Error(currentToken, i18n("Expected ']' after the '%1' command").tqarg(preservedToken.look), 1010); break; case tokUnknown: - Error(preservedToken, i18n("Expected a name after the '%1' command").arg(preservedToken.look), 1010); + Error(preservedToken, i18n("Expected a name after the '%1' command").tqarg(preservedToken.look), 1010); break; default: - Error(currentToken, i18n("UNDEFINED ERROR NR %1: please send this Logo script to the KTurtle developers").arg(expectedToken), 1010); + Error(currentToken, i18n("UNDEFINED ERROR NR %1: please send this Logo script to the KTurtle developers").tqarg(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").arg(1), 1020); + Error(currentToken, i18n("INTERNAL ERROR NR %1: please sent this Logo script to KTurtle developers").tqarg(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").arg(s).arg(preservedToken.look), 1020); + Error(currentToken, i18n("Cannot understand '%1', expected an expression after the '%2' command").tqarg(s).tqarg(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'").arg(currentToken.look), 1060); + Error(currentToken, i18n("Cannot understand '%1'").tqarg(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.").arg(rememberedToken.look), 1020); + Error(rememberedToken, i18n("'%1' is neither a Logo command nor a learned command.").tqarg(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 10ad2b07..06e874a5 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)").arg(keyMap[name]).arg(reverseAliasMap[name]) ); + return TQString( i18n("'%1' (%2)").tqarg(keyMap[name]).tqarg(reverseAliasMap[name]) ); } return TQString( "'" + keyMap[name] + "'"); } diff --git a/kturtle/src/treenode.cpp b/kturtle/src/treenode.cpp index 0b5619a5..0579af7e 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 children + (*i)->clear(); //free tqchildren //delete ( *i ); //free mem } } diff --git a/kturtle/src/value.h b/kturtle/src/value.h index a03e4840..0027d8e9 100644 --- a/kturtle/src/value.h +++ b/kturtle/src/value.h @@ -21,7 +21,7 @@ #define _VALUE_H_ #include <tqstring.h> -#include <textstream.h> +#include <tqtextstream.h> enum valueType |