summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/macros')
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.cpp2
-rw-r--r--kexi/plugins/macros/kexiactions/objectnamevariable.h2
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.cpp2
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp6
-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
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp6
11 files changed, 37 insertions, 37 deletions
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp
index fff0eaf5..d2eb1df1 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.cpp
+++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp
@@ -93,7 +93,7 @@ namespace KexiMacro {
//this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
const TQString n =
- namelist.tqcontains(partitem)
+ namelist.contains(partitem)
? partitem
: namelist.count() > 0 ? namelist[0] : "";
this->setVariant(n);
diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h
index e9ffa949..419e2b00 100644
--- a/kexi/plugins/macros/kexiactions/objectnamevariable.h
+++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h
@@ -63,7 +63,7 @@ namespace KexiMacro {
for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- this->setVariant( (name.isNull() || ! namelist.tqcontains(name)) ? namelist[0] : name );
+ this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name );
kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl;
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp
index 2e43116f..9cd2e664 100644
--- a/kexi/plugins/macros/kexiactions/openaction.cpp
+++ b/kexi/plugins/macros/kexiactions/openaction.cpp
@@ -66,7 +66,7 @@ namespace KexiMacro {
this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
}
const TQString n =
- namelist.tqcontains(viewname)
+ namelist.contains(viewname)
? viewname
: namelist.count() > 0 ? namelist[0] : "";
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 4d480365..efce73c0 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -264,7 +264,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQV
Q_UNUSED(result);
kdDebug() << "KexiMacroDesignView::beforeCellChanged() colnum=" << colnum << " newvalue=" << newvalue.toString() << endl;
- int rowindex = d->tabledata->tqfindRef(item);
+ int rowindex = d->tabledata->findRef(item);
if(rowindex < 0) {
kdWarning() << "KexiMacroDesignView::beforeCellChanged() No such item" << endl;
return;
@@ -311,7 +311,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQV
void KexiMacroDesignView::rowUpdated(KexiTableItem* item)
{
- int rowindex = d->tabledata->tqfindRef(item);
+ int rowindex = d->tabledata->findRef(item);
kdDebug() << "KexiMacroDesignView::rowUpdated() rowindex=" << rowindex << endl;
//propertySetSwitched();
//propertySetReloaded(true);
@@ -452,7 +452,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
continue;
}
- if(! set.tqcontains( (*it).latin1() )) {
+ if(! set.contains( (*it).latin1() )) {
// If there exist no such property yet, we need to add it.
if(updateSet(&set, macroitem, *it))
reload = true; // we like to reload the whole set
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) {
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index a08ff33d..29c53831 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -177,7 +177,7 @@ void XMLHandlerTests::testCorrectDomElement()
// Test the Compare-method when a Variable will change, it must fail.
macro->items().first()->variable("teststring")->setVariant("bla");
- isvariableok.tqreplace("teststring",false);
+ isvariableok.replace("teststring",false);
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
}
@@ -568,12 +568,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
while ( ! varnode.isNull()) {
const TQDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.tqfind(varelem.attribute("name")).data();
+ const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
{
- const bool var = *isvariableok.tqfind(varelem.attribute("name"));
+ const bool var = *isvariableok.find(varelem.attribute("name"));
if( ! var ) {
KOMACROTEST_XASSERT(varitem->variant() == TQVariant(varelem.text()), !var);
kdDebug() << "The content of the Variable: " << varitem->name()