summaryrefslogtreecommitdiffstats
path: root/kommander/widget/kommanderfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widget/kommanderfunctions.cpp')
-rw-r--r--kommander/widget/kommanderfunctions.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp
index 6ef6e6f0..7efe5b27 100644
--- a/kommander/widget/kommanderfunctions.cpp
+++ b/kommander/widget/kommanderfunctions.cpp
@@ -52,7 +52,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
return execCommand(args[0]);
case Kommander::dcop:
return DCOPQuery(args);
- case Kommander::parentPid:
+ case Kommander::tqparentPid:
return global("_PARENTPID").isEmpty() ? TQString().setNum(getppid()) : global("_PARENTPID");
case Kommander::env:
return TQString(getenv(args[0].latin1()));
@@ -66,12 +66,12 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
case Kommander::debug:
qDebug("%s", args[0].latin1());
fflush(stderr);
- return TQString::null;
+ return TQString();
case Kommander::echo:
for (uint i=0; i<args.count(); i++)
std::cout << args[i].latin1();
fflush(stdout);
- return TQString::null;
+ return TQString();
case Kommander::readSetting:
{
TQString fname = fileName();
@@ -81,7 +81,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
cfg.setGroup(fname);
return cfg.readEntry(args[0], args[1]);
}
- return TQString::null;
+ return TQString();
}
case Kommander::writeSetting:
{
@@ -92,7 +92,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
cfg.setGroup(fname);
cfg.writeEntry(args[0], args[1]);
}
- return TQString::null;
+ return TQString();
}
case Kommander::dialog:
if (args.count() > 1)
@@ -114,7 +114,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@execEnd", pos);
+ int f = s.tqfind("@execEnd", pos);
if (f == -1)
{
printError(i18n("Unterminated @execBegin ... @execEnd block."));
@@ -131,7 +131,7 @@ TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString
TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@end", pos);
+ int f = s.tqfind("@end", pos);
//FIXME: better detection of block boundaries
if (f == -1)
{
@@ -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]));
@@ -157,7 +157,7 @@ TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQStr
TQString KommanderWidget::evalForBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@end", pos);
+ int f = s.tqfind("@end", pos);
//FIXME: better detection of block boundaries
if (f == -1)
{
@@ -193,7 +193,7 @@ TQString KommanderWidget::evalForBlock(const TQStringList& args, const TQString&
TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@endif", pos);
+ int f = s.tqfind("@endif", pos);
//FIXME: better detection of block boundaries; add error message
if (f == -1)
{
@@ -214,7 +214,7 @@ TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString&
TQString KommanderWidget::evalSwitchBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@end", pos);
+ int f = s.tqfind("@end", pos);
//FIXME: better detection of block boundaries; add error message
if (f == -1)
{
@@ -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();