summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/lib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /kexi/plugins/macros/lib
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz
koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/macros/lib')
-rw-r--r--kexi/plugins/macros/lib/action.cpp10
-rw-r--r--kexi/plugins/macros/lib/context.cpp8
-rw-r--r--kexi/plugins/macros/lib/macroitem.cpp8
-rw-r--r--kexi/plugins/macros/lib/manager.cpp16
-rw-r--r--kexi/plugins/macros/lib/manager.h2
-rw-r--r--kexi/plugins/macros/lib/metamethod.cpp12
6 files changed, 28 insertions, 28 deletions
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp
index db5596b4..45c03d12 100644
--- a/kexi/plugins/macros/lib/action.cpp
+++ b/kexi/plugins/macros/lib/action.cpp
@@ -124,12 +124,12 @@ void Action::setComment(const TQString& comment)
bool Action::hasVariable(const TQString& name) const
{
- return d->varmap.tqcontains(name);
+ return d->varmap.contains(name);
}
KSharedPtr<Variable> Action::variable(const TQString& name) const
{
- return d->varmap.tqcontains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
+ return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
}
Variable::Map Action::variables() const
@@ -145,10 +145,10 @@ TQStringList Action::variableNames() const
void Action::setVariable(KSharedPtr<Variable> variable)
{
const TQString name = variable->name();
- if(! d->varmap.tqcontains(name)) {
+ if(! d->varmap.contains(name)) {
d->varnames.append(name);
}
- d->varmap.tqreplace(name, variable);
+ d->varmap.replace(name, variable);
}
void Action::setVariable(const TQString& name, const TQString& text, const TQVariant& variant)
@@ -161,7 +161,7 @@ void Action::setVariable(const TQString& name, const TQString& text, const TQVar
void Action::removeVariable(const TQString& name)
{
- if(d->varmap.tqcontains(name)) {
+ if(d->varmap.contains(name)) {
d->varmap.remove(name);
d->varnames.remove(name);
}
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp
index 6e2fb2e4..7c0b6ee8 100644
--- a/kexi/plugins/macros/lib/context.cpp
+++ b/kexi/plugins/macros/lib/context.cpp
@@ -100,14 +100,14 @@ Context::~Context()
bool Context::hasVariable(const TQString& name) const
{
//Use TQMap?s contains to check if a variable with name exists
- return d->variables.tqcontains(name);
+ return d->variables.contains(name);
}
//return variable with name or throw an exception if none is found in variables
KSharedPtr<Variable> Context::variable(const TQString& name) const
{
//Use TQMap?s contains to check if a variable with name exists in context
- if (d->variables.tqcontains(name)) {
+ if (d->variables.contains(name)) {
//return it
return d->variables[name];
}
@@ -134,7 +134,7 @@ void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable)
//debuging infos
kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl;
//Use TQMap?s replace to set/replace the variable named name
- d->variables.tqreplace(name, variable);
+ d->variables.replace(name, variable);
}
//return the associated Macro
@@ -252,7 +252,7 @@ void Context::activateNext()
}
//find the macroitem from which to continue
- TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.tqfind(d->macroitem);
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem);
if (it != d->items.constEnd()) {
activate(++it); // try to continue the execution.
}
diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp
index 471f9660..cf317fab 100644
--- a/kexi/plugins/macros/lib/macroitem.cpp
+++ b/kexi/plugins/macros/lib/macroitem.cpp
@@ -147,7 +147,7 @@ TQVariant MacroItem::variant(const TQString& name, bool checkaction) const
KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const
{
- if(d->variables.tqcontains(name))
+ if(d->variables.contains(name))
return d->variables[name];
if(checkaction && d->action.data())
return d->action->variable(name);
@@ -179,7 +179,7 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant)
variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
- d->variables.tqreplace(name, variable);
+ d->variables.replace(name, variable);
}
// Remember the previous value for the case we like to restore it.
@@ -203,13 +203,13 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant)
KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant)
{
- Q_ASSERT(! d->variables.tqcontains(name) );
+ Q_ASSERT(! d->variables.contains(name) );
// Create a new Variable.
KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
// Put it into the Variable-map.
- d->variables.tqreplace(name, variable);
+ d->variables.replace(name, variable);
// Set the variant of the Variable.
this->setVariant(name, variant);
diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp
index 0a0d59e0..f73ddaa8 100644
--- a/kexi/plugins/macros/lib/manager.cpp
+++ b/kexi/plugins/macros/lib/manager.cpp
@@ -85,11 +85,11 @@ Manager::Manager(KXMLGUIClient* const xmlguiclient)
kdDebug() << "Manager::Manager() Ctor" << endl;
TQObject* obj = dynamic_cast<TQObject*>(xmlguiclient);
if(obj) {
- d->objects.tqreplace(obj->name(), obj);
+ d->objects.replace(obj->name(), obj);
}
//TESTCASE
- d->objects.tqreplace("TestCase", new TQWidget());
+ d->objects.replace("TestCase", new TQWidget());
}
Manager::~Manager()
@@ -105,7 +105,7 @@ KXMLGUIClient* Manager::guiClient() const
bool Manager::hasMacro(const TQString& macroname)
{
- return d->macros.tqcontains(macroname);
+ return d->macros.contains(macroname);
}
KSharedPtr<Macro> Manager::getMacro(const TQString& macroname)
@@ -115,7 +115,7 @@ KSharedPtr<Macro> Manager::getMacro(const TQString& macroname)
void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro)
{
- d->macros.tqreplace(macroname, macro);
+ d->macros.replace(macroname, macro);
}
void Manager::removeMacro(const TQString& macroname)
@@ -147,16 +147,16 @@ TQStringList Manager::actionNames() const
void Manager::publishAction(KSharedPtr<Action> action)
{
const TQString name = action->name();
- if(! d->actions.tqcontains(name)) {
+ if(! d->actions.contains(name)) {
d->actionnames.append(name);
}
- d->actions.tqreplace(name, action);
+ d->actions.replace(name, action);
}
void Manager::publishObject(const TQString& name, TQObject* object)
{
- Q_ASSERT(! d->objects.tqcontains(name));
- d->objects.tqreplace(name, object);
+ Q_ASSERT(! d->objects.contains(name));
+ d->objects.replace(name, object);
}
TQGuardedPtr<TQObject> Manager::object(const TQString& name) const
diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h
index fb332f66..ae32aad9 100644
--- a/kexi/plugins/macros/lib/manager.h
+++ b/kexi/plugins/macros/lib/manager.h
@@ -128,7 +128,7 @@ namespace KoMacro {
* Add a new \a Macro to the list of known macros. If
* there exists already a \a Macro instance with the
* defined \p macroname then the already existing one
- * will be tqreplace.
+ * will be replace.
*
* \param macroname The name the \a Macro will be
* accessible as.
diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp
index 979202e8..16b93803 100644
--- a/kexi/plugins/macros/lib/metamethod.cpp
+++ b/kexi/plugins/macros/lib/metamethod.cpp
@@ -89,8 +89,8 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje
d->object = object;
d->type = type;
- int startpos = d->signature.tqfind("(");
- int endpos = d->signature.tqfindRev(")");
+ int startpos = d->signature.find("(");
+ int endpos = d->signature.findRev(")");
if(startpos < 0 || startpos > endpos) {
throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature));
}
@@ -103,14 +103,14 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje
d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace();
do {
- int commapos = d->signaturearguments.tqfind(",");
- int starttemplatepos = d->signaturearguments.tqfind("<");
+ int commapos = d->signaturearguments.find(",");
+ int starttemplatepos = d->signaturearguments.find("<");
if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) {
- int endtemplatepos = d->signaturearguments.tqfind(">", starttemplatepos);
+ int endtemplatepos = d->signaturearguments.find(">", starttemplatepos);
if(endtemplatepos <= 0) {
throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature));
}
- commapos = d->signaturearguments.tqfind(",", endtemplatepos);
+ commapos = d->signaturearguments.find(",", endtemplatepos);
}
if(commapos > 0) {