summaryrefslogtreecommitdiffstats
path: root/kommander/widget
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 12:01:04 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 12:01:04 -0600
commit84c989c19db5daab602a67f47ca0f5fd7a2b53d2 (patch)
treedc5875bd392dce2d636a94bebcf5c44a270fac6d /kommander/widget
parent9445f97b426e97c6ce46de18fba4030da45d56df (diff)
downloadtdewebdev-84c989c19db5daab602a67f47ca0f5fd7a2b53d2.tar.gz
tdewebdev-84c989c19db5daab602a67f47ca0f5fd7a2b53d2.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kommander/widget')
-rw-r--r--kommander/widget/functionlib.cpp14
-rw-r--r--kommander/widget/kommanderfunctions.cpp14
-rw-r--r--kommander/widget/kommanderwidget.cpp44
-rw-r--r--kommander/widget/myprocess.cpp2
-rw-r--r--kommander/widget/parser.cpp24
5 files changed, 49 insertions, 49 deletions
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp
index b67c08b0..b75a6f2b 100644
--- a/kommander/widget/functionlib.cpp
+++ b/kommander/widget/functionlib.cpp
@@ -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().tqarg(params[1].toString());
+ return params[0].toString().arg(params[1].toString());
else if (params.count() == 3)
- return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString());
+ return params[0].toString().arg(params[1].toString()).arg(params[2].toString());
else
- return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString()).tqarg(params[3].toString());
+ return params[0].toString().arg(params[1].toString()).arg(params[2].toString()).arg(params[3].toString());
}
static ParseNode f_stringIsNumber(Parser*, const ParameterList& params)
@@ -361,7 +361,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
else
byteDataStream << params[i++].toString();
}
- function.append(TQString("(%1)").tqarg(items.join(",")));
+ function.append(TQString("(%1)").arg(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.").tqarg(replyType.data()).latin1());
+ qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").arg(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")
- .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid());
+ .arg(pFileName).arg(a_params).arg(getpid()).arg(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").tqarg(*it).tqarg((*itval).toString());
+ array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString());
++it;
++itval;
}
diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp
index 701b5e01..a960bbd3 100644
--- a/kommander/widget/kommanderfunctions.cpp
+++ b/kommander/widget/kommanderfunctions.cpp
@@ -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").tqarg(var),
+ TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").arg(var),
TQString::number(loop.count()));
- TQString varidx = TQString("%1_index").tqarg(var);
+ TQString varidx = TQString("%1_index").arg(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").tqarg(it.key()).tqarg(it.data().toString());
+ arraystring += TQString("%1\t%2\n").arg(it.key()).arg(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.").tqarg(identifier));
+ printError(i18n("Unknown widget: @%1.").arg(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.").tqarg(pWidget->widgetName())
- .tqarg(pWidget->widgetName()));
+ printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName())
+ .arg(pWidget->widgetName()));
return TQString();
}
else if (!pWidget->hasAssociatedText())
{
- printError(i18n("Script for @%1 is empty.").tqarg(pWidget->widgetName()));
+ printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName()));
return TQString();
}
return pWidget->evalAssociatedText();
diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp
index 533e8b9e..182f7faf 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").tqarg(p.errorLine()+1).tqarg(p.errorMessage()));
+ printError(i18n("Line %1: %2.\n").arg(p.errorLine()+1).arg(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\'.").tqarg(identifier));
+ printError(i18n("Unknown special: \'%1\'.").arg(identifier));
return TQString();
}
}
@@ -271,13 +271,13 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
}
if (!ok)
{
- printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").tqarg(a_query[2]));
+ printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(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\'.").tqarg(a_query[2]));
+ printError(i18n("Incorrect arguments in DCOP call \'%1\'.").arg(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.").tqarg(replyType.data()));
+ printError(i18n("DCOP return type %1 is not yet implemented.").arg(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")
- .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid());
+ .arg(pFileName).arg(a_params).arg(getpid()).arg(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>").tqarg(TQString(m_thisObject->name()))
- .tqarg(a_error), TQStringList(), TQString(), 0, 0))
+ 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))
{
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").tqarg(m_thisObject->name()).tqarg(a_error);
+ kdError() << i18n("Error in widget %1:\n %2\n").arg(m_thisObject->name()).arg(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\'.").tqarg(function));
+ printError(i18n("Unmatched parenthesis after \'%1\'.").arg(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\'.").tqarg(function));
+ printError(i18n("Unmatched quotes in argument of \'%1\'.").arg(function));
else if (gname == -1)
- printError(i18n("Unknown function group: \'%1\'.").tqarg(group));
+ printError(i18n("Unknown function group: \'%1\'.").arg(group));
else if (fname == -1 && !extraArg)
- printError(i18n("Unknown function: \'%1\' in group '%2'.").tqarg(function).tqarg(group));
+ printError(i18n("Unknown function: \'%1\' in group '%2'.").arg(function).arg(group));
else if (fname == -1 && extraArg)
- printError(i18n("Unknown widget function: \'%1\'.").tqarg(function));
+ printError(i18n("Unknown widget function: \'%1\'.").arg(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")
- .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::minArg(gname, fname))
- .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::minArg(gname, fname))
+ .arg(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")
- .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::maxArg(gname, fname))
- .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::maxArg(gname, fname))
+ .arg(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").tqarg(variable);
+ TQString var = TQString("@%1").arg(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::tqchildren:
+ case DCOP::children:
{
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::tqchildren || f == DCOP::type;
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
}
bool KommanderWidget::isCommonFunction(int f)
{
- return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type;
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
}
ParserData* KommanderWidget::internalParserData() const
diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp
index 90d2caf0..111612b5 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>").tqarg(shellName));
+ m_atw->printError(i18n("<qt>Failed to start shell process<br><b>%1</b></qt>").arg(shellName));
return TQString();
}
mProcess->writeStdin(m_input, m_input.length());
diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp
index 848507bb..09841908 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'").tqarg(s[start]), m_parts.count()-1);
+ setError(i18n("Invalid character: '%1'").arg(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").tqarg(p.variableName()).tqarg(variable(p.variableName()).toString()));
+ setError(i18n("'%1' (%2) is not a widget").arg(p.variableName()).arg(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").tqarg(p.variableName()));
+ setError(i18n("'%1' is not a function").arg(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").tqarg(name).tqarg(i18n("too few parameters")), pos);
+ setError(i18n("in function '%1': %2").arg(name).arg(i18n("too few parameters")), pos);
else if (f.maxArgs() < params.count())
- setError(i18n("in function '%1': %2").tqarg(name).tqarg(i18n("too many parameters")), pos);
+ setError(i18n("in function '%1': %2").arg(name).arg(i18n("too many parameters")), pos);
else if (mode == Execute)
{
ParseNode p = f.execute(this, params);
if (!p.isValid())
{
- setError(i18n("in function '%1': %2").tqarg(name).tqarg(p.errorMessage()), pos);
+ setError(i18n("in function '%1': %2").arg(name).arg(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").tqarg(widget).tqarg(var).tqarg(p.errorMessage()), pos);
+ setError(i18n("in widget function '%1.%2': %3").arg(widget).arg(var).arg(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").tqarg(var));
+ setError(i18n("'%1' is not a widget").arg(var));
}
else if (tryKeyword(LeftParenthesis, CheckOnly))
- setError(i18n("'%1' is not a function").tqarg(var));
+ setError(i18n("'%1' is not a function").arg(var));
else
- setError(i18n("Unexpected symbol after variable '%1'").tqarg(var));
+ setError(i18n("Unexpected symbol after variable '%1'").arg(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").tqarg(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").arg(m_data->keywordToString(k)));
else
- setError(i18n("Expected '%1'").tqarg(m_data->keywordToString(k)));
+ setError(i18n("Expected '%1'").arg(m_data->keywordToString(k)));
}
return false;
}