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.cpp6
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.cpp6
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.cpp6
-rw-r--r--kexi/plugins/macros/kexiactions/objectnamevariable.h4
-rw-r--r--kexi/plugins/macros/kexiactions/objectvariable.h4
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.cpp12
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp10
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.h2
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.cpp8
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerrorbase.ui12
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.cpp42
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.cpp8
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.cpp6
-rw-r--r--kexi/plugins/macros/lib/action.cpp4
-rw-r--r--kexi/plugins/macros/lib/context.cpp14
-rw-r--r--kexi/plugins/macros/lib/context.h2
-rw-r--r--kexi/plugins/macros/lib/exception.cpp2
-rw-r--r--kexi/plugins/macros/lib/macro.cpp2
-rw-r--r--kexi/plugins/macros/lib/macro.h2
-rw-r--r--kexi/plugins/macros/lib/metamethod.cpp12
-rw-r--r--kexi/plugins/macros/lib/metaobject.cpp18
-rw-r--r--kexi/plugins/macros/lib/variable.cpp18
-rw-r--r--kexi/plugins/macros/lib/variable.h12
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.cpp10
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp32
-rw-r--r--kexi/plugins/macros/tests/komacrotestbase.h4
-rw-r--r--kexi/plugins/macros/tests/testobject.cpp2
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp10
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp8
29 files changed, 139 insertions, 139 deletions
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp
index 19922122..d2eb1df1 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.cpp
+++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp
@@ -148,10 +148,10 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
TQString identifier;
if(! partitem.isEmpty()) {
TQStringList parts = TQStringList::split(".", partitem);
- KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(parts[0]) );
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) );
KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0;
if(! item)
- throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem));
+ throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem));
identifier = TQString::number(item->identifier());
}
@@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
delete dlg;
}
else {
- throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method));
+ throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method));
}
}
diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp
index 564b03c8..ccad645c 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.cpp
+++ b/kexi/plugins/macros/kexiactions/executeaction.cpp
@@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const TQString mimetype = TQString("kexi/%1").arg( context->variable("object")->variant().toString() );
+ const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() );
const TQString name = context->variable("name")->variant().toString();
KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype);
if(! part) {
- throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype));
+ throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype));
}
KexiPart::Item* item = mainWin()->project()->item(part->info(), name);
if(! item) {
- throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype));
+ throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype));
}
part->execute(item);
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp
index 815b8723..bc573d10 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.cpp
+++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp
@@ -111,13 +111,13 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
KexiViewBase* view = dialog->selectedView();
if(! view) {
- throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption()));
}
KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view );
KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0;
if(! dbview) {
- throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption()));
}
const TQString record = context->variable("record")->variant().toString();
@@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
void sortAscending();
void sortDescending();
*/
- throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption()));
}
}
diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h
index 1a0aabf8..419e2b00 100644
--- a/kexi/plugins/macros/kexiactions/objectnamevariable.h
+++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h
@@ -49,7 +49,7 @@ namespace KexiMacro {
return;
TQStringList namelist;
- KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(objectname) );
+ KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(info) {
KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info);
if(items)
@@ -65,7 +65,7 @@ namespace KexiMacro {
this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name );
- kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl;
+ kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl;
}
virtual ~ObjectNameVariable() {}
diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h
index c27f024b..83a7a471 100644
--- a/kexi/plugins/macros/kexiactions/objectvariable.h
+++ b/kexi/plugins/macros/kexiactions/objectvariable.h
@@ -72,8 +72,8 @@ namespace KexiMacro {
if(! objectname.isNull())
this->setVariant( objectname );
- else if(this->children().count() > 0)
- this->setVariant( this->children()[0]->variant() );
+ else if(this->tqchildren().count() > 0)
+ this->setVariant( this->tqchildren()[0]->variant() );
else
this->setVariant( TQString() );
diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp
index d7c4e7aa..9cd2e664 100644
--- a/kexi/plugins/macros/kexiactions/openaction.cpp
+++ b/kexi/plugins/macros/kexiactions/openaction.cpp
@@ -53,7 +53,7 @@ namespace KexiMacro {
: KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View"))
{
TQStringList namelist;
- KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(objectname) );
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(part) {
int viewmodes = part->supportedViewModes();
if(viewmodes & Kexi::DataViewMode)
@@ -63,7 +63,7 @@ namespace KexiMacro {
if(viewmodes & Kexi::TextViewMode)
namelist << TEXTVIEW;
for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
- this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
+ this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
}
const TQString n =
namelist.contains(viewname)
@@ -124,9 +124,9 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
const TQString objectname = context->variable(OBJECT)->variant().toString();
const TQString name = context->variable(NAME)->variant().toString();
- KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").arg(objectname).latin1(), name );
+ KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name );
if(! item) {
- throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
// Determinate the viewmode.
@@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
else if(view == TEXTVIEW)
viewmode = Kexi::TextViewMode;
else {
- throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name));
}
// Try to open the object now.
bool openingCancelled;
if(! mainWin()->openObject(item, viewmode, openingCancelled)) {
if(! openingCancelled) {
- throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
}
}
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 5406e8ca..b7e89e9a 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -158,9 +158,9 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *pare
) );
// Create the tableview.
- TQHBoxLayout* layout = new TQHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->datatable = new KexiDataTable(mainWin(), this, "Macro KexiDataTable", false /*not db aware*/);
- layout->addWidget(d->datatable);
+ tqlayout->addWidget(d->datatable);
d->tableview = d->datatable->tableView();
d->tableview->setSpreadSheetMode();
d->tableview->setColumnStretchEnabled( true, COLUMN_ID_COMMENT ); //last column occupies the rest of the area
@@ -461,10 +461,10 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl;
KoProperty::Property& p = set.property((*it).latin1());
- KoMacro::Variable::List children = variable->children();
- if(children.count() > 0) {
+ KoMacro::Variable::List tqchildren = variable->tqchildren();
+ if(tqchildren.count() > 0) {
TQStringList keys, names;
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
const TQString s = (*childit)->variant().toString();
keys << s;
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h
index 520d1799..3529ea0c 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.h
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h
@@ -91,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView
/**
* Called if a row got inserted.
*/
- void rowInserted(KexiTableItem* item, uint row, bool repaint);
+ void rowInserted(KexiTableItem* item, uint row, bool tqrepaint);
/**
* Called if a property in the \a KoProperty got changed.
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp
index 25ec569f..f6422be9 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp
@@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
KoMacro::Exception* exception = context->exception();
iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32));
- errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() ));
+ errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() ));
int i = 1;
KoMacro::MacroItem::List items = context->macro()->items();
for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++)
{
KListViewItem* listviewitem = new KListViewItem(errorlist);
- listviewitem->setText(0,TQString("%1").arg(i++));
+ listviewitem->setText(0,TQString("%1").tqarg(i++));
listviewitem->setText(1,i18n("Action"));
KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
@@ -107,7 +107,7 @@ void KexiMacroError::designbtnClicked()
const TQString name = macro->name();
KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name);
if(! item) {
- kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl;
return;
}
@@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked()
bool openingCancelled;
if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) {
if(! openingCancelled) {
- kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl;
return;
}
}
diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
index 05d7ba72..d44b8aee 100644
--- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
+++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
@@ -27,7 +27,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -35,7 +35,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
@@ -53,7 +53,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
@@ -65,7 +65,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
@@ -87,7 +87,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -154,7 +154,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
index 73827383..e67794be 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
@@ -17,7 +17,7 @@
#include "keximacroproperty.h"
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlineedit.h>
#include <tqlistbox.h>
#include <tqpainter.h>
@@ -86,7 +86,7 @@ void KexiMacroProperty::init()
}
//TESTCASE!!!!!!!!!!!!!!!!!!!!!!
- //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").arg(variable->name()).latin1() );
+ //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() );
Q_ASSERT(! d->name.isNull());
m_property->setName( d->name.latin1() );
@@ -349,9 +349,9 @@ class EditListBoxItem : public ListBoxItem
Q_ASSERT( m_widget != 0 );
//m_widget->reparent(listBox()->viewport(), 0, TQPoint(0,0));
m_widget->reparent(listBox(), 0, TQPoint(1,1));
- //layout->addWidget(m_widget, 1);
+ //tqlayout->addWidget(m_widget, 1);
m_widget->setMinimumHeight(5);
- m_widget->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
private:
@@ -389,45 +389,45 @@ class ListBox : public TQListBox
Q_ASSERT( m_edititem->widget() != 0 );
const TQString name = m_macroproperty->name();
- KoMacro::Variable::List children;
+ KoMacro::Variable::List tqchildren;
{
- KoMacro::Variable::List actionchildren;
+ KoMacro::Variable::List actiontqchildren;
KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false);
//kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl;
if(itemvar.data())
- actionchildren = itemvar->children();
+ actiontqchildren = itemvar->tqchildren();
KSharedPtr<KoMacro::Action> action = m_edititem->action();
KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>();
//kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl;
if(actionvar.data())
- actionchildren += actionvar->children();
+ actiontqchildren += actionvar->tqchildren();
- KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd());
+ KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd());
for(; it != end; ++it) {
if(name == (*it)->name()) {
- KoMacro::Variable::List list = (*it)->children();
+ KoMacro::Variable::List list = (*it)->tqchildren();
KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd());
for(; listit != listend; ++listit)
- children.append( *listit );
+ tqchildren.append( *listit );
}
}
- if(children.count() <= 0)
- children = actionchildren;
+ if(tqchildren.count() <= 0)
+ tqchildren = actiontqchildren;
}
/*
- kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl;
- KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd());
+ kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl;
+ KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd());
for(; listit != listend; ++listit) {
- kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl;
+ kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl;
}
*/
- if(children.count() > 0) {
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ if(tqchildren.count() > 0) {
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
const TQString n = (*childit)->name();
//if(! n.startsWith("@")) continue;
@@ -507,7 +507,7 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
{
kdDebug() << "KexiMacroPropertyWidget::KexiMacroPropertyWidget() Ctor" << endl;
- TQHBoxLayout* layout = new TQHBoxLayout(this, 0, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, 0);
d->macroproperty = dynamic_cast<KexiMacroProperty*>( property->customProperty() );
if(! d->macroproperty) {
@@ -516,11 +516,11 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
}
d->combobox = new KComboBox(this);
- layout->addWidget(d->combobox);
+ tqlayout->addWidget(d->combobox);
d->listbox = new ListBox(d->combobox, d->macroproperty);
d->combobox->setEditable(true);
d->combobox->setListBox(d->listbox);
- d->combobox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
d->combobox->setMinimumHeight(5);
d->combobox->setInsertionPolicy(TQComboBox::NoInsertion);
d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
index 540dcc39..e35ee5b2 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
@@ -45,11 +45,11 @@ KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *parent,
: KexiMacroView(mainwin, parent, macro, "KexiMacroTextView")
, d( new Private() )
{
- TQHBoxLayout* layout = new TQHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->editor = new KTextEdit(this);
d->editor->setTextFormat(TQt::PlainText);
d->editor->setWordWrap(TQTextEdit::NoWrap);
- layout->addWidget(d->editor);
+ tqlayout->addWidget(d->editor);
connect(d->editor, TQT_SIGNAL(textChanged()), this, TQT_SLOT(editorChanged()));
}
@@ -72,7 +72,7 @@ bool KexiMacroTextView::loadData()
return false;
}
- kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").arg(data) << endl;
+ kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl;
//d->editor->blockSignals(true);
d->editor->setText(data);
//d->editor->blockSignals(false);
@@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData()
tristate KexiMacroTextView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl;
+ kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()).tqarg(d->editor->text()) << endl;
return storeDataBlock( d->editor->text() );
}
diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp
index 19e789f0..e9f9cd33 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroview.cpp
@@ -115,7 +115,7 @@ bool KexiMacroView::loadData()
return false;
}
- kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl;
+ kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl;
TQDomElement macroelem = domdoc.namedItem("macro").toElement();
if(macroelem.isNull()) {
kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl;
@@ -154,8 +154,8 @@ tristate KexiMacroView::storeData(bool /*dontAsk*/)
TQDomElement macroelem = d->macro->toXML();
domdoc.appendChild(macroelem);
const TQString xml = domdoc.toString(2);
- const TQString name = TQString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id());
- kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl;
+ const TQString name = TQString("%1 [%2]").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id());
+ kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl;
return storeDataBlock(xml);
}
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp
index fc729b57..45c03d12 100644
--- a/kexi/plugins/macros/lib/action.cpp
+++ b/kexi/plugins/macros/lib/action.cpp
@@ -81,7 +81,7 @@ Action::Action(const TQString& name, const TQString& text)
Action::~Action()
{
- //kdDebug() << TQString("Action::~Action() name=\"%1\"").arg(name()) << endl;
+ //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl;
// destroy the private d-pointer instance.
delete d;
@@ -89,7 +89,7 @@ Action::~Action()
const TQString Action::toString() const
{
- return TQString("Action:%1").arg(name());
+ return TQString("Action:%1").tqarg(name());
}
const TQString Action::name() const
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp
index c0eea250..7c0b6ee8 100644
--- a/kexi/plugins/macros/lib/context.cpp
+++ b/kexi/plugins/macros/lib/context.cpp
@@ -44,7 +44,7 @@ namespace KoMacro {
KSharedPtr<Macro> macro;
/**
- * List of @a Action instances that are children of the
+ * List of @a Action instances that are tqchildren of the
* macro.
*/
TQValueList<KSharedPtr<MacroItem > > items;
@@ -70,7 +70,7 @@ namespace KoMacro {
/// Constructor.
explicit Private(KSharedPtr<Macro> m)
: macro(m) // remember the macro
- , items(m->items()) // set d-pointer children to macro children
+ , items(m->items()) // set d-pointer tqchildren to macro tqchildren
, exception(0) // no exception yet.
{
}
@@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const TQString& name) const
}
}
//none found throw exception
- throw Exception(TQString("Variable name='%1' does not exist.").arg(name));
+ throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name));
}
//return a map of our (d-pointer) variables
@@ -132,7 +132,7 @@ Variable::Map Context::variables() const
void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable)
{
//debuging infos
- kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl;
+ 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.replace(name, variable);
}
@@ -198,14 +198,14 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it)
d->exception = new Exception(e);
//add new tracemessages
//the macro name
- d->exception->addTraceMessage( TQString("macro=%1").arg(d->macro->name()) );
+ d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) );
//the action name
- d->exception->addTraceMessage( TQString("action=%1").arg(action->name()) );
+ d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) );
//and all variables wich belong to the action/macro
TQStringList variables = action->variableNames();
for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
KSharedPtr<Variable> v = d->macroitem->variable(*vit, true);
- d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) );
+ d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) );
}
return; // abort execution
}
diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h
index a7986167..2bb1bef3 100644
--- a/kexi/plugins/macros/lib/context.h
+++ b/kexi/plugins/macros/lib/context.h
@@ -35,7 +35,7 @@ namespace KoMacro {
/**
* The context of an execution. If a @a Macro got executed it creates
- * an instance of this class and passes it around all it's children
+ * an instance of this class and passes it around all it's tqchildren
* as local execution context.
*/
class KOMACRO_EXPORT Context
diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp
index b435f2f2..91cfa03c 100644
--- a/kexi/plugins/macros/lib/exception.cpp
+++ b/kexi/plugins/macros/lib/exception.cpp
@@ -56,7 +56,7 @@ Exception::Exception(const TQString& errormessage)
: d( new Private(errormessage) ) // create the private d-pointer instance.
{
//debuging infos
- kdDebug() << TQString("Exception errormessage=\"%1\"").arg(errormessage) << endl;
+ kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl;
}
//copy constructor
diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp
index 808c4043..6bcdc21d 100644
--- a/kexi/plugins/macros/lib/macro.cpp
+++ b/kexi/plugins/macros/lib/macro.cpp
@@ -84,7 +84,7 @@ void Macro::setName(const TQString& name)
//get an "extended" name
const TQString Macro::toString() const
{
- return TQString("Macro:%1").arg(name());
+ return TQString("Macro:%1").tqarg(name());
}
//get (d-pointer) itemlist
diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h
index 5e5decf8..86e0122a 100644
--- a/kexi/plugins/macros/lib/macro.h
+++ b/kexi/plugins/macros/lib/macro.h
@@ -85,7 +85,7 @@ namespace KoMacro {
/**
* @return a list of @a MacroItem instances which
- * are children of this @a Macro .
+ * are tqchildren of this @a Macro .
*/
TQValueList< KSharedPtr<MacroItem> >& items() const;
diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp
index 05bd22c3..16b93803 100644
--- a/kexi/plugins/macros/lib/metamethod.cpp
+++ b/kexi/plugins/macros/lib/metamethod.cpp
@@ -92,12 +92,12 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje
int startpos = d->signature.find("(");
int endpos = d->signature.findRev(")");
if(startpos < 0 || startpos > endpos) {
- throw Exception(TQString("Invalid signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature));
}
d->signaturetag = d->signature.left(startpos).stripWhiteSpace();
if(d->signaturetag.isEmpty()) {
- throw Exception(TQString("Invalid tagname in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature));
}
d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace();
@@ -108,7 +108,7 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje
if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) {
int endtemplatepos = d->signaturearguments.find(">", starttemplatepos);
if(endtemplatepos <= 0) {
- throw Exception(TQString("No closing template-definiton in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature));
}
commapos = d->signaturearguments.find(",", endtemplatepos);
}
@@ -170,7 +170,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments)
uint argsize = d->arguments.size();
if(arguments.size() <= argsize) {
- throw Exception(TQString("To less arguments for slot with siganture \"%1\"").arg(d->signature));
+ throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature));
}
// The first item in the TQUObject-array is for the returnvalue
@@ -188,7 +188,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments)
}
if(metaargument->type() != variable->type()) {
- throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type()));
+ throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type()));
}
switch(metaargument->type()) {
@@ -287,7 +287,7 @@ KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo)
return new Variable(v);
}
- throw Exception(TQString("Invalid parameter '%1'").arg(desc));
+ throw Exception(TQString("Invalid parameter '%1'").tqarg(desc));
}
Variable::List MetaMethod::toVariableList(TQUObject* uo)
diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp
index ee865c82..e9e56b44 100644
--- a/kexi/plugins/macros/lib/metaobject.cpp
+++ b/kexi/plugins/macros/lib/metaobject.cpp
@@ -77,31 +77,31 @@ TQObject* const MetaObject::object() const
/*
TQStrList MetaObject::signalNames() const
{
- return object()->metaObject()->signalNames();
+ return object()->tqmetaObject()->signalNames();
}
TQStrList MetaObject::slotNames() const
{
- return object()->metaObject()->slotNames();
+ return object()->tqmetaObject()->slotNames();
}
*/
int MetaObject::indexOfSignal(const char* signal) const
{
- TQMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int signalid = metaobject->findSignal(signal, false);
if(signalid < 0) {
- throw Exception(TQString("Invalid signal \"%1\"").arg(signal));
+ throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal));
}
return signalid;
}
int MetaObject::indexOfSlot(const char* slot) const
{
- TQMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int slotid = metaobject->findSlot(slot, false);
if(slotid < 0) {
- throw Exception(TQString("Invalid slot \"%1\"").arg(slot));
+ throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot));
}
return slotid;
}
@@ -110,7 +110,7 @@ KSharedPtr<MetaMethod> MetaObject::method(int index)
{
TQObject* obj = object();
MetaMethod::Type type = MetaMethod::Slot;
- TQMetaObject* metaobject = obj->metaObject();
+ TQMetaObject* metaobject = obj->tqmetaObject();
const TQMetaData* metadata = metaobject->slot(index, true);
if(! metadata) {
@@ -119,13 +119,13 @@ KSharedPtr<MetaMethod> MetaObject::method(int index)
metadata = metaobject->signal(index, true);
if(! metadata) {
- throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name()));
+ throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name()));
}
type = MetaMethod::Signal;
}
if(metadata->access != TQMetaData::Public) {
- throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name()));
+ throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name()));
}
return new MetaMethod(metadata->name, type, this);
diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp
index 3661ef9a..f64613b0 100644
--- a/kexi/plugins/macros/lib/variable.cpp
+++ b/kexi/plugins/macros/lib/variable.cpp
@@ -58,10 +58,10 @@ namespace KoMacro {
const TQObject* object;
/**
- * Optional list of children this @a Variable has.
+ * Optional list of tqchildren this @a Variable has.
*/
// TODO Dow we use this or is it for the future??
- Variable::List children;
+ Variable::List tqchildren;
/**
* Defines if the variable is enabled or disabled.
@@ -199,7 +199,7 @@ const TQString Variable::toString() const
return variant().toString();
} break;
case KoMacro::MetaParameter::TypeObject: {
- return TQString("[%1]").arg( object()->name() );
+ return TQString("[%1]").tqarg( object()->name() );
} break;
default: {
throw Exception("Type is undefined.");
@@ -213,24 +213,24 @@ int Variable::toInt() const
return variant().toInt();
}
-Variable::List Variable::children() const
+Variable::List Variable::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Variable::appendChild(KSharedPtr<Variable> variable)
{
- d->children.append(variable);
+ d->tqchildren.append(variable);
}
void Variable::clearChildren()
{
- d->children.clear();
+ d->tqchildren.clear();
}
-void Variable::setChildren(const Variable::List& children)
+void Variable::setChildren(const Variable::List& tqchildren)
{
- d->children = children;
+ d->tqchildren = tqchildren;
}
/*
diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h
index 14adf09c..108a6005 100644
--- a/kexi/plugins/macros/lib/variable.h
+++ b/kexi/plugins/macros/lib/variable.h
@@ -173,29 +173,29 @@ namespace KoMacro {
/**
* @return the optional list of @a Variable instances
- * that are children of this @a Variable .
+ * that are tqchildren of this @a Variable .
*
* @note that the list is returned call-by-reference. The
* list is accessed as getter/setter (read/write). So,
* don't set this method to const!
*/
- List children() const;
+ List tqchildren() const;
/**
- * Append a @a Variable to the list of children this
+ * Append a @a Variable to the list of tqchildren this
* @a Variable has.
*/
void appendChild(KSharedPtr<Variable> variable);
/**
- * Clear the list of children this @a Variable has.
+ * Clear the list of tqchildren this @a Variable has.
*/
void clearChildren();
/**
- * Set the children this @a Variable has.
+ * Set the tqchildren this @a Variable has.
*/
- void setChildren(const List& children);
+ void setChildren(const List& tqchildren);
#if 0
/**
diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp
index 5b53d51b..4894c619 100644
--- a/kexi/plugins/macros/lib/xmlhandler.cpp
+++ b/kexi/plugins/macros/lib/xmlhandler.cpp
@@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const TQDomElement& element)
// We expect a <macro> element. Do we really need to be such strict or
// would it be more wise to trust the application in that case?
if(element.tagName() != "macro") {
- kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl;
return false;
}
@@ -83,7 +83,7 @@ bool XMLHandler::parseXML(const TQDomElement& element)
// If there is more than one version, parsing should update old macro-data, so that it
// could write out in the newer version in toXML().
if( element.attribute("xmlversion") != "1"){
- kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl;
return false;
}
@@ -115,7 +115,7 @@ bool XMLHandler::parseXML(const TQDomElement& element)
// Set the comment
item->setComment( itemelem.attribute("comment") );
- // Iterate through the children this item has and try
+ // Iterate through the tqchildren this item has and try
// to fill the list of variables our new MacroItem has.
for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
// The tagname should be "variable"
@@ -156,12 +156,12 @@ TQDomElement XMLHandler::toXML()
// redundancy at this point.
//macroelem.setAttribute("name",d->macro->name());
- // The list of MacroItem-children a Macro provides.
+ // The list of MacroItem-tqchildren a Macro provides.
TQValueList<KSharedPtr<MacroItem > > items = d->macro->items();
// Create an iterator...
TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
- // ...and iterate over the list of children the Macro provides.
+ // ...and iterate over the list of tqchildren the Macro provides.
for(;it != end; ++it) {
// We are iterating over MacroItem instances.
KSharedPtr<MacroItem> item = *it;
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index bdc2e6ad..1086a340 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -424,7 +424,7 @@ void CommonTests::testFunction()
domdocument.setContent(TQString(
"<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>" + argument1 + "</argument>"
- "<argument>" + TQString("%1").arg(argument2) + "</argument>"
+ "<argument>" + TQString("%1").tqarg(argument2) + "</argument>"
"</function>"
));
@@ -677,7 +677,7 @@ void CommonTests::testMacro()
// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -712,8 +712,8 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0);
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
- //create a list of the children from yanMacro
- //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //create a list of the tqchildren from yanMacro
+ //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -722,9 +722,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr2);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -735,9 +735,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr3);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -859,12 +859,12 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
- //create a list of its children
- TQValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
- //Check that there are two children. The first child is always the returnvalue.
- KOMACROTEST_ASSERT( children.count(), uint(2) );
- //fetch the children
- KSharedPtr<KoMacro::Action> func1ptr = children[1];
+ //create a list of its tqchildren
+ TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren();
+ //Check that there are two tqchildren. The first child is always the returnvalue.
+ KOMACROTEST_ASSERT( tqchildren.count(), uint(2) );
+ //fetch the tqchildren
+ KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1];
//create new context
KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h
index ee746991..e301730d 100644
--- a/kexi/plugins/macros/tests/komacrotestbase.h
+++ b/kexi/plugins/macros/tests/komacrotestbase.h
@@ -27,7 +27,7 @@
*/
#define KOMACROTEST_ASSERT(actual, expected) \
{ \
- std::cout << TQString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, expected, false ); \
if(actual != expected) \
{ \
@@ -44,7 +44,7 @@
*/
#define KOMACROTEST_XASSERT(actual, notexpected) \
{ \
- std::cout << TQString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \
if(actual == notexpected) \
{ \
diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp
index 2634d71a..e0db481e 100644
--- a/kexi/plugins/macros/tests/testobject.cpp
+++ b/kexi/plugins/macros/tests/testobject.cpp
@@ -94,7 +94,7 @@ int TestObject::myslot(const TQString&, int i)
//TQString is returnvalue
TQString TestObject::myslot(const TQString& s)
{
- TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").arg(s);
+ TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s);
//be loud
kdDebug() << t << endl;
//add some extra Debuginfos to TestResults
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 90454d35..29c53831 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -332,7 +332,7 @@ void XMLHandlerTests::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
doomdocument.setContent(xml);
const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
@@ -362,7 +362,7 @@ void XMLHandlerTests::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
@@ -392,7 +392,7 @@ void XMLHandlerTests::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
doomdocument.setContent(xml);
const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
@@ -422,7 +422,7 @@ void XMLHandlerTests::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
doomdocument.setContent(xml);
const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
@@ -452,7 +452,7 @@ void XMLHandlerTests::testBigNumber()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %1 </variable>"
"</item>"
- "</macro>").arg(DBL_MAX+1);
+ "</macro>").tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index f32416c0..ac176f89 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -586,7 +586,7 @@ void XMLHandlerTests2::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
// Set the XML-document with the above string.
TQDomDocument doomdocument;
doomdocument.setContent(xml);
@@ -674,7 +674,7 @@ void XMLHandlerTests2::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
// Set the XML-document with the above string.
TQDomDocument doomdocument;
doomdocument.setContent(xml);
@@ -762,7 +762,7 @@ void XMLHandlerTests2::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
// Set the XML-document with the above string.
TQDomDocument doomdocument;
doomdocument.setContent(xml);
@@ -850,7 +850,7 @@ void XMLHandlerTests2::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
// Set the XML-document with the above string.
TQDomDocument doomdocument;
doomdocument.setContent(xml);