summaryrefslogtreecommitdiffstats
path: root/kommander/plugin/specialinformation.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/plugin/specialinformation.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/plugin/specialinformation.cpp')
-rw-r--r--kommander/plugin/specialinformation.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp
index d6ed318b..bbfe308e 100644
--- a/kommander/plugin/specialinformation.cpp
+++ b/kommander/plugin/specialinformation.cpp
@@ -22,8 +22,8 @@ SpecialFunction::SpecialFunction(const TQString& name, const TQString& descripti
int minArgs, int maxArgs)
{
m_parserTypes = AllParsers;
- int lbracket = name.find('(');
- int rbracket = name.find(')');
+ int lbracket = name.tqfind('(');
+ int rbracket = name.tqfind(')');
m_function = (lbracket != -1) ? name.left(lbracket) : name;
m_description = description;
if (lbracket != -1 && rbracket != -1)
@@ -44,8 +44,8 @@ SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQStr
int minArgs, int maxArgs)
{
m_parserTypes = p;
- int lbracket = name.find('(');
- int rbracket = name.find(')');
+ int lbracket = name.tqfind('(');
+ int rbracket = name.tqfind(')');
m_function = (lbracket != -1) ? name.left(lbracket) : name;
m_description = description;
if (lbracket != -1 && rbracket != -1)
@@ -71,15 +71,15 @@ TQString SpecialFunction::prototype(uint prototypeFlags) const
TQStringList params;
for (uint i=start; i<m_types.count(); i++)
if (prototypeFlags & ShowArgumentNames)
- params.append(TQString("%1 %2").arg(m_types[i]).arg(m_args[i]));
+ params.append(TQString("%1 %2").tqarg(m_types[i]).tqarg(m_args[i]));
else
params.append(m_types[i]);
if (!params.count())
return m_function;
else if (prototypeFlags & NoSpaces)
- return TQString("%1(%2)").arg(m_function).arg(params.join(","));
+ return TQString("%1(%2)").tqarg(m_function).tqarg(params.join(","));
else
- return TQString("%1(%2)").arg(m_function).arg(params.join(", "));
+ return TQString("%1(%2)").tqarg(m_function).tqarg(params.join(", "));
}
TQString SpecialFunction::argumentName(uint i) const
@@ -107,9 +107,9 @@ int SpecialFunction::argumentCount() const
int SpecialInformation::function(int group, const TQString& fname)
{
TQString f = fname.lower();
- if (m_functions.contains(group) && m_functions[group].contains(f))
+ if (m_functions.tqcontains(group) && m_functions[group].tqcontains(f))
return m_functions[group][f];
- else if (m_aliases.contains(group) && m_aliases[group].contains(f))
+ else if (m_aliases.tqcontains(group) && m_aliases[group].tqcontains(f))
return m_aliases[group][f];
return -1;
}
@@ -122,14 +122,14 @@ SpecialFunction SpecialInformation::functionObject(const TQString& gname, const
int SpecialInformation::group(const TQString& gname)
{
- if (m_groups.contains(gname))
+ if (m_groups.tqcontains(gname))
return m_groups[gname];
return -1;
}
bool SpecialInformation::isValid(int gname, int fname)
{
- return m_specials.contains(gname) && m_specials[gname].contains(fname);
+ return m_specials.tqcontains(gname) && m_specials[gname].tqcontains(fname);
}
bool SpecialInformation::isValid(const TQString& gname, const TQString& fname)
@@ -139,7 +139,7 @@ bool SpecialInformation::isValid(const TQString& gname, const TQString& fname)
bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserType p)
{
- return m_specials.contains(gname) && m_specials[gname].contains(fname)
+ return m_specials.tqcontains(gname) && m_specials[gname].tqcontains(fname)
&& m_specials[gname][fname].isSupported(p);
}
@@ -198,9 +198,9 @@ bool SpecialInformation::insert(int id, const TQString& function, const TQString
{
if (isValid(m_defaultGroup, id)) /* function already defined */
return false;
- if (m_functions[m_defaultGroup].contains(function.lower()))
+ if (m_functions[m_defaultGroup].tqcontains(function.lower()))
return false; /* function name already in use */
- if (m_aliases[m_defaultGroup].contains(function.lower()))
+ if (m_aliases[m_defaultGroup].tqcontains(function.lower()))
return false; /* function name already in use */
SpecialFunction sf(pType, function, description, minArgs, maxArgs);
m_specials[m_defaultGroup][id] = sf;
@@ -224,9 +224,9 @@ bool SpecialInformation::insertAlias(int id, const TQString& alias)
{
if (!isValid(m_defaultGroup, id)) /* function doesn't exists */
return false;
- if (m_functions[m_defaultGroup].contains(alias.lower()))
+ if (m_functions[m_defaultGroup].tqcontains(alias.lower()))
return false;
- if (m_aliases[m_defaultGroup].contains(alias.lower()))
+ if (m_aliases[m_defaultGroup].tqcontains(alias.lower()))
return false;
m_aliases[m_defaultGroup][alias] = id;
return true;
@@ -248,7 +248,7 @@ void SpecialInformation::insertGroup(int id, const TQString& name, const TQStrin
TQString SpecialInformation::parserGroupName(const TQString& name)
{
- if (m_parserGroups.contains(name))
+ if (m_parserGroups.tqcontains(name))
return m_parserGroups[name];
else
return name;
@@ -291,8 +291,8 @@ void SpecialInformation::registerSpecials()
i18n("Returns text of a cell in a table."), 3);
insert(DCOP::checked, "checked(TQString widget)",
i18n("Returns 1 for checked boxes, 0 for unchecked."), 1);
- insert(DCOP::children, "children(TQString widget, bool recursive)",
- i18n("Returns the list of child widgets contained in the parent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets."), 2);
+ insert(DCOP::tqchildren, "tqchildren(TQString widget, bool recursive)",
+ i18n("Returns the list of child widgets contained in the tqparent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets."), 2);
insert(DCOP::clear, "clear(TQString widget)",
i18n("Removes all content from the widget."), 1);
insertAlias(DCOP::clear, "clearList");
@@ -375,8 +375,8 @@ void SpecialInformation::registerSpecials()
i18n("Returns type(class) of widget."), 1);
insert(DCOP::setEditable, "setEditable(TQString widget, bool editable)",
i18n("Makes the widget editable or read only, depending on the editable argument."), 2);
- insertInternal(DCOP::geometry, "geometry(TQString widget)",
- i18n("Return the widget's geometry as <i>x y w h</i>. This is useful for positioning a created widget."), 1);
+ insertInternal(DCOP::tqgeometry, "tqgeometry(TQString widget)",
+ i18n("Return the widget's tqgeometry as <i>x y w h</i>. This is useful for positioning a created widget."), 1);
insertInternal(DCOP::hasFocus, "hasFocus(TQString widget)",
i18n("Returns true if the widget has focus."), 1);
insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(TQString widget)",
@@ -400,8 +400,8 @@ void SpecialInformation::registerSpecials()
insert(Kommander::dcopid, "dcopid",
i18n("Returns DCOP identifier of current process. This is shorthand for <i>kmdr-executor-@pid</i>."),
0);
- insert(Kommander::parentPid, "parentPid",
- i18n("Returns the pid of the parent Kommander window."), 0);
+ insert(Kommander::tqparentPid, "tqparentPid",
+ i18n("Returns the pid of the tqparent Kommander window."), 0);
insert(Kommander::debug, "debug(TQString text)",
i18n("Writes <i>text</i> on stderr."), 1);
insert(Kommander::echo, "echo(TQString text)",
@@ -440,8 +440,8 @@ void SpecialInformation::registerSpecials()
i18n("Executes an external DCOP call."), 3, 9);
insertMacro(Kommander::comment, "#",
i18n("Adds a comment to EOL that Kommander will not parse"), 0);
- insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString parent)",
- i18n("Creates a new widget with the specified type and as the child of parent."), 3);
+ insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString tqparent)",
+ i18n("Creates a new widget with the specified type and as the child of tqparent."), 3);
insertInternal(Kommander::widgetExists, "widgetExists(TQString widgetName)",
i18n("Returns true if there is a widget with the passed name, false otherwise."), 1);
insertInternal(Kommander::connect, "connect(TQString sender, TQString signal, TQString receiver, TQString slot)",
@@ -524,11 +524,11 @@ void SpecialInformation::registerSpecials()
insertGroup(Group::String, "String", "str");
insert(String::length, "length(TQString string)",
i18n("Returns number of chars in the string."), 1);
- insert(String::contains, "contains(TQString string, TQString substring)",
+ insert(String::tqcontains, "tqcontains(TQString string, TQString substring)",
i18n("Checks if the the string contains the given substring."), 2);
- insert(String::find, "find(TQString string, TQString sought, int index)",
+ insert(String::tqfind, "tqfind(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2);
- insert(String::findRev, "findRev(TQString string, TQString sought, int index)",
+ insert(String::tqfindRev, "tqfindRev(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2);
insertInternal(String::count, "count(TQString String, TQString substring)",
i18n("Returns the count of a given substring in the given string."), 2);
@@ -540,7 +540,7 @@ void SpecialInformation::registerSpecials()
i18n("Returns <i>n</i> chars of the string, starting from <i>start</i>."), 3);
insert(String::remove, "remove(TQString string, TQString substring)",
i18n("Removes all occurrences of given substring."), 2);
- insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)",
+ insert(String::tqreplace, "tqreplace(TQString string, TQString substring, TQString replacement)",
i18n("Replaces all occurrences of the given substring with the given replacement."), 3);
insert(String::upper, "upper(TQString string)",
i18n("Converts the string to uppercase."), 1);