From b6edfe41c9395f2e20784cbf0e630af6426950a3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: 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 --- kexi/plugins/macros/lib/action.cpp | 10 +++++----- kexi/plugins/macros/lib/context.cpp | 8 ++++---- kexi/plugins/macros/lib/macroitem.cpp | 8 ++++---- kexi/plugins/macros/lib/manager.cpp | 16 ++++++++-------- kexi/plugins/macros/lib/manager.h | 2 +- kexi/plugins/macros/lib/metamethod.cpp | 12 ++++++------ 6 files changed, 28 insertions(+), 28 deletions(-) (limited to 'kexi/plugins/macros/lib') 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 Action::variable(const TQString& name) const { - return d->varmap.tqcontains(name) ? d->varmap[name] : KSharedPtr(0); + return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr(0); } Variable::Map Action::variables() const @@ -145,10 +145,10 @@ TQStringList Action::variableNames() const void Action::setVariable(KSharedPtr 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 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) //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 >::ConstIterator it = d->items.tqfind(d->macroitem); + TQValueList >::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 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( 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 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 = KSharedPtr( 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(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 Manager::getMacro(const TQString& macroname) @@ -115,7 +115,7 @@ KSharedPtr Manager::getMacro(const TQString& macroname) void Manager::addMacro(const TQString& macroname, KSharedPtr 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) { 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 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, KSharedPtrobject = 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, KSharedPtrsignaturearguments = 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) { -- cgit v1.2.1