diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 10:00:36 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 10:00:36 -0600 |
commit | 1fffbdafa12271a1a635caf46777fb8acfb6f31b (patch) | |
tree | 707785bd058e254fd865ca30ed35f37f206aebbc /kommander/widget | |
parent | 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 (diff) | |
download | tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.tar.gz tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076.
Diffstat (limited to 'kommander/widget')
-rw-r--r-- | kommander/widget/functionlib.cpp | 18 | ||||
-rw-r--r-- | kommander/widget/kommanderfunctions.cpp | 16 | ||||
-rw-r--r-- | kommander/widget/kommanderwidget.cpp | 46 | ||||
-rw-r--r-- | kommander/widget/myprocess.cpp | 2 | ||||
-rw-r--r-- | kommander/widget/parser.cpp | 24 |
5 files changed, 53 insertions, 53 deletions
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp index eeff0d63..8886acab 100644 --- a/kommander/widget/functionlib.cpp +++ b/kommander/widget/functionlib.cpp @@ -27,7 +27,7 @@ #include <stdlib.h> #include <tqfile.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqstringlist.h> #include <tqmetaobject.h> @@ -129,11 +129,11 @@ static ParseNode f_stringSection(Parser*, const ParameterList& params) static ParseNode f_stringArgs(Parser*, const ParameterList& params) { if (params.count() == 2) - return params[0].toString().arg(params[1].toString()); + return params[0].toString().tqarg(params[1].toString()); else if (params.count() == 3) - return params[0].toString().arg(params[1].toString()).arg(params[2].toString()); + return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString()); else - return params[0].toString().arg(params[1].toString()).arg(params[2].toString()).arg(params[3].toString()); + return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString()).tqarg(params[3].toString()); } static ParseNode f_stringIsNumber(Parser*, const ParameterList& params) @@ -250,7 +250,7 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params) TQObject *object = widget->object(); if (!object) return ParseNode::error("unknown widget"); - TQStrList slotSignatures = object->metaObject()->slotNames(true); + TQStrList slotSignatures = object->tqmetaObject()->slotNames(true); TQStringList slotNames = TQStringList::fromStrList(slotSignatures); int slotNum = -1; uint i = 0; @@ -361,7 +361,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) else byteDataStream << params[i++].toString(); } - function.append(TQString("(%1)").arg(items.join(","))); + function.append(TQString("(%1)").tqarg(items.join(","))); TQCString replyType, byteReply; DCOPClient* cl = KApplication::dcopClient(); if (!cl || !cl->call(appId, object, function.latin1(), @@ -397,7 +397,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) } else if(replyType != "void") { - qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1()); + qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").tqarg(replyType.data()).latin1()); } return ParseNode(); @@ -499,7 +499,7 @@ static ParseNode f_dialog(Parser* P, const ParameterList& params) return TQString(); } TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4") - .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid()); + .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid()); MyProcess proc(P->currentWidget()); TQString text; @@ -571,7 +571,7 @@ static ParseNode f_arrayToString(Parser* P, const ParameterList& params) TQValueList<ParseNode>::Iterator itval = values.begin(); while (*it) { - array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString()); + array += TQString("%1\t%2\n").tqarg(*it).tqarg((*itval).toString()); ++it; ++itval; } diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp index 6a2ce197..701b5e01 100644 --- a/kommander/widget/kommanderfunctions.cpp +++ b/kommander/widget/kommanderfunctions.cpp @@ -19,7 +19,7 @@ #include <tqfile.h> #include <tqregexp.h> -#include <textstream.h> +#include <tqtextstream.h> #include <dcopclient.h> #include <kapplication.h> @@ -145,9 +145,9 @@ TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQStr TQString var = args[0]; TQStringList loop = TQStringList::split("\n", args[1]); TQString output; - TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").arg(var), + TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").tqarg(var), TQString::number(loop.count())); - TQString varidx = TQString("%1_index").arg(var); + TQString varidx = TQString("%1_index").tqarg(var); for (uint i=0; i<loop.count(); i++) output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, TQString::number(i+1)), var, loop[i])); @@ -302,7 +302,7 @@ TQString KommanderWidget::evalArrayFunction(const TQString& function, const TQSt const TQMap<TQString, ParseNode> map = parser.array(array); TQString arraystring; for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it) - arraystring += TQString("%1\t%2\n").arg(it.key()).arg(it.data().toString()); + arraystring += TQString("%1\t%2\n").tqarg(it.key()).tqarg(it.data().toString()); return arraystring; } default: @@ -317,7 +317,7 @@ TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const T KommanderWidget* pWidget = parseWidget(identifier); if (!pWidget) { - printError(i18n("Unknown widget: @%1.").arg(identifier)); + printError(i18n("Unknown widget: @%1.").tqarg(identifier)); return TQString(); } if (s[pos] == '.') @@ -335,13 +335,13 @@ TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const T } else if (pWidget == this) { - printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName()) - .arg(pWidget->widgetName())); + printError(i18n("Infinite loop: @%1 called inside @%2.").tqarg(pWidget->widgetName()) + .tqarg(pWidget->widgetName())); return TQString(); } else if (!pWidget->hasAssociatedText()) { - printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName())); + printError(i18n("Script for @%1 is empty.").tqarg(pWidget->widgetName())); return TQString(); } return pWidget->evalAssociatedText(); diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp index 182f7faf..d0f9e885 100644 --- a/kommander/widget/kommanderwidget.cpp +++ b/kommander/widget/kommanderwidget.cpp @@ -131,7 +131,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text) p.setWidget(this); p.setString(a_text); if (!p.setString(a_text) || !p.parse()) - printError(i18n("Line %1: %2.\n").arg(p.errorLine()+1).arg(p.errorMessage())); + printError(i18n("Line %1: %2.\n").tqarg(p.errorLine()+1).tqarg(p.errorMessage())); return TQString(); } /* Old macro-only parser is implemented below */ @@ -241,7 +241,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text) } else { - printError(i18n("Unknown special: \'%1\'.").arg(identifier)); + printError(i18n("Unknown special: \'%1\'.").tqarg(identifier)); return TQString(); } } @@ -271,13 +271,13 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query) } if (!ok) { - printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(a_query[2])); + printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").tqarg(a_query[2])); return TQString(); } const TQStringList argTypes = parseArgs(pTypes, ok); if (!ok || argTypes.count() != a_query.count() - 3) { - printError(i18n("Incorrect arguments in DCOP call \'%1\'.").arg(a_query[2])); + printError(i18n("Incorrect arguments in DCOP call \'%1\'.").tqarg(a_query[2])); return TQString(); } @@ -338,7 +338,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query) } else if(replyType != "void") { - printError(i18n("DCOP return type %1 is not yet implemented.").arg(replyType.data())); + printError(i18n("DCOP return type %1 is not yet implemented.").tqarg(replyType.data())); } return TQString(); @@ -392,7 +392,7 @@ TQString KommanderWidget::runDialog(const TQString& a_dialog, const TQString& a_ return TQString(); } TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4") - .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid()); + .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid()); return execCommand(cmd); } @@ -405,8 +405,8 @@ void KommanderWidget::printError(const TQString& a_error) const KDialogBase::Yes, KDialogBase::No, 0, 0, true, false, i18n("Continue"), i18n("Continue && Ignore Next Errors"), i18n("Stop")); switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning, - i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").arg(TQString(m_thisObject->name())) - .arg(a_error), TQStringList(), TQString(), 0, 0)) + i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").tqarg(TQString(m_thisObject->name())) + .tqarg(a_error), TQStringList(), TQString(), 0, 0)) { case KDialogBase::No: showErrors = false; @@ -424,7 +424,7 @@ void KommanderWidget::printError(const TQString& a_error) const } else { - kdError() << i18n("Error in widget %1:\n %2\n").arg(m_thisObject->name()).arg(a_error); + kdError() << i18n("Error in widget %1:\n %2\n").tqarg(m_thisObject->name()).tqarg(a_error); } } @@ -579,7 +579,7 @@ TQStringList KommanderWidget::parseFunction(const TQString& group, const TQStrin TQString arg = parseBrackets(s, from, ok); if (!ok) { - printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function)); + printError(i18n("Unmatched parenthesis after \'%1\'.").tqarg(function)); return TQString(); } const TQStringList args = parseArgs(arg, ok); @@ -588,23 +588,23 @@ TQStringList KommanderWidget::parseFunction(const TQString& group, const TQStrin bool extraArg = gname == Group::DCOP; if (!ok) - printError(i18n("Unmatched quotes in argument of \'%1\'.").arg(function)); + printError(i18n("Unmatched quotes in argument of \'%1\'.").tqarg(function)); else if (gname == -1) - printError(i18n("Unknown function group: \'%1\'.").arg(group)); + printError(i18n("Unknown function group: \'%1\'.").tqarg(group)); else if (fname == -1 && !extraArg) - printError(i18n("Unknown function: \'%1\' in group '%2'.").arg(function).arg(group)); + printError(i18n("Unknown function: \'%1\' in group '%2'.").tqarg(function).tqarg(group)); else if (fname == -1 && extraArg) - printError(i18n("Unknown widget function: \'%1\'.").arg(function)); + printError(i18n("Unknown widget function: \'%1\'.").tqarg(function)); else if ((int)args.count() + extraArg < SpecialInformation::minArg(gname, fname)) printError(i18n("Not enough arguments for \'%1\' (%2 instead of %3).<p>" "Correct syntax is: %4") - .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::minArg(gname, fname)) - .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames))); + .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::minArg(gname, fname)) + .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames))); else if ((int)args.count() + extraArg > SpecialInformation::maxArg(gname, fname)) printError(i18n("Too many arguments for \'%1\' (%2 instead of %3).<p>" "Correct syntax is: %4") - .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::maxArg(gname, fname)) - .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames))); + .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::maxArg(gname, fname)) + .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames))); else success = true; ok = success; @@ -627,7 +627,7 @@ int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStr TQString KommanderWidget::substituteVariable(TQString text, TQString variable, TQString value) const { - TQString var = TQString("@%1").arg(variable); + TQString var = TQString("@%1").tqarg(variable); TQString newtext; int newpos, pos = 0; while (true) @@ -692,7 +692,7 @@ TQString KommanderWidget::handleDCOP(const int function, const TQStringList& arg break; case DCOP::type: return current->className(); - case DCOP::children: + case DCOP::tqchildren: { TQStringList matching; TQObjectList* widgets = current->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, args.count() == 0 || args[0] != "false"); @@ -707,12 +707,12 @@ TQString KommanderWidget::handleDCOP(const int function, const TQStringList& arg bool KommanderWidget::isFunctionSupported(int f) { - return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type; + return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type; } bool KommanderWidget::isCommonFunction(int f) { - return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type; + return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type; } ParserData* KommanderWidget::internalParserData() const @@ -732,7 +732,7 @@ TQString KommanderWidget::fileName() TQString KommanderWidget::widgetName() const { if (m_thisObject) - return TQString::fromLatin1(m_thisObject->name()); + return TQString::tqfromLatin1(m_thisObject->name()); else return TQString(); } diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp index 111612b5..90d2caf0 100644 --- a/kommander/widget/myprocess.cpp +++ b/kommander/widget/myprocess.cpp @@ -91,7 +91,7 @@ TQString MyProcess::run(const TQString& a_command, const TQString& a_shell) if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All)) { - m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").arg(shellName)); + m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").tqarg(shellName)); return TQString(); } mProcess->writeStdin(m_input, m_input.length()); diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp index 09841908..848507bb 100644 --- a/kommander/widget/parser.cpp +++ b/kommander/widget/parser.cpp @@ -113,7 +113,7 @@ bool Parser::setString(const TQString& s) else // Bad character { insertNode(s.mid(start, 1), lines); - setError(i18n("Invalid character: '%1'").arg(s[start]), m_parts.count()-1); + setError(i18n("Invalid character: '%1'").tqarg(s[start]), m_parts.count()-1); return false; } } @@ -220,7 +220,7 @@ ParseNode Parser::parseValue(Mode mode) return parseWidget(mode, value); }else if (mode == Execute) { - setError(i18n("'%1' (%2) is not a widget").arg(p.variableName()).arg(variable(p.variableName()).toString())); + setError(i18n("'%1' (%2) is not a widget").tqarg(p.variableName()).tqarg(variable(p.variableName()).toString())); return ParseNode(); } else { @@ -232,7 +232,7 @@ ParseNode Parser::parseValue(Mode mode) } else if (tryKeyword(LeftParenthesis, CheckOnly)) { - setError(i18n("'%1' is not a function").arg(p.variableName())); + setError(i18n("'%1' is not a function").tqarg(p.variableName())); return ParseNode(); } else @@ -423,15 +423,15 @@ ParseNode Parser::parseFunction(Mode mode) tryKeyword(RightParenthesis); } if (f.minArgs() > params.count()) - setError(i18n("in function '%1': %2").arg(name).arg(i18n("too few parameters")), pos); + setError(i18n("in function '%1': %2").tqarg(name).tqarg(i18n("too few parameters")), pos); else if (f.maxArgs() < params.count()) - setError(i18n("in function '%1': %2").arg(name).arg(i18n("too many parameters")), pos); + setError(i18n("in function '%1': %2").tqarg(name).tqarg(i18n("too many parameters")), pos); else if (mode == Execute) { ParseNode p = f.execute(this, params); if (!p.isValid()) { - setError(i18n("in function '%1': %2").arg(name).arg(p.errorMessage()), pos); + setError(i18n("in function '%1': %2").tqarg(name).tqarg(p.errorMessage()), pos); return ParseNode(); } else @@ -471,7 +471,7 @@ ParseNode Parser::parseWidget(Mode mode, const TQString &widgetName) ParseNode p = f.execute(this, params); if (!p.isValid()) { - setError(i18n("in widget function '%1.%2': %3").arg(widget).arg(var).arg(p.errorMessage()), pos); + setError(i18n("in widget function '%1.%2': %3").tqarg(widget).tqarg(var).tqarg(p.errorMessage()), pos); return ParseNode(); } else @@ -514,12 +514,12 @@ ParseNode Parser::parseAssignment(Mode mode) m_start = m_start - 2; return parseWidget(mode); } else - setError(i18n("'%1' is not a widget").arg(var)); + setError(i18n("'%1' is not a widget").tqarg(var)); } else if (tryKeyword(LeftParenthesis, CheckOnly)) - setError(i18n("'%1' is not a function").arg(var)); + setError(i18n("'%1' is not a function").tqarg(var)); else - setError(i18n("Unexpected symbol after variable '%1'").arg(var)); + setError(i18n("Unexpected symbol after variable '%1'").tqarg(var)); return ParseNode(); } @@ -738,9 +738,9 @@ bool Parser::tryKeyword(Keyword k, Mode mode) if (mode == Execute) { if (k == Dot) - setError(i18n("Expected '%1'<br><br>Possible cause of the error is having a variable with the same name as a widget").arg(m_data->keywordToString(k))); + setError(i18n("Expected '%1'<br><br>Possible cause of the error is having a variable with the same name as a widget").tqarg(m_data->keywordToString(k))); else - setError(i18n("Expected '%1'").arg(m_data->keywordToString(k))); + setError(i18n("Expected '%1'").tqarg(m_data->keywordToString(k))); } return false; } |