diff options
Diffstat (limited to 'kexi/plugins/macros')
29 files changed, 120 insertions, 120 deletions
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp index d2eb1df1..19922122 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").tqarg(parts[0]) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(parts[0]) ); KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0; if(! item) - throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem)); + throw KoMacro::Exception(i18n("No such item \"%1\"").arg(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\"").tqarg(method)); + throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method)); } } diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp index ccad645c..564b03c8 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").tqarg( context->variable("object")->variant().toString() ); + const TQString mimetype = TQString("kexi/%1").arg( 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\"").tqarg(mimetype)); + throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype)); } KexiPart::Item* item = mainWin()->project()->item(part->info(), name); if(! item) { - throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype)); + throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype)); } part->execute(item); diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp index bc573d10..815b8723 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\".").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(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.").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(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\".").tqarg(record).tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption())); } } diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h index 419e2b00..1a0aabf8 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").tqarg(objectname) ); + KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(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()<<" tqchildren="<<namelist<<endl; + kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl; } virtual ~ObjectNameVariable() {} diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h index 83a7a471..c27f024b 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->tqchildren().count() > 0) - this->setVariant( this->tqchildren()[0]->variant() ); + else if(this->children().count() > 0) + this->setVariant( this->children()[0]->variant() ); else this->setVariant( TQString() ); diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp index 9cd2e664..d7c4e7aa 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").tqarg(objectname) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(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->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); + this->children().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").tqarg(objectname).latin1(), name ); + KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").arg(objectname).latin1(), name ); if(! item) { - throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(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\".").tqarg(view).tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(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\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name)); } } } diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp index b7e89e9a..2f6ee825 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp @@ -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 tqchildren = variable->tqchildren(); - if(tqchildren.count() > 0) { + KoMacro::Variable::List children = variable->children(); + if(children.count() > 0) { TQStringList keys, names; - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.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 3529ea0c..520d1799 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 tqrepaint); + void rowInserted(KexiTableItem* item, uint row, bool repaint); /** * 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 f6422be9..25ec569f 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>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() )); + errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( 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").tqarg(i++)); + listviewitem->setText(0,TQString("%1").arg(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\"").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(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.").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl; return; } } diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui index 72c45001..26bd964d 100644 --- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui +++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui @@ -65,7 +65,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -87,7 +87,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index d5e576f9..e3599b22 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -86,7 +86,7 @@ void KexiMacroProperty::init() } //TESTCASE!!!!!!!!!!!!!!!!!!!!!! - //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() ); + //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").arg(variable->name()).latin1() ); Q_ASSERT(! d->name.isNull()); m_property->setName( d->name.latin1() ); @@ -389,45 +389,45 @@ class ListBox : public TQListBox Q_ASSERT( m_edititem->widget() != 0 ); const TQString name = m_macroproperty->name(); - KoMacro::Variable::List tqchildren; + KoMacro::Variable::List children; { - KoMacro::Variable::List actiontqchildren; + KoMacro::Variable::List actionchildren; 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()) - actiontqchildren = itemvar->tqchildren(); + actionchildren = itemvar->children(); 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()) - actiontqchildren += actionvar->tqchildren(); + actionchildren += actionvar->children(); - KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd()); + KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd()); for(; it != end; ++it) { if(name == (*it)->name()) { - KoMacro::Variable::List list = (*it)->tqchildren(); + KoMacro::Variable::List list = (*it)->children(); KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd()); for(; listit != listend; ++listit) - tqchildren.append( *listit ); + children.append( *listit ); } } - if(tqchildren.count() <= 0) - tqchildren = actiontqchildren; + if(children.count() <= 0) + children = actionchildren; } /* - kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl; - KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd()); + kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl; + KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd()); for(; listit != listend; ++listit) { - kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl; + kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl; } */ - if(tqchildren.count() > 0) { - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + if(children.count() > 0) { + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); for(; childit != childend; ++childit) { const TQString n = (*childit)->name(); //if(! n.startsWith("@")) continue; diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp index e35ee5b2..d7f3801e 100644 --- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp @@ -72,7 +72,7 @@ bool KexiMacroTextView::loadData() return false; } - kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl; + kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").arg(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").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()).tqarg(d->editor->text()) << endl; + kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(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 e9f9cd33..19e789f0 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").tqarg(domdoc.toString()) << endl; + kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").arg(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]").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()); - kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl; + 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; return storeDataBlock(xml); } diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp index 45c03d12..fc729b57 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\"").tqarg(name()) << endl; + //kdDebug() << TQString("Action::~Action() name=\"%1\"").arg(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").tqarg(name()); + return TQString("Action:%1").arg(name()); } const TQString Action::name() const diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index 7c0b6ee8..c0eea250 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 tqchildren of the + * List of @a Action instances that are children 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 tqchildren to macro tqchildren + , items(m->items()) // set d-pointer children to macro children , 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.").tqarg(name)); + throw Exception(TQString("Variable name='%1' does not exist.").arg(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'").tqarg(name).tqarg(variable->toString()) << endl; + kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(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").tqarg(d->macro->name()) ); + d->exception->addTraceMessage( TQString("macro=%1").arg(d->macro->name()) ); //the action name - d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) ); + d->exception->addTraceMessage( TQString("action=%1").arg(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").tqarg(*vit).tqarg(v->toString()) ); + d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) ); } return; // abort execution } diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h index 2bb1bef3..a7986167 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 tqchildren + * an instance of this class and passes it around all it's children * 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 91cfa03c..b435f2f2 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\"").tqarg(errormessage) << endl; + kdDebug() << TQString("Exception errormessage=\"%1\"").arg(errormessage) << endl; } //copy constructor diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp index 6bcdc21d..808c4043 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").tqarg(name()); + return TQString("Macro:%1").arg(name()); } //get (d-pointer) itemlist diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h index 86e0122a..5e5decf8 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 tqchildren of this @a Macro . + * are children 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 16b93803..05bd22c3 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\"").tqarg(d->signature)); + throw Exception(TQString("Invalid signature \"%1\"").arg(d->signature)); } d->signaturetag = d->signature.left(startpos).stripWhiteSpace(); if(d->signaturetag.isEmpty()) { - throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("Invalid tagname in signature \"%1\"").arg(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\"").tqarg(d->signature)); + throw Exception(TQString("No closing template-definiton in signature \"%1\"").arg(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\"").tqarg(d->signature)); + throw Exception(TQString("To less arguments for slot with siganture \"%1\"").arg(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\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(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())); } switch(metaargument->type()) { @@ -287,7 +287,7 @@ KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) return new Variable(v); } - throw Exception(TQString("Invalid parameter '%1'").tqarg(desc)); + throw Exception(TQString("Invalid parameter '%1'").arg(desc)); } Variable::List MetaMethod::toVariableList(TQUObject* uo) diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index 0916fe37..ee865c82 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -91,7 +91,7 @@ int MetaObject::indexOfSignal(const char* signal) const TQMetaObject* metaobject = object()->metaObject(); int signalid = metaobject->findSignal(signal, false); if(signalid < 0) { - throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal)); + throw Exception(TQString("Invalid signal \"%1\"").arg(signal)); } return signalid; } @@ -101,7 +101,7 @@ int MetaObject::indexOfSlot(const char* slot) const TQMetaObject* metaobject = object()->metaObject(); int slotid = metaobject->findSlot(slot, false); if(slotid < 0) { - throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot)); + throw Exception(TQString("Invalid slot \"%1\"").arg(slot)); } return slotid; } @@ -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\"").tqarg(index).tqarg(obj->name())); + throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name())); } type = MetaMethod::Signal; } if(metadata->access != TQMetaData::Public) { - throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name())); + throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(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 f64613b0..3661ef9a 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 tqchildren this @a Variable has. + * Optional list of children this @a Variable has. */ // TODO Dow we use this or is it for the future?? - Variable::List tqchildren; + Variable::List children; /** * 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]").tqarg( object()->name() ); + return TQString("[%1]").arg( object()->name() ); } break; default: { throw Exception("Type is undefined."); @@ -213,24 +213,24 @@ int Variable::toInt() const return variant().toInt(); } -Variable::List Variable::tqchildren() const +Variable::List Variable::children() const { - return d->tqchildren; + return d->children; } void Variable::appendChild(KSharedPtr<Variable> variable) { - d->tqchildren.append(variable); + d->children.append(variable); } void Variable::clearChildren() { - d->tqchildren.clear(); + d->children.clear(); } -void Variable::setChildren(const Variable::List& tqchildren) +void Variable::setChildren(const Variable::List& children) { - d->tqchildren = tqchildren; + d->children = children; } /* diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h index 108a6005..14adf09c 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 tqchildren of this @a Variable . + * that are children 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 tqchildren() const; + List children() const; /** - * Append a @a Variable to the list of tqchildren this + * Append a @a Variable to the list of children this * @a Variable has. */ void appendChild(KSharedPtr<Variable> variable); /** - * Clear the list of tqchildren this @a Variable has. + * Clear the list of children this @a Variable has. */ void clearChildren(); /** - * Set the tqchildren this @a Variable has. + * Set the children this @a Variable has. */ - void setChildren(const List& tqchildren); + void setChildren(const List& children); #if 0 /** diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp index 4894c619..5b53d51b 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\"").tqarg(element.tagName()) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(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\"").tqarg(element.attribute("xmlversion")) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(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 tqchildren this item has and try + // Iterate through the children 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-tqchildren a Macro provides. + // The list of MacroItem-children 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 tqchildren the Macro provides. + // ...and iterate over the list of children 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 1086a340..bdc2e6ad 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 & , int)\">" "<argument>" + argument1 + "</argument>" - "<argument>" + TQString("%1").tqarg(argument2) + "</argument>" + "<argument>" + TQString("%1").arg(argument2) + "</argument>" "</function>" )); @@ -677,7 +677,7 @@ void CommonTests::testMacro() // KOMACROTEST_ASSERT( actionptr->comment(), TQString("") ); /* //fetch the second one - KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1]; + KSharedPtr<KoMacro::Action> myfuncptr = children[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 tqchildren from yanMacro - //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren(); + //create a list of the children from yanMacro + //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children(); //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 tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children 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 tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children 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 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 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 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 e301730d..ee746991 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").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 == %2").arg(#actual).arg(#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").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 != %2").arg(#actual).arg(#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 e0db481e..2634d71a 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").tqarg(s); + TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").arg(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 29c53831..90454d35 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>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(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>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(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>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(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>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(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>").tqarg(DBL_MAX+1); + "</macro>").arg(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 ac176f89..f32416c0 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>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(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>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(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>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(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>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); |