diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-31 00:15:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-31 00:15:51 -0600 |
commit | f7055674768fa7f0267da4a14b9061e60ebab3fc (patch) | |
tree | 9cf91b2040d16220234c24c945e950952c359832 /kexi/plugins | |
parent | af2ab9c9888013e42237f71166eeafe5e988da0f (diff) | |
download | koffice-f7055674768fa7f0267da4a14b9061e60ebab3fc.tar.gz koffice-f7055674768fa7f0267da4a14b9061e60ebab3fc.zip |
Rename KShared
Diffstat (limited to 'kexi/plugins')
52 files changed, 429 insertions, 429 deletions
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp index 19922122..4e211a53 100644 --- a/kexi/plugins/macros/kexiactions/datatableaction.cpp +++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp @@ -46,7 +46,7 @@ namespace KexiMacro { { TQStringList list; list << "import" << "export"; - this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); this->setVariant( list[0] ); } @@ -61,7 +61,7 @@ namespace KexiMacro { { TQStringList list; list << "file" << "clipboard"; - this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); this->setVariant( list[0] ); } @@ -87,10 +87,10 @@ namespace KexiMacro { namelist << info->objectName() + "." + item_it.current()->name(); } for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it) - this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); //const TQString name = info->objectName(); //info->groupName(); - //this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) ); + //this->appendChild( TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) ); } const TQString n = namelist.contains(partitem) @@ -106,20 +106,20 @@ namespace KexiMacro { DataTableAction::DataTableAction() : KexiAction("datatable", i18n("Data Table")) { - setVariable(KSharedPtr<KoMacro::Variable>( new MethodVariable<DataTableAction>(this) )); - setVariable(KSharedPtr<KoMacro::Variable>( new TypeVariable<DataTableAction>(this) )); - setVariable(KSharedPtr<KoMacro::Variable>( new PartItemVariable<DataTableAction>(this) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new MethodVariable<DataTableAction>(this) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new TypeVariable<DataTableAction>(this) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new PartItemVariable<DataTableAction>(this) )); } DataTableAction::~DataTableAction() { } -bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +bool DataTableAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { kdDebug()<<"DataTableAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl; /* - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); if(! variable) { kdWarning()<<"DataTableAction::notifyUpdated() No such variable="<<name<<" in macroitem."<<endl; return false; @@ -128,16 +128,16 @@ bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, co if(name == "method") { const int partitem = macroitem->variant(OBJECT, true).toString(); macroitem->variable(OBJECT, true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectVariable<ExecuteAction>(this, partitem)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new ObjectVariable<ExecuteAction>(this, partitem)) ); } */ return true; } -void DataTableAction::activate(KSharedPtr<KoMacro::Context> context) +void DataTableAction::activate(TDESharedPtr<KoMacro::Context> context) { if(! mainWin()->project()) { - kdWarning() << "ExecuteAction::activate(KSharedPtr<KoMacro::Context>) Invalid project" << endl; + kdWarning() << "ExecuteAction::activate(TDESharedPtr<KoMacro::Context>) Invalid project" << endl; return; } diff --git a/kexi/plugins/macros/kexiactions/datatableaction.h b/kexi/plugins/macros/kexiactions/datatableaction.h index e3f71601..a3acf5f8 100644 --- a/kexi/plugins/macros/kexiactions/datatableaction.h +++ b/kexi/plugins/macros/kexiactions/datatableaction.h @@ -61,7 +61,7 @@ namespace KexiMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); public slots: @@ -69,7 +69,7 @@ namespace KexiMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp index 564b03c8..7383b9a8 100644 --- a/kexi/plugins/macros/kexiactions/executeaction.cpp +++ b/kexi/plugins/macros/kexiactions/executeaction.cpp @@ -40,20 +40,20 @@ ExecuteAction::ExecuteAction() : KexiAction("execute", i18n("Execute")) { int conditions = ObjectVariable<ExecuteAction>::VisibleInNav | ObjectVariable<ExecuteAction>::Executable; - KSharedPtr<KoMacro::Variable> objvar = new ObjectVariable<ExecuteAction>(this, conditions); + TDESharedPtr<KoMacro::Variable> objvar = new ObjectVariable<ExecuteAction>(this, conditions); setVariable(objvar); - setVariable(KSharedPtr<KoMacro::Variable>( new ObjectNameVariable<ExecuteAction>(this, objvar->variant().toString()) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new ObjectNameVariable<ExecuteAction>(this, objvar->variant().toString()) )); } ExecuteAction::~ExecuteAction() { } -bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +bool ExecuteAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { kdDebug()<<"ExecuteAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl; - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); if(! variable) { kdWarning()<<"ExecuteAction::notifyUpdated() No such variable="<<name<<" in macroitem."<<endl; return false; @@ -64,16 +64,16 @@ bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, cons const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script" const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro" macroitem->variable(NAME, true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<ExecuteAction>(this, objectvalue, objectname)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new ObjectNameVariable<ExecuteAction>(this, objectvalue, objectname)) ); } return true; } -void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context) +void ExecuteAction::activate(TDESharedPtr<KoMacro::Context> context) { if(! mainWin()->project()) { - kdWarning() << "ExecuteAction::activate(KSharedPtr<KoMacro::Context>) Invalid project" << endl; + kdWarning() << "ExecuteAction::activate(TDESharedPtr<KoMacro::Context>) Invalid project" << endl; return; } diff --git a/kexi/plugins/macros/kexiactions/executeaction.h b/kexi/plugins/macros/kexiactions/executeaction.h index 04fef2dc..be7c95dc 100644 --- a/kexi/plugins/macros/kexiactions/executeaction.h +++ b/kexi/plugins/macros/kexiactions/executeaction.h @@ -63,7 +63,7 @@ namespace KexiMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); public slots: @@ -71,7 +71,7 @@ namespace KexiMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/kexiactions/messageaction.cpp b/kexi/plugins/macros/kexiactions/messageaction.cpp index a36d0526..f421abb5 100644 --- a/kexi/plugins/macros/kexiactions/messageaction.cpp +++ b/kexi/plugins/macros/kexiactions/messageaction.cpp @@ -39,9 +39,9 @@ MessageAction::~MessageAction() { } -void MessageAction::activate(KSharedPtr<KoMacro::Context> context) +void MessageAction::activate(TDESharedPtr<KoMacro::Context> context) { - kdDebug() << "MessageAction::activate(KSharedPtr<Context>)" << endl; + kdDebug() << "MessageAction::activate(TDESharedPtr<Context>)" << endl; const TQString caption = context->variable("caption")->variant().toString(); const TQString message = context->variable("message")->variant().toString(); KMessageBox::information(mainWin(), message, caption); diff --git a/kexi/plugins/macros/kexiactions/messageaction.h b/kexi/plugins/macros/kexiactions/messageaction.h index da7723c3..9af12b89 100644 --- a/kexi/plugins/macros/kexiactions/messageaction.h +++ b/kexi/plugins/macros/kexiactions/messageaction.h @@ -59,7 +59,7 @@ namespace KexiMacro { * Called if the @a Action should be executed within the * defined @param context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp index 815b8723..336039ae 100644 --- a/kexi/plugins/macros/kexiactions/navigateaction.cpp +++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp @@ -47,7 +47,7 @@ namespace KexiMacro { { TQStringList list; list << "first" << "previous" << "next" << "last" << "goto"; - this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) ); /*TODO should this actions belong to navigate? maybe it would be more wise to have such kind of functionality in an own e.g. "Modify" action to outline, that @@ -64,25 +64,25 @@ NavigateAction::NavigateAction() : KexiAction("navigate", i18n("Navigate")) { KoMacro::Variable* navvar = new NavigateVariable<NavigateAction>(this); - setVariable(KSharedPtr<KoMacro::Variable>( navvar )); + setVariable(TDESharedPtr<KoMacro::Variable>( navvar )); KoMacro::Variable* rowvar = new KexiVariable<NavigateAction>(this, "rownr", i18n("Row")); rowvar->setVariant(0); - setVariable(KSharedPtr<KoMacro::Variable>(rowvar)); + setVariable(TDESharedPtr<KoMacro::Variable>(rowvar)); KoMacro::Variable* colvar = new KexiVariable<NavigateAction>(this, "colnr", i18n("Column")); colvar->setVariant(0); - setVariable(KSharedPtr<KoMacro::Variable>(colvar)); + setVariable(TDESharedPtr<KoMacro::Variable>(colvar)); } NavigateAction::~NavigateAction() { } -bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +bool NavigateAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { kdDebug()<<"NavigateAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl; - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); if(! variable) { kdWarning()<<"NavigateAction::notifyUpdated() No such variable="<<name<<" in macroitem."<<endl; return false; @@ -94,15 +94,15 @@ bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, con const int colnr = macroitem->variant("colnr", true).toInt(); // e.g. "macro1" or "macro2" if objectvalue above is "macro" macroitem->variable("rownr", true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(rownr)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(rownr)) ); macroitem->variable("colnr", true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(colnr)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(colnr)) ); } return true; } -void NavigateAction::activate(KSharedPtr<KoMacro::Context> context) +void NavigateAction::activate(TDESharedPtr<KoMacro::Context> context) { KexiDialogBase* dialog = dynamic_cast<KexiDialogBase*>( mainWin()->activeWindow() ); if(! dialog) { diff --git a/kexi/plugins/macros/kexiactions/navigateaction.h b/kexi/plugins/macros/kexiactions/navigateaction.h index 449a9459..0dcff98a 100644 --- a/kexi/plugins/macros/kexiactions/navigateaction.h +++ b/kexi/plugins/macros/kexiactions/navigateaction.h @@ -63,7 +63,7 @@ namespace KexiMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); public slots: @@ -71,7 +71,7 @@ namespace KexiMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h index 1a0aabf8..03545f69 100644 --- a/kexi/plugins/macros/kexiactions/objectnamevariable.h +++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h @@ -61,7 +61,7 @@ namespace KexiMacro { namelist << ""; for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it) - this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name ); diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h index c27f024b..65def3aa 100644 --- a/kexi/plugins/macros/kexiactions/objectvariable.h +++ b/kexi/plugins/macros/kexiactions/objectvariable.h @@ -67,7 +67,7 @@ namespace KexiMacro { continue; const TQString name = info->objectName(); //info->groupName(); - this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) ); + this->appendChild( TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) ); } if(! objectname.isNull()) diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp index d7c4e7aa..f5206ff5 100644 --- a/kexi/plugins/macros/kexiactions/openaction.cpp +++ b/kexi/plugins/macros/kexiactions/openaction.cpp @@ -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->children().append( TDESharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); } const TQString n = namelist.contains(viewname) @@ -81,21 +81,21 @@ OpenAction::OpenAction() { const int conditions = ObjectVariable<OpenAction>::VisibleInNav; - KSharedPtr<KoMacro::Variable> objvar = new ObjectVariable<OpenAction>(this, conditions); + TDESharedPtr<KoMacro::Variable> objvar = new ObjectVariable<OpenAction>(this, conditions); setVariable(objvar); - setVariable(KSharedPtr<KoMacro::Variable>( new ObjectNameVariable<OpenAction>(this, objvar->variant().toString()) )); - setVariable(KSharedPtr<KoMacro::Variable>( new ViewVariable<OpenAction>(this, objvar->variant().toString()) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new ObjectNameVariable<OpenAction>(this, objvar->variant().toString()) )); + setVariable(TDESharedPtr<KoMacro::Variable>( new ViewVariable<OpenAction>(this, objvar->variant().toString()) )); } OpenAction::~OpenAction() { } -bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +bool OpenAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { kdDebug()<<"OpenAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl; - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false); if(! variable) { kdWarning()<<"OpenAction::notifyUpdated() No such variable="<<name<<" in macroitem."<<endl; return false; @@ -108,15 +108,15 @@ bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const T const TQString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text" macroitem->variable(NAME, true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<OpenAction>(this, objectvalue, objectname)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new ObjectNameVariable<OpenAction>(this, objectvalue, objectname)) ); macroitem->variable(VIEW, true)->setChildren( - KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ViewVariable<OpenAction>(this, objectvalue, viewname)) ); + KoMacro::Variable::List() << TDESharedPtr<KoMacro::Variable>(new ViewVariable<OpenAction>(this, objectvalue, viewname)) ); } return true; } -void OpenAction::activate(KSharedPtr<KoMacro::Context> context) +void OpenAction::activate(TDESharedPtr<KoMacro::Context> context) { if(! mainWin()->project()) { throw KoMacro::Exception(i18n("No project loaded.")); diff --git a/kexi/plugins/macros/kexiactions/openaction.h b/kexi/plugins/macros/kexiactions/openaction.h index 092dc371..700b6ef6 100644 --- a/kexi/plugins/macros/kexiactions/openaction.h +++ b/kexi/plugins/macros/kexiactions/openaction.h @@ -64,7 +64,7 @@ namespace KexiMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); public slots: @@ -72,7 +72,7 @@ namespace KexiMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp index 5406e8ca..dd8b9a92 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp @@ -137,7 +137,7 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *pare TQStringList actionnames = KoMacro::Manager::self()->actionNames(); TQStringList::ConstIterator it, end( actionnames.constEnd() ); for( it = actionnames.constBegin(); it != end; ++it) { - KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it); + TDESharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it); items.append( action->text() ); } @@ -218,7 +218,7 @@ void KexiMacroDesignView::updateData() d->tabledata->append(tableitem); } // Set the action-column. - KSharedPtr<KoMacro::Action> action = (*it)->action(); + TDESharedPtr<KoMacro::Action> action = (*it)->action(); if(action.data()) { int i = actionnames.findIndex( action->name() ); if(i >= 0) { @@ -273,11 +273,11 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQV // If the rowindex doesn't exists yet, we need to append new // items till we are able to access the item we like to use. for(int i = macro()->items().count(); i <= rowindex; i++) { - macro()->addItem( KSharedPtr<KoMacro::MacroItem>( new KoMacro::MacroItem() ) ); + macro()->addItem( TDESharedPtr<KoMacro::MacroItem>( new KoMacro::MacroItem() ) ); } // Get the matching MacroItem. - KSharedPtr<KoMacro::MacroItem> macroitem = macro()->items()[rowindex]; + TDESharedPtr<KoMacro::MacroItem> macroitem = macro()->items()[rowindex]; if(! macroitem.data()) { kdWarning() << "KexiMacroDesignView::beforeCellChanged() Invalid item for rowindex=" << rowindex << endl; return; @@ -293,7 +293,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQV TQStringList actionnames = KoMacro::Manager::self()->actionNames(); actionname = actionnames[ selectedindex - 1 ]; // first item is empty } - KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname); + TDESharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname); macroitem->setAction(action); updateProperties(d->propertyset->currentRow(), d->propertyset->currentPropertySet(), macroitem); propertySetReloaded(true); @@ -329,7 +329,7 @@ void KexiMacroDesignView::rowInserted(KexiTableItem*, uint row, bool) // need to do anything yet cause the new item will be handled on // beforeCellChanged() anyway. kdDebug() << "KexiMacroDesignView::rowInserted() Inserting new MacroItem" << endl; - KSharedPtr<KoMacro::MacroItem> macroitem = KSharedPtr<KoMacro::MacroItem>( new KoMacro::MacroItem() ); + TDESharedPtr<KoMacro::MacroItem> macroitem = TDESharedPtr<KoMacro::MacroItem>( new KoMacro::MacroItem() ); KoMacro::MacroItem::List::Iterator it = macroitems.at(row); macroitems.insert(it, macroitem); } @@ -347,7 +347,7 @@ void KexiMacroDesignView::rowDeleted() macroitems.remove( macroitems.at(rowindex) ); } -bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename) +bool KexiMacroDesignView::updateSet(KoProperty::Set* set, TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename) { kdDebug() << "KexiMacroDesignView::updateSet() variablename=" << variablename << endl; KoProperty::Property* property = KexiMacroProperty::createProperty(macroitem, variablename); @@ -357,7 +357,7 @@ bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::Ma return true; } -void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem) +void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, TDESharedPtr<KoMacro::MacroItem> macroitem) { kdDebug() << "KexiMacroDesignView::updateProperties() row=" << row << endl; @@ -365,7 +365,7 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare return; // ignore invalid rows and avoid infinite recursion. } - KSharedPtr<KoMacro::Action> action = macroitem->action(); + TDESharedPtr<KoMacro::Action> action = macroitem->action(); if(! action.data()) { // don't display a propertyset if there is no action defined. d->propertyset->remove(row); @@ -395,7 +395,7 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare TQStringList varnames = action->variableNames(); for(TQStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) { if(updateSet(set, macroitem, *it)) { - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true); kdDebug()<<"KexiMacroDesignView::updateProperties() name=" << *it << " variable=" << variable->variant().toString() << endl; #if 0 macroitem->setVariable(*it, variable); @@ -428,7 +428,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop setDirty(); if(reload) { // The MacroItem which should be changed. - KSharedPtr<KoMacro::MacroItem> macroitem = macro()->items()[row]; + TDESharedPtr<KoMacro::MacroItem> macroitem = macro()->items()[row]; // Update the properties. updateProperties(row, &set, macroitem); } @@ -442,11 +442,11 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop */ /* - TQStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv)); + TQStringList dirtyvarnames = macroitem->setVariable(name, TDESharedPtr<KoMacro::Variable>(pv)); bool dirty = false; bool reload = false; for(TQStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) { - KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it); + TDESharedPtr<KoMacro::Variable> variable = macroitem->variable(*it); if(! variable.data()) { kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " it=" << *it << " skipped cause such a variable is not known." << endl; continue; diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h index eaa64f37..c23e31f9 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.h +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h @@ -118,13 +118,13 @@ class KexiMacroDesignView : public KexiMacroView * Update the \a KoProperty::Set set with the passed \a KoMacro::MacroItem * \p item and the variablename \p variablename . */ - bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const TQString& variablename); + bool updateSet(KoProperty::Set* set, TDESharedPtr<KoMacro::MacroItem> item, const TQString& variablename); /** * Update the properties of the \a KoProperty::Set \p set at * row-number \p row with the \a KoMacro::MacroItem \p macroitem . */ - void updateProperties(int row, KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem); + void updateProperties(int row, KoProperty::Set* set, TDESharedPtr<KoMacro::MacroItem> macroitem); }; #endif diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp index 1b23fa50..6c35e8d7 100644 --- a/kexi/plugins/macros/kexipart/keximacroerror.cpp +++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp @@ -34,7 +34,7 @@ class KexiMacroError::Private { public: KexiMainWindow* const mainwin; - KSharedPtr<KoMacro::Context> context; + TDESharedPtr<KoMacro::Context> context; Private(KexiMainWindow* const m, KoMacro::Context* const c) : mainwin(m) @@ -43,7 +43,7 @@ class KexiMacroError::Private } }; -KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context) +KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, TDESharedPtr<KoMacro::Context> context) : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ TQt::WDestructiveClose) , d(new Private(mainwin, context)) { @@ -62,7 +62,7 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont KListViewItem* listviewitem = new KListViewItem(errorlist); listviewitem->setText(0,TQString("%1").arg(i++)); listviewitem->setText(1,i18n("Action")); - KSharedPtr<KoMacro::MacroItem> macroitem = *mit; + TDESharedPtr<KoMacro::MacroItem> macroitem = *mit; if (macroitem != 0 && macroitem->action() != 0) { @@ -103,7 +103,7 @@ void KexiMacroError::designbtnClicked() } // We need to determinate the KexiPart::Item which should be opened. - KSharedPtr<KoMacro::Macro> macro = d->context->macro(); + TDESharedPtr<KoMacro::Macro> macro = d->context->macro(); const TQString name = macro->name(); KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name); if(! item) { diff --git a/kexi/plugins/macros/kexipart/keximacroerror.h b/kexi/plugins/macros/kexipart/keximacroerror.h index f8fb5756..b3bfcad8 100644 --- a/kexi/plugins/macros/kexipart/keximacroerror.h +++ b/kexi/plugins/macros/kexipart/keximacroerror.h @@ -60,7 +60,7 @@ class KexiMacroError : public KexiMacroErrorBase * @param mainwin The parent @a KexiMainWindow instance. * @param context The @a KoMacro::Context where the error happened. */ - KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context); + KexiMacroError(KexiMainWindow* mainwin, TDESharedPtr<KoMacro::Context> context); /** * Destructor. diff --git a/kexi/plugins/macros/kexipart/keximacropart.cpp b/kexi/plugins/macros/kexipart/keximacropart.cpp index 1459fffc..c189b8ca 100644 --- a/kexi/plugins/macros/kexipart/keximacropart.cpp +++ b/kexi/plugins/macros/kexipart/keximacropart.cpp @@ -129,7 +129,7 @@ KexiViewBase* KexiMacroPart::createView(TQWidget* parent, KexiDialogBase* dialog //kdDebug() << "KexiMacroPart::createView() itemname=" << itemname << endl; if(! itemname.isNull()) { - KSharedPtr<KoMacro::Macro> macro = ::KoMacro::Manager::self()->getMacro(itemname); + TDESharedPtr<KoMacro::Macro> macro = ::KoMacro::Manager::self()->getMacro(itemname); if(! macro) { // If we don't have a macro with that name yet, create one. macro = ::KoMacro::Manager::self()->createMacro(itemname); diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index 7934ec71..07c8f8e1 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -47,13 +47,13 @@ class KexiMacroProperty::Private /** The @a KoMacro::MacroItem the custom property uses internal. Together with the name we are able to identify the used variable at runtime. */ - KSharedPtr<KoMacro::MacroItem> macroitem; + TDESharedPtr<KoMacro::MacroItem> macroitem; /** The name the variable @a KoMacro::Variable is known as in the @a KoMacro::MacroItem defined above. */ TQString name; }; -KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) : KoProperty::CustomProperty(parent) , d( new Private() ) { @@ -72,14 +72,14 @@ void KexiMacroProperty::init() Q_ASSERT( d->macroitem != 0 ); //kdDebug() << "--------- KexiMacroProperty::set() macroitem=" << d->macroitem->name() << " name=" << d->name << endl; - KSharedPtr<KoMacro::Action> action = d->macroitem->action(); - KSharedPtr<KoMacro::Variable> actionvariable = action->variable(d->name); + TDESharedPtr<KoMacro::Action> action = d->macroitem->action(); + TDESharedPtr<KoMacro::Variable> actionvariable = action->variable(d->name); if(! actionvariable.data()) { kdDebug() << "KexiMacroProperty::createProperty() Skipped cause there exists no such action=" << d->name << endl; return; } - KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true/*checkaction*/); + TDESharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true/*checkaction*/); if(! variable.data()) { kdDebug() << "KexiMacroProperty::createProperty() Skipped cause there exists no such variable=" << d->name << endl; return; @@ -121,7 +121,7 @@ void KexiMacroProperty::setValue(const TQVariant &value, bool rememberOldValue) TQVariant KexiMacroProperty::value() const { - KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true); + TDESharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true); Q_ASSERT( variable.data() != 0 ); return variable.data() ? variable->variant() : TQVariant(); } @@ -131,7 +131,7 @@ bool KexiMacroProperty::handleValue() const return true; // we handle getting and setting of values and don't need KoProperty::Property for it. } -KSharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const +TDESharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const { return d->macroitem; } @@ -141,12 +141,12 @@ TQString KexiMacroProperty::name() const return d->name; } -KSharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const +TDESharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const { return d->macroitem->variable(d->name, true/*checkaction*/); } -KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +KoProperty::Property* KexiMacroProperty::createProperty(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { KoProperty::Property* property = new KoProperty::Property(); KexiMacroProperty* customproperty = new KexiMacroProperty(property, macroitem, name); @@ -184,7 +184,7 @@ KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoPro return 0; } - KSharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem(); + TDESharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem(); Q_ASSERT( macroitem.data() != 0 ); const TQString name = parentcustomproperty->name(); Q_ASSERT(! name.isEmpty()); @@ -266,7 +266,7 @@ class EditListBoxItem : public ListBoxItem } virtual TQString text() const { - KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); + TDESharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); Q_ASSERT( variable.data() ); //kdDebug()<<"EditListBoxItem::text() text="<<variable->toString()<<endl; Q_ASSERT( variable->toString() != TQString() ); @@ -274,9 +274,9 @@ class EditListBoxItem : public ListBoxItem } KoProperty::Widget* widget() const { return m_widget; } - KSharedPtr<KoMacro::MacroItem> macroItem() const { return m_macroproperty->macroItem(); } - KSharedPtr<KoMacro::Variable> variable() const { return m_macroproperty->variable(); } - KSharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); } + TDESharedPtr<KoMacro::MacroItem> macroItem() const { return m_macroproperty->macroItem(); } + TDESharedPtr<KoMacro::Variable> variable() const { return m_macroproperty->variable(); } + TDESharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); } protected: virtual void paint(TQPainter* p) { @@ -290,9 +290,9 @@ class EditListBoxItem : public ListBoxItem private: void init() { - KSharedPtr<KoMacro::MacroItem> macroitem = m_macroproperty->macroItem(); + TDESharedPtr<KoMacro::MacroItem> macroitem = m_macroproperty->macroItem(); Q_ASSERT( macroitem.data() ); - KSharedPtr<KoMacro::Action> action = m_macroproperty->macroItem()->action(); + TDESharedPtr<KoMacro::Action> action = m_macroproperty->macroItem()->action(); if(! action.data()) { kdWarning() << "EditListBoxItem::EditListBoxItem() Skipped cause there exists no action for macroproperty=" << m_macroproperty->name() << endl; return; @@ -302,7 +302,7 @@ class EditListBoxItem : public ListBoxItem kdWarning() << "EditListBoxItem::EditListBoxItem() No parentproperty defined" << endl; return; } - KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); + TDESharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); if(! variable.data()) { kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << parentproperty->name() << endl; return; @@ -310,7 +310,7 @@ class EditListBoxItem : public ListBoxItem TQVariant variant = variable->variant(); - KSharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name()); + TDESharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name()); if(actionvariable.data()) { TQVariant actionvariant = actionvariable->variant(); Q_ASSERT( ! actionvariant.isNull() ); @@ -393,13 +393,13 @@ class ListBox : public TQListBox { KoMacro::Variable::List actionchildren; - KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false); + TDESharedPtr<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(); - KSharedPtr<KoMacro::Action> action = m_edititem->action(); - KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>(); + TDESharedPtr<KoMacro::Action> action = m_edititem->action(); + TDESharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : TDESharedPtr<KoMacro::Variable>(); //kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl; if(actionvar.data()) actionchildren += actionvar->children(); diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.h b/kexi/plugins/macros/kexipart/keximacroproperty.h index 44ad8bd4..47f7a7e1 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.h +++ b/kexi/plugins/macros/kexipart/keximacroproperty.h @@ -47,7 +47,7 @@ class KexiMacroProperty public: /** Constructor. */ - explicit KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + explicit KexiMacroProperty(KoProperty::Property* parent, TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); /** Destructor. */ virtual ~KexiMacroProperty(); @@ -73,7 +73,7 @@ class KexiMacroProperty /** \return the \a KoMacro::MacroItem this custom property has or NULL if there was no item provided. */ - KSharedPtr<KoMacro::MacroItem> macroItem() const; + TDESharedPtr<KoMacro::MacroItem> macroItem() const; /** \return the name the property has in the \a KoMacro::MacroItem above. Is TQString() if there was no item provided. */ @@ -82,11 +82,11 @@ class KexiMacroProperty /** \return the \a KoMacro::Variable which has the name @a name() in the item @a macroItem() . If such a variable doesn't exists NULL is returned. */ - KSharedPtr<KoMacro::Variable> variable() const; + TDESharedPtr<KoMacro::Variable> variable() const; /** Factory function to create a new @a KoProperty::Property instance that will use a @a KexiMacroProperty as container. */ - static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + static KoProperty::Property* createProperty(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); signals: diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp index 19e789f0..f0e7ea0b 100644 --- a/kexi/plugins/macros/kexipart/keximacroview.cpp +++ b/kexi/plugins/macros/kexipart/keximacroview.cpp @@ -47,7 +47,7 @@ class KexiMacroView::Private * The \a KoMacro::Manager instance used to access the * Macro Framework. */ - KSharedPtr<KoMacro::Macro> macro; + TDESharedPtr<KoMacro::Macro> macro; /** * Constructor. @@ -76,7 +76,7 @@ KexiMacroView::~KexiMacroView() delete d; } -KSharedPtr<KoMacro::Macro> KexiMacroView::macro() const +TDESharedPtr<KoMacro::Macro> KexiMacroView::macro() const { return d->macro; } @@ -161,7 +161,7 @@ tristate KexiMacroView::storeData(bool /*dontAsk*/) void KexiMacroView::execute(TQObject* sender) { - KSharedPtr<KoMacro::Context> context = d->macro->execute(sender); + TDESharedPtr<KoMacro::Context> context = d->macro->execute(sender); if(context->hadException()) { KexiMacroError* error = new KexiMacroError( mainWin(), // The parent KexiMainWindow diff --git a/kexi/plugins/macros/kexipart/keximacroview.h b/kexi/plugins/macros/kexipart/keximacroview.h index c11d48e8..ddff961f 100644 --- a/kexi/plugins/macros/kexipart/keximacroview.h +++ b/kexi/plugins/macros/kexipart/keximacroview.h @@ -63,7 +63,7 @@ class KexiMacroView : public KexiViewBase /** * \return the Macro instance. */ - KSharedPtr<KoMacro::Macro> macro() const; + TDESharedPtr<KoMacro::Macro> macro() const; /** * Load the data from XML source and fill the internally diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp index fc729b57..3fc1adf6 100644 --- a/kexi/plugins/macros/lib/action.cpp +++ b/kexi/plugins/macros/lib/action.cpp @@ -68,7 +68,7 @@ namespace KoMacro { Action::Action(const TQString& name, const TQString& text) : TQObject() - , KShared() + , TDEShared() , d( new Private() ) // create the private d-pointer instance. { kdDebug() << "Action::Action() name=" << name << endl; @@ -76,7 +76,7 @@ Action::Action(const TQString& name, const TQString& text) setText(text); // Publish this action. - KoMacro::Manager::self()->publishAction( KSharedPtr<Action>(this) ); + KoMacro::Manager::self()->publishAction( TDESharedPtr<Action>(this) ); } Action::~Action() @@ -127,9 +127,9 @@ bool Action::hasVariable(const TQString& name) const return d->varmap.contains(name); } -KSharedPtr<Variable> Action::variable(const TQString& name) const +TDESharedPtr<Variable> Action::variable(const TQString& name) const { - return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0); + return d->varmap.contains(name) ? d->varmap[name] : TDESharedPtr<Variable>(0); } Variable::Map Action::variables() const @@ -142,7 +142,7 @@ TQStringList Action::variableNames() const return d->varnames; } -void Action::setVariable(KSharedPtr<Variable> variable) +void Action::setVariable(TDESharedPtr<Variable> variable) { const TQString name = variable->name(); if(! d->varmap.contains(name)) { @@ -156,7 +156,7 @@ void Action::setVariable(const TQString& name, const TQString& text, const TQVar Variable* variable = new Variable(variant); variable->setName(name); variable->setText(text); - setVariable( KSharedPtr<Variable>(variable) ); + setVariable( TDESharedPtr<Variable>(variable) ); } void Action::removeVariable(const TQString& name) diff --git a/kexi/plugins/macros/lib/action.h b/kexi/plugins/macros/lib/action.h index 762e27ae..c779f21a 100644 --- a/kexi/plugins/macros/lib/action.h +++ b/kexi/plugins/macros/lib/action.h @@ -37,7 +37,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Action : public TQObject // TQt functionality like signals and slots - , public KShared // shared reference-counting + , public TDEShared // shared reference-counting { Q_OBJECT @@ -56,7 +56,7 @@ namespace KoMacro { /** * Shared pointer to implement reference-counting. */ - typedef TQMap<TQString, KSharedPtr<Action> > Map; + typedef TQMap<TQString, TDESharedPtr<Action> > Map; /** * Constructor. @@ -118,7 +118,7 @@ namespace KoMacro { * name @p name . If there exists no @a Variable with * such a name, NULL is returned. */ - KSharedPtr<Variable> variable(const TQString& name) const; + TDESharedPtr<Variable> variable(const TQString& name) const; /** * @return the map of variables this @a Action provides. @@ -134,7 +134,7 @@ namespace KoMacro { * Append the @a Variable @p variable to list of variables * this @a Action provides. */ - void setVariable(KSharedPtr<Variable> variable); + void setVariable(TDESharedPtr<Variable> variable); /** * Set the variable. @@ -162,7 +162,7 @@ namespace KoMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(const KSharedPtr<MacroItem> ¯oitem, const TQString& name) { + virtual bool notifyUpdated(const TDESharedPtr<MacroItem> ¯oitem, const TQString& name) { Q_UNUSED(macroitem); Q_UNUSED(name); return true; // The default implementation does nothing. @@ -174,7 +174,7 @@ namespace KoMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<Context> context) = 0; + virtual void activate(TDESharedPtr<Context> context) = 0; private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index c0eea250..a09704bd 100644 --- a/kexi/plugins/macros/lib/context.cpp +++ b/kexi/plugins/macros/lib/context.cpp @@ -41,25 +41,25 @@ namespace KoMacro { /** * The @a Macro instance that owns this @a Context . */ - KSharedPtr<Macro> macro; + TDESharedPtr<Macro> macro; /** * List of @a Action instances that are children of the * macro. */ - TQValueList<KSharedPtr<MacroItem > > items; + TQValueList<TDESharedPtr<MacroItem > > items; /** * The currently selected @a MacroItem or NULL if there * is now @a MacroItem selected yet. */ - KSharedPtr<MacroItem> macroitem; + TDESharedPtr<MacroItem> macroitem; /** * Map of all @a Variable instance that are defined within * this context. */ - TQMap<TQString, KSharedPtr<Variable > > variables; + TQMap<TQString, TDESharedPtr<Variable > > variables; /** * The @a Exception instance thrown at the last @a activate() @@ -68,7 +68,7 @@ namespace KoMacro { Exception* exception; /// Constructor. - explicit Private(KSharedPtr<Macro> m) + explicit Private(TDESharedPtr<Macro> m) : macro(m) // remember the macro , items(m->items()) // set d-pointer children to macro children , exception(0) // no exception yet. @@ -84,7 +84,7 @@ namespace KoMacro { } //Constructor with initialization of our Private.object (d-pointer) -Context::Context(KSharedPtr<Macro> macro) +Context::Context(TDESharedPtr<Macro> macro) : TQObject() , d( new Private(macro) ) // create the private d-pointer instance. { @@ -104,7 +104,7 @@ bool Context::hasVariable(const TQString& name) const } //return variable with name or throw an exception if none is found in variables -KSharedPtr<Variable> Context::variable(const TQString& name) const +TDESharedPtr<Variable> Context::variable(const TQString& name) const { //Use TQMap?s contains to check if a variable with name exists in context if (d->variables.contains(name)) { @@ -113,7 +113,7 @@ KSharedPtr<Variable> Context::variable(const TQString& name) const } //if there is a macroitem try to get variable from it if(d->macroitem.data()) { - KSharedPtr<Variable> v = d->macroitem->variable(name, true); + TDESharedPtr<Variable> v = d->macroitem->variable(name, true); if(v.data()) { return v; } @@ -129,7 +129,7 @@ Variable::Map Context::variables() const } //set a variable -void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) +void Context::setVariable(const TQString& name, TDESharedPtr<Variable> variable) { //debuging infos kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl; @@ -138,13 +138,13 @@ void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) } //return the associated Macro -KSharedPtr<Macro> Context::macro() const +TDESharedPtr<Macro> Context::macro() const { return d->macro; } //return the currently selected MacroItem -KSharedPtr<MacroItem> Context::macroItem() const +TDESharedPtr<MacroItem> Context::macroItem() const { return d->macroitem; } @@ -162,18 +162,18 @@ Exception* Context::exception() const } //try to activate all action?s in this context -void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) +void Context::activate(TQValueList<TDESharedPtr<MacroItem > >::ConstIterator it) { //debuging infos kdDebug() << "Context::activate()" << endl; //TQ_ASSIGN(d->macro); //set end to constEnd - TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); + TQValueList<TDESharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); //loop through actions for(;it != end; ++it) { // fetch the MacroItem we are currently pointing to. - d->macroitem = KSharedPtr<MacroItem>(*it); + d->macroitem = TDESharedPtr<MacroItem>(*it); //skip empty macroitems if(! d->macroitem.data()) { kdDebug() << "Context::activate() Skipping empty MacroItem" << endl; @@ -181,7 +181,7 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) } // fetch the Action, the MacroItem points to. - KSharedPtr<Action> action = d->macroitem->action(); + TDESharedPtr<Action> action = d->macroitem->action(); //skip macroitems without an action if(! action.data()) { kdDebug() << "Context::activate() Skipping MacroItem with no action" << endl; @@ -204,7 +204,7 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) //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); + TDESharedPtr<Variable> v = d->macroitem->variable(*vit, true); d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) ); } return; // abort execution @@ -213,11 +213,11 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) // The run is done. So, let's remove the currently selected item to // outline, that we did the job and there stays no dangling item. - d->macroitem = KSharedPtr<MacroItem>(0); + d->macroitem = TDESharedPtr<MacroItem>(0); } //try to activated an context -void Context::activate(KSharedPtr<Context> context) +void Context::activate(TDESharedPtr<Context> context) { //setup context delete d->exception; d->exception = 0; @@ -252,7 +252,7 @@ void Context::activateNext() } //find the macroitem from which to continue - TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem); + TQValueList<TDESharedPtr<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/context.h b/kexi/plugins/macros/lib/context.h index 4f9621cc..9bb0f5eb 100644 --- a/kexi/plugins/macros/lib/context.h +++ b/kexi/plugins/macros/lib/context.h @@ -40,7 +40,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Context : public TQObject - , public KShared + , public TDEShared { Q_OBJECT @@ -51,7 +51,7 @@ namespace KoMacro { * * @param macro The @a Macro this @a Context belongs to. */ - explicit Context(KSharedPtr<Macro> macro); + explicit Context(TDESharedPtr<Macro> macro); /** * Destructor. @@ -68,7 +68,7 @@ namespace KoMacro { * @return the @a Variable defined with name @p name or * NULL if there exists no such variable. */ - KSharedPtr<Variable> variable(const TQString& name) const; + TDESharedPtr<Variable> variable(const TQString& name) const; /** * @return a map of all @a Variable instance that are defined @@ -80,18 +80,18 @@ namespace KoMacro { * Set the variable @p variable defined with name @p name . If * there exists already a variable with that name replace it. */ - void setVariable(const TQString& name, KSharedPtr<Variable> variable); + void setVariable(const TQString& name, TDESharedPtr<Variable> variable); /** * @return the associated macro */ - KSharedPtr<Macro> macro() const; + TDESharedPtr<Macro> macro() const; /** * @return the currently selected @a MacroItem instance * or NULL if there is no @a MacroItem selected yet. */ - KSharedPtr<MacroItem> macroItem() const; + TDESharedPtr<MacroItem> macroItem() const; /** * @return true if the last @a activate() stopped with an @@ -114,7 +114,7 @@ namespace KoMacro { * remembers what @a Action should be executed next and * calling this slot just activates those @a Action . */ - virtual void activate(TQValueList<KSharedPtr <MacroItem> >::ConstIterator it); + virtual void activate(TQValueList<TDESharedPtr <MacroItem> >::ConstIterator it); public slots: @@ -123,7 +123,7 @@ namespace KoMacro { * @a Context @p context which will be used as * parent context for this context. */ - virtual void activate(KSharedPtr<Context> context); + virtual void activate(TDESharedPtr<Context> context); /** * This slot continues execution. diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp index 808c4043..af29da57 100644 --- a/kexi/plugins/macros/lib/macro.cpp +++ b/kexi/plugins/macros/lib/macro.cpp @@ -41,7 +41,7 @@ namespace KoMacro { /** * A list of @a MacroItem instances. */ - TQValueList<KSharedPtr<MacroItem > > itemlist; + TQValueList<TDESharedPtr<MacroItem > > itemlist; /** * The name the @a Macro has. @@ -55,7 +55,7 @@ namespace KoMacro { //constructor, initalize internal (d-pointer) name Macro::Macro(const TQString& name) : TQObject() - , KShared() + , TDEShared() , XMLHandler(this) , d( new Private() ) // create the private d-pointer instance. { @@ -88,13 +88,13 @@ const TQString Macro::toString() const } //get (d-pointer) itemlist -TQValueList<KSharedPtr<MacroItem > >& Macro::items() const +TQValueList<TDESharedPtr<MacroItem > >& Macro::items() const { return d->itemlist; } //add a macroitem to internal (d-pointer) itemlist -void Macro::addItem(KSharedPtr<MacroItem> item) +void Macro::addItem(TDESharedPtr<MacroItem> item) { d->itemlist.append(item); } @@ -105,15 +105,15 @@ void Macro::clearItems() } //run our macro -KSharedPtr<Context> Macro::execute(TQObject* sender) +TDESharedPtr<Context> Macro::execute(TQObject* sender) { - kdDebug() << "Macro::execute(KSharedPtr<Context>)" << endl; + kdDebug() << "Macro::execute(TDESharedPtr<Context>)" << endl; //create context in which macro can/should run - KSharedPtr<Context> c = KSharedPtr<Context>( new Context(this) ); + TDESharedPtr<Context> c = TDESharedPtr<Context>( new Context(this) ); if(sender) { // set the sender-variable if we got a sender TQObject. - c->setVariable("[sender]", KSharedPtr<Variable>( new Variable(sender) )); + c->setVariable("[sender]", TDESharedPtr<Variable>( new Variable(sender) )); } //connect(context, TQT_SIGNAL(activated()), this, TQT_SIGNAL(activated())); diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h index 80d50deb..cc1fd77e 100644 --- a/kexi/plugins/macros/lib/macro.h +++ b/kexi/plugins/macros/lib/macro.h @@ -40,7 +40,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Macro : public TQObject // TQt functionality like signals and slots - , public KShared // shared reference-counting + , public TDEShared // shared reference-counting , public XMLHandler // to (un-)serialize from/to XML { Q_OBJECT @@ -53,7 +53,7 @@ namespace KoMacro { * class should use this typemap rather then the TQMap direct. That * way we are more flexible on future changes. */ - typedef TQMap<TQString, KSharedPtr<Macro > > Map; + typedef TQMap<TQString, TDESharedPtr<Macro > > Map; /** * Constructor. @@ -87,13 +87,13 @@ namespace KoMacro { * @return a list of @a MacroItem instances which * are children of this @a Macro . */ - TQValueList< KSharedPtr<MacroItem> >& items() const; + TQValueList< TDESharedPtr<MacroItem> >& items() const; /** * Add the @a MacroItem @p item to the list of items * this @a Macro has. */ - void addItem(KSharedPtr<MacroItem> item); + void addItem(TDESharedPtr<MacroItem> item); /** * Removes all @a MacroItem instances this @a Macro has. @@ -117,7 +117,7 @@ namespace KoMacro { * @param context The @a Context this @a Macro should * be executed in. */ - virtual KSharedPtr<Context> execute(TQObject* sender); + virtual TDESharedPtr<Context> execute(TQObject* sender); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp index cf317fab..33e69c31 100644 --- a/kexi/plugins/macros/lib/macroitem.cpp +++ b/kexi/plugins/macros/lib/macroitem.cpp @@ -35,7 +35,7 @@ namespace KoMacro { /** * The @a Action this @a MacroItem has. */ - KSharedPtr<Action> action; + TDESharedPtr<Action> action; /** * The comment this @a MacroItem has. @@ -109,7 +109,7 @@ namespace KoMacro { } MacroItem::MacroItem() - : KShared() + : TDEShared() , d( new Private() ) { } @@ -129,29 +129,29 @@ void MacroItem::setComment(const TQString& comment) d->comment = comment; } -KSharedPtr<Action> MacroItem::action() const +TDESharedPtr<Action> MacroItem::action() const { return d->action; } -void MacroItem::setAction(KSharedPtr<Action> action) +void MacroItem::setAction(TDESharedPtr<Action> action) { d->action = action; } TQVariant MacroItem::variant(const TQString& name, bool checkaction) const { - KSharedPtr<Variable> v = variable(name, checkaction); + TDESharedPtr<Variable> v = variable(name, checkaction); return v.data() ? v->variant() : TQVariant(); } -KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const +TDESharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const { if(d->variables.contains(name)) return d->variables[name]; if(checkaction && d->action.data()) return d->action->variable(name); - return KSharedPtr<Variable>(0); + return TDESharedPtr<Variable>(0); } Variable::Map MacroItem::variables() const @@ -163,7 +163,7 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) { // Let's look if there is an action defined for the variable. If that's // the case, we try to use that action to preserve the type of the variant. - KSharedPtr<Variable> actionvariable = d->action ? d->action->variable(name) : KSharedPtr<Variable>(0); + TDESharedPtr<Variable> actionvariable = d->action ? d->action->variable(name) : TDESharedPtr<Variable>(0); // If we know the expected type, we try to cast the variant to the expected // type else the variant stays untouched (so, it will stay a string). @@ -172,12 +172,12 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) : variant; // don't cast anything, just leave the string-type... // Now let's try to determinate the variable which should be changed. - KSharedPtr<Variable> variable = d->variables[name]; + TDESharedPtr<Variable> variable = d->variables[name]; if(! variable.data()) { // if there exists no such variable yet, create one. kdDebug() << "MacroItem::setVariable() Creating new variable name=" << name << endl; - variable = KSharedPtr<Variable>( new Variable() ); + variable = TDESharedPtr<Variable>( new Variable() ); variable->setName(name); d->variables.replace(name, variable); } @@ -201,11 +201,11 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) return true; } -KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant) +TDESharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant) { Q_ASSERT(! d->variables.contains(name) ); // Create a new Variable. - KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() ); + TDESharedPtr<Variable> variable = TDESharedPtr<Variable>( new Variable() ); variable->setName(name); // Put it into the Variable-map. diff --git a/kexi/plugins/macros/lib/macroitem.h b/kexi/plugins/macros/lib/macroitem.h index 6b996e70..210a9585 100644 --- a/kexi/plugins/macros/lib/macroitem.h +++ b/kexi/plugins/macros/lib/macroitem.h @@ -43,7 +43,7 @@ namespace KoMacro { * MacroItem choosen @a Action implementation) and holds the by the * user defined modifications like e.g. the comment on the other hand. */ - class KOMACRO_EXPORT MacroItem : public KShared + class KOMACRO_EXPORT MacroItem : public TDEShared { public: @@ -51,7 +51,7 @@ namespace KoMacro { /** * A list of \a MacroItem instances. */ - typedef TQValueList<KSharedPtr<MacroItem > > List; + typedef TQValueList<TDESharedPtr<MacroItem > > List; /** * Constructor. @@ -81,12 +81,12 @@ namespace KoMacro { * no @a Action defined yet else the returned * @a Action will be used to implement the execution. */ - KSharedPtr<Action> action() const; + TDESharedPtr<Action> action() const; /** * Set the @a Action @param action this @a MacroItem points to. */ - void setAction(KSharedPtr<Action> action); + void setAction(TDESharedPtr<Action> action); /** * @return @a Variant from the @a Variable identified with @@ -110,12 +110,12 @@ namespace KoMacro { * such a @param name in the case this @a MacroItem * doesn't have such a name. */ - KSharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const; + TDESharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const; /** * @return a map of @a Variable instances. */ - TQMap<TQString, KSharedPtr<Variable> > variables() const; + TQMap<TQString, TDESharedPtr<Variable> > variables() const; /** * Set the @a TQVariant @param variant as variable with the variablename @@ -128,7 +128,7 @@ namespace KoMacro { * Add a new variable with the vaiablename @param name and the given * @a TQVariant @param variant to our @a MacroItem instance. */ - KSharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant); + TDESharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp index f73ddaa8..5ab431d5 100644 --- a/kexi/plugins/macros/lib/manager.cpp +++ b/kexi/plugins/macros/lib/manager.cpp @@ -41,10 +41,10 @@ namespace KoMacro { { public: KXMLGUIClient* const xmlguiclient; - TQMap<TQString, KSharedPtr<Macro > > macros; + TQMap<TQString, TDESharedPtr<Macro > > macros; TQStringList actionnames; - TQMap<TQString, KSharedPtr<Action> > actions; + TQMap<TQString, TDESharedPtr<Action> > actions; TQMap<TQString, TQGuardedPtr<TQObject> > objects; @@ -108,12 +108,12 @@ bool Manager::hasMacro(const TQString& macroname) return d->macros.contains(macroname); } -KSharedPtr<Macro> Manager::getMacro(const TQString& macroname) +TDESharedPtr<Macro> Manager::getMacro(const TQString& macroname) { return d->macros[macroname]; } -void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro) +void Manager::addMacro(const TQString& macroname, TDESharedPtr<Macro> macro) { d->macros.replace(macroname, macro); } @@ -123,13 +123,13 @@ void Manager::removeMacro(const TQString& macroname) d->macros.remove(macroname); } -KSharedPtr<Macro> Manager::createMacro(const TQString& macroname) +TDESharedPtr<Macro> Manager::createMacro(const TQString& macroname) { - KSharedPtr<Macro> macro = KSharedPtr<Macro>( new Macro(macroname) ); + TDESharedPtr<Macro> macro = TDESharedPtr<Macro>( new Macro(macroname) ); return macro; } -KSharedPtr<Action> Manager::action(const TQString& name) const +TDESharedPtr<Action> Manager::action(const TQString& name) const { return d->actions[name]; } @@ -144,7 +144,7 @@ TQStringList Manager::actionNames() const return d->actionnames; } -void Manager::publishAction(KSharedPtr<Action> action) +void Manager::publishAction(TDESharedPtr<Action> action) { const TQString name = action->name(); if(! d->actions.contains(name)) { diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h index 733ffb75..5e3ce084 100644 --- a/kexi/plugins/macros/lib/manager.h +++ b/kexi/plugins/macros/lib/manager.h @@ -122,7 +122,7 @@ namespace KoMacro { * \return the \a Macro defined with \p macroname * or NULL if we don't have such a \a Macro. */ - KSharedPtr<Macro> getMacro(const TQString& macroname); + TDESharedPtr<Macro> getMacro(const TQString& macroname); /** * Add a new \a Macro to the list of known macros. If @@ -134,7 +134,7 @@ namespace KoMacro { * accessible as. * \param macro The \a Macro instance. */ - void addMacro(const TQString& macroname, KSharedPtr<Macro> macro); + void addMacro(const TQString& macroname, TDESharedPtr<Macro> macro); /** * Remove the \a Macro defined with \p macroname . If @@ -150,7 +150,7 @@ namespace KoMacro { * like to attach the returned new \a Macro to this * \a Manager instance. */ - KSharedPtr<Macro> createMacro(const TQString& macroname); + TDESharedPtr<Macro> createMacro(const TQString& macroname); #if 0 /** @@ -164,20 +164,20 @@ namespace KoMacro { * * @deprecated Moved to common XMLReader/XMLWriter classes. Use Macro::xmlHandler() ! */ - KSharedPtr<Action> createAction(const TQDomElement& element); + TDESharedPtr<Action> createAction(const TQDomElement& element); #endif /** * @return the @a Action which was published under the - * name @p name or returns an empty @a KSharedPtr<Action> object + * name @p name or returns an empty @a TDESharedPtr<Action> object * if there was no such @a Action published. */ - KSharedPtr<Action> action(const TQString& name) const; + TDESharedPtr<Action> action(const TQString& name) const; /** * @return a map of all published actions. */ - TQMap<TQString, KSharedPtr<Action> > actions() const; + TQMap<TQString, TDESharedPtr<Action> > actions() const; /** * @return a list of all published actions. @@ -188,7 +188,7 @@ namespace KoMacro { * Publish the @a Action @p action . The published @a Action * will be accessible via it's unique name. */ - void publishAction(KSharedPtr<Action> action); + void publishAction(TDESharedPtr<Action> action); /** * Publish the passed TQObject @p object. Those object will diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp index 18839780..6642c706 100644 --- a/kexi/plugins/macros/lib/metamethod.cpp +++ b/kexi/plugins/macros/lib/metamethod.cpp @@ -70,7 +70,7 @@ namespace KoMacro { * if this @a MetaMethod doesn't belong to any @a MetaObject * yet. */ - KSharedPtr<MetaObject> object; + TDESharedPtr<MetaObject> object; /** * The @a MetaMethod::Type this method provides access @@ -81,8 +81,8 @@ namespace KoMacro { } -MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObject> object) - : KShared() +MetaMethod::MetaMethod(const TQString& signature, Type type, TDESharedPtr<MetaObject> object) + : TDEShared() , d( new Private() ) // create the private d-pointer instance. { d->signature = signature; @@ -135,7 +135,7 @@ MetaMethod::~MetaMethod() delete d; } -KSharedPtr<MetaObject> const MetaMethod::object() const +TDESharedPtr<MetaObject> const MetaMethod::object() const { return d->object; } @@ -180,8 +180,8 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) uo[0] = TQUObject(); // empty placeholder for the returnvalue. for(uint i = 0; i < argsize; i++) { - KSharedPtr<MetaParameter> metaargument = d->arguments[i]; - KSharedPtr<Variable> variable = arguments[i + 1]; + TDESharedPtr<MetaParameter> metaargument = d->arguments[i]; + TDESharedPtr<Variable> variable = arguments[i + 1]; if ( !variable ) { throw Exception(TQString("Variable is undefined !")); @@ -254,7 +254,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) return uo; } -KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) +TDESharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) { const TQString desc( uo->type->desc() ); @@ -303,16 +303,16 @@ Variable::List MetaMethod::toVariableList(TQUObject* uo) return list; } -KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments) +TDESharedPtr<Variable> MetaMethod::invoke(Variable::List arguments) { - kdDebug() << "KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)" << endl; + kdDebug() << "TDESharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)" << endl; if(! d->object) { throw Exception("MetaObject is undefined."); } TQObject* obj = d->object->object(); - KSharedPtr<Variable> returnvalue; + TDESharedPtr<Variable> returnvalue; TQUObject* qu = 0; try { diff --git a/kexi/plugins/macros/lib/metamethod.h b/kexi/plugins/macros/lib/metamethod.h index daf7dfcb..8be7b556 100644 --- a/kexi/plugins/macros/lib/metamethod.h +++ b/kexi/plugins/macros/lib/metamethod.h @@ -43,7 +43,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaMethod : public KShared + class KOMACRO_EXPORT MetaMethod : public TDEShared { public: @@ -69,7 +69,7 @@ namespace KoMacro { * belongs to. Each @a MethodMethod is associated with * exactly one @a MetaObject . */ - explicit MetaMethod(const TQString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0); + explicit MetaMethod(const TQString& signature, Type type = Unknown, TDESharedPtr<MetaObject> object = 0); /** * Destructor. @@ -80,7 +80,7 @@ namespace KoMacro { * @return the @a MetaObject instance this @a MethodMethod * belongs to. */ - KSharedPtr<MetaObject> const object() const; + TDESharedPtr<MetaObject> const object() const; /** * @return the signature this @a MetaMethod has. It could @@ -112,31 +112,31 @@ namespace KoMacro { * @return the signature arguments as parsed list of * @a MetaParameter instances. */ - TQValueList< KSharedPtr<MetaParameter> > arguments() const; + TQValueList< TDESharedPtr<MetaParameter> > arguments() const; /** * Translate the passed @p arguments list of @a Variable instances * into a TQt3 TQUObject* array. */ - TQUObject* toTQUObject(TQValueList< KSharedPtr<Variable> > arguments); + TQUObject* toTQUObject(TQValueList< TDESharedPtr<Variable> > arguments); /** * Translate the passed @p uo TQUObject reference into an internal used * @a Variable instances. */ - KSharedPtr<Variable> toVariable(TQUObject* uo); + TDESharedPtr<Variable> toVariable(TQUObject* uo); /** * Translate the passed @p uo TQUObject array into an internal used * list of @a Variable instances. */ - TQValueList< KSharedPtr<Variable> > toVariableList(TQUObject* uo); + TQValueList< TDESharedPtr<Variable> > toVariableList(TQUObject* uo); /** * Invoke the @a MetaMethod with the optional arguments * @p arguments and return a variable. */ - KSharedPtr<Variable> invoke(TQValueList< KSharedPtr<Variable> > arguments); + TDESharedPtr<Variable> invoke(TQValueList< TDESharedPtr<Variable> > arguments); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index ee865c82..deaf4974 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -56,7 +56,7 @@ namespace KoMacro { } MetaObject::MetaObject(TQObject* const object) - : KShared() + : TDEShared() , d( new Private(object) ) // create the private d-pointer instance. { } @@ -106,7 +106,7 @@ int MetaObject::indexOfSlot(const char* slot) const return slotid; } -KSharedPtr<MetaMethod> MetaObject::method(int index) +TDESharedPtr<MetaMethod> MetaObject::method(int index) { TQObject* obj = object(); MetaMethod::Type type = MetaMethod::Slot; @@ -131,20 +131,20 @@ KSharedPtr<MetaMethod> MetaObject::method(int index) return new MetaMethod(metadata->name, type, this); } -KSharedPtr<MetaMethod> MetaObject::signal(const char* signal) +TDESharedPtr<MetaMethod> MetaObject::signal(const char* signal) { return method( indexOfSignal(signal) ); } -KSharedPtr<MetaMethod> MetaObject::slot(const char* slot) +TDESharedPtr<MetaMethod> MetaObject::slot(const char* slot) { return method( indexOfSlot(slot) ); } -KSharedPtr<Variable> MetaObject::invokeMethod(int index, Variable::List arguments) +TDESharedPtr<Variable> MetaObject::invokeMethod(int index, Variable::List arguments) { // kdDebug() << "MetaObject::invokeMethod(int index, Variable::List arguments)" << endl; - KSharedPtr<MetaMethod> m = method(index); + TDESharedPtr<MetaMethod> m = method(index); // kdDebug() << "MetaObject::invokeMethod(int index, Variable::List arguments) return" << endl; return m->invoke(arguments); } diff --git a/kexi/plugins/macros/lib/metaobject.h b/kexi/plugins/macros/lib/metaobject.h index a1a52562..e3ae98a1 100644 --- a/kexi/plugins/macros/lib/metaobject.h +++ b/kexi/plugins/macros/lib/metaobject.h @@ -38,7 +38,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaObject : public KShared + class KOMACRO_EXPORT MetaObject : public TDEShared { public: @@ -78,19 +78,19 @@ namespace KoMacro { * @return the @a MetaMethod that matches to the * index @p index . */ - KSharedPtr<MetaMethod> method(int index); + TDESharedPtr<MetaMethod> method(int index); /** * @return a @a MetaMethod for the signal @p signal . */ - KSharedPtr<MetaMethod> signal(const char* signal); + TDESharedPtr<MetaMethod> signal(const char* signal); /** * @return a @a MetaMethod for the slot @p slot . */ - KSharedPtr<MetaMethod> slot(const char* slot); + TDESharedPtr<MetaMethod> slot(const char* slot); -//KSharedPtr<MetaMethod> addSlot(const char* slot); +//TDESharedPtr<MetaMethod> addSlot(const char* slot); //void connectSignal(TQObject* obj, const char* signal); /** @@ -104,7 +104,7 @@ namespace KoMacro { * @return The returnvalue the method provides and that got * returned if the execution is done. */ - KSharedPtr<Variable> invokeMethod(int index, TQValueList< KSharedPtr<Variable> > arguments); + TDESharedPtr<Variable> invokeMethod(int index, TQValueList< TDESharedPtr<Variable> > arguments); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/metaparameter.cpp b/kexi/plugins/macros/lib/metaparameter.cpp index ed921cfe..68a48fc1 100644 --- a/kexi/plugins/macros/lib/metaparameter.cpp +++ b/kexi/plugins/macros/lib/metaparameter.cpp @@ -58,7 +58,7 @@ namespace KoMacro { } MetaParameter::MetaParameter(const TQString& signatureargument) - : KShared() + : TDEShared() , d( new Private() ) // create the private d-pointer instance. { d->type = TypeNone; @@ -137,7 +137,7 @@ void MetaParameter::setSignatureArgument(const TQString& signatureargument) } } -bool MetaParameter::validVariable(KSharedPtr<Variable> variable) const +bool MetaParameter::validVariable(TDESharedPtr<Variable> variable) const { if( type() != variable->type() ) { return false; diff --git a/kexi/plugins/macros/lib/metaparameter.h b/kexi/plugins/macros/lib/metaparameter.h index fa9df552..ec927c53 100644 --- a/kexi/plugins/macros/lib/metaparameter.h +++ b/kexi/plugins/macros/lib/metaparameter.h @@ -39,7 +39,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaParameter : public KShared + class KOMACRO_EXPORT MetaParameter : public TDEShared { /** @@ -57,7 +57,7 @@ namespace KoMacro { /** * List of @a MetaParameter instances. */ - typedef TQValueList<KSharedPtr <MetaParameter > > List; + typedef TQValueList<TDESharedPtr <MetaParameter > > List; /** * Constructor. @@ -114,7 +114,7 @@ namespace KoMacro { * valid for this @a MetaParameter . Valid means, that * the variable has a castable type. */ - bool validVariable(KSharedPtr<Variable> variable) const; + bool validVariable(TDESharedPtr<Variable> variable) const; protected: diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp index 3661ef9a..61e349df 100644 --- a/kexi/plugins/macros/lib/variable.cpp +++ b/kexi/plugins/macros/lib/variable.cpp @@ -218,7 +218,7 @@ Variable::List Variable::children() const return d->children; } -void Variable::appendChild(KSharedPtr<Variable> variable) +void Variable::appendChild(TDESharedPtr<Variable> variable) { d->children.append(variable); } diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h index 14adf09c..cb7334aa 100644 --- a/kexi/plugins/macros/lib/variable.h +++ b/kexi/plugins/macros/lib/variable.h @@ -32,7 +32,7 @@ namespace KoMacro { /** * A variable value used to provide abstract access to variables. The * class handles TQVariant and TQObject and provides access to them. - * Variable inherits KShared and implements reference couting. So, it's + * Variable inherits TDEShared and implements reference couting. So, it's * not needed to take care of memory-managment. */ class KOMACRO_EXPORT Variable : public MetaParameter @@ -58,12 +58,12 @@ namespace KoMacro { /** * A list of variables. */ - typedef TQValueList<KSharedPtr<Variable > > List; + typedef TQValueList<TDESharedPtr<Variable > > List; /** * A map of variables. */ - typedef TQMap<TQString, KSharedPtr<Variable > > Map; + typedef TQMap<TQString, TDESharedPtr<Variable > > Map; /** * Default constructor. @@ -185,7 +185,7 @@ namespace KoMacro { * Append a @a Variable to the list of children this * @a Variable has. */ - void appendChild(KSharedPtr<Variable> variable); + void appendChild(TDESharedPtr<Variable> variable); /** * Clear the list of children this @a Variable has. diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp index 5b53d51b..65f1a4cf 100644 --- a/kexi/plugins/macros/lib/xmlhandler.cpp +++ b/kexi/plugins/macros/lib/xmlhandler.cpp @@ -99,7 +99,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) const TQDomElement itemelem = itemnode.toElement(); // Create a new MacroItem - KSharedPtr<MacroItem> item = new MacroItem(); + TDESharedPtr<MacroItem> item = new MacroItem(); // Add the new item to our Macro. d->macro->addItem( item ); @@ -107,7 +107,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // Each MacroItem may point to an Action instance. We // try to determinate this action now and if it's defined // and available, we set it. - KSharedPtr<Action> action = Manager::self()->action( itemelem.attribute("action") ); + TDESharedPtr<Action> action = Manager::self()->action( itemelem.attribute("action") ); if(action.data()) { item->setAction(action); } @@ -157,14 +157,14 @@ TQDomElement XMLHandler::toXML() //macroelem.setAttribute("name",d->macro->name()); // The list of MacroItem-children a Macro provides. - TQValueList<KSharedPtr<MacroItem > > items = d->macro->items(); + TQValueList<TDESharedPtr<MacroItem > > items = d->macro->items(); // Create an iterator... - TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); + TQValueList<TDESharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); // ...and iterate over the list of children the Macro provides. for(;it != end; ++it) { // We are iterating over MacroItem instances. - KSharedPtr<MacroItem> item = *it; + TDESharedPtr<MacroItem> item = *it; // Flag to determinate if we really need to remember this item what // is only the case if comment or action is defined. @@ -174,7 +174,7 @@ TQDomElement XMLHandler::toXML() TQDomElement itemelem = document.createElement("item"); // Each MacroItem could point to an Action provided by the Manager. - const KSharedPtr<Action> action = item->action(); + const TDESharedPtr<Action> action = item->action(); if( action ) { append = true; @@ -184,10 +184,10 @@ TQDomElement XMLHandler::toXML() // Each MacroItem could have a list of variables. We // iterate through that list and build a element // for each single variable. - TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables(); + TQMap<TQString, TDESharedPtr<Variable > > varmap = item->variables(); - for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) { - const KSharedPtr<Variable> v = vit.data(); + for(TQMap<TQString, TDESharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) { + const TDESharedPtr<Variable> v = vit.data(); if(! v.data()) { // skip if the variable is NULL. continue; diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp index 26e38b32..912d9ff3 100644 --- a/kexi/plugins/macros/tests/actiontests.cpp +++ b/kexi/plugins/macros/tests/actiontests.cpp @@ -73,11 +73,11 @@ namespace KoMacroTest { TQDomDocument* doomdocument; - KSharedPtr<KoMacro::Macro> macro; + TDESharedPtr<KoMacro::Macro> macro; - TQValueList< KSharedPtr<KoMacro::MacroItem> > items; + TQValueList< TDESharedPtr<KoMacro::MacroItem> > items; - KSharedPtr<KoMacro::Action> actionptr; + TDESharedPtr<KoMacro::Action> actionptr; Private() : xmlguiclient(0) @@ -90,7 +90,7 @@ namespace KoMacroTest { }; } -typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype; +typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype; ActionTests::ActionTests() @@ -147,7 +147,7 @@ void ActionTests::testMacro() kdDebug()<<"===================== testMacro() ======================" << endl; //fetch Items and .. - //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + //TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); //... check that there is one KOMACROTEST_XASSERT( d->items.count(), sizetype(0) ); @@ -158,7 +158,7 @@ void ActionTests::testAction() kdDebug()<<"===================== testAction() ======================" << endl; //get it - //KSharedPtr<KoMacro::Action> actionptr = d->items[0]->action(); + //TDESharedPtr<KoMacro::Action> actionptr = d->items[0]->action(); //-> check that it is not null KOMACROTEST_XASSERT(sizetype(d->actionptr.data()), sizetype(0)); } @@ -167,7 +167,7 @@ void ActionTests::testText() { kdDebug()<<"===================== testText() ======================" << endl; - //KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); const TQString leetSpeech = "']['3 $']['"; @@ -184,7 +184,7 @@ void ActionTests::testName() { kdDebug()<<"===================== testName() ======================" << endl; - //KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //check name KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction")); @@ -198,7 +198,7 @@ void ActionTests::testComment() { kdDebug()<<"===================== testComment() ======================" << endl; - //KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //check comment KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!")); diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp index 41234eca..9d43ac41 100644 --- a/kexi/plugins/macros/tests/commontests.cpp +++ b/kexi/plugins/macros/tests/commontests.cpp @@ -94,7 +94,7 @@ namespace KoMacroTest { } -typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype; +typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype; CommonTests::CommonTests() : KUnitTest::SlotTester() @@ -164,7 +164,7 @@ void CommonTests::testAction() TQDomElement const domelement = d->doomdocument->documentElement(); - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); //Is our XML parseable ? KOMACROTEST_ASSERT(macro->parseXML(domelement),true); @@ -172,19 +172,19 @@ void CommonTests::testAction() //?? macro->execute(this); - //create list of KSharedPtr from the childs of the macro - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items(); + //create list of TDESharedPtr from the childs of the macro + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = macro->items(); //check that there is one KOMACROTEST_ASSERT( items.count(), sizetype(1) ); //fetch the first one - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //How do we know that an action exist ? //-> check that it is not null KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0)); //fetch the "teststring"-variable - KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable("teststring"); + TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable("teststring"); //check that it is not null KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0)); //check that it is " " @@ -249,7 +249,7 @@ void CommonTests::testAction() //commontests.cpp: In member function 'void KoMacroTest::CommonTests::testAction()': //commontests.cpp:249: error: call of overloaded 'setVariable(const char [8], int)' is ambiguous - //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>) + //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, TDESharedPtr<KoMacro::Variable>) //../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&) macroitem->setVariable("testint",(int) 0); @@ -285,7 +285,7 @@ void CommonTests::testXmlhandler() kdDebug()<<"===================== testXmlhandler() ======================" << endl; // Local Init - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomElement domelement; // Save old doomdocument @@ -428,9 +428,9 @@ void CommonTests::testFunction() "</function>" )); - //create an KomacroFunction with our data, and put it into a KSharedPtr - KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); - //cast KSharedPtr to KoMacro-"Function" + //create an KomacroFunction with our data, and put it into a TDESharedPtr + TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //cast TDESharedPtr to KoMacro-"Function" KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() ); //check that function is not null KOMACROTEST_XASSERT((int) func, 0); @@ -449,12 +449,12 @@ void CommonTests::testFunction() KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") ); //create KoMacro-MetaObject from receiverObject - KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject(); + TDESharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject(); //check that receivermetaobject.data is not null KOMACROTEST_XASSERT((int) receivermetaobject.data(), 0); //create KoMacro-MetaMethod from receiverObject - KSharedPtr<KoMacro::MetaMethod> receivermetamethod = receivermetaobject->slot( func->slot().latin1() ); + TDESharedPtr<KoMacro::MetaMethod> receivermetamethod = receivermetaobject->slot( func->slot().latin1() ); //check that receivermetamethod.data is not null KOMACROTEST_XASSERT((int) receivermetamethod.data(), 0); @@ -469,7 +469,7 @@ void CommonTests::testFunction() // firstrun we have a TQString, secondrun we have an int switch(i) { case 0: { // returnvalue - KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL)); + KOMACROTEST_ASSERT(*it, TDESharedPtr<KoMacro::Variable>(NULL)); } break; case 1: { // first parameter //check first variable of func is the same as argument1 @@ -491,10 +491,10 @@ void CommonTests::testFunction() KOMACROTEST_ASSERT( funcvariables.count(), uint(3) ); // check that the first argument (the returnvalue) is empty - KOMACROTEST_ASSERT( funcvariables[0], KSharedPtr<KoMacro::Variable>(NULL) ); + KOMACROTEST_ASSERT( funcvariables[0], TDESharedPtr<KoMacro::Variable>(NULL) ); //create a KoMacro-Variable-Ptr from first func argument - KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1]; + TDESharedPtr<KoMacro::Variable> stringvar = funcvariables[1]; //check that it is not null KOMACROTEST_XASSERT((int) stringvar.data(),0); //check via TQVariant type that stringvar is from Type Variant @@ -505,7 +505,7 @@ void CommonTests::testFunction() KOMACROTEST_ASSERT( stringvar->toString(), argument1 ); //create a KoMacro-Variable-Ptr from second func argument - KSharedPtr<KoMacro::Variable> intvar = funcvariables[2]; + TDESharedPtr<KoMacro::Variable> intvar = funcvariables[2]; //check that it is not null KOMACROTEST_XASSERT((int) intvar.data(), 0); //check via TQVariant type that stringvar is from Type Variant @@ -516,7 +516,7 @@ void CommonTests::testFunction() KOMACROTEST_ASSERT( intvar->toInt(), argument2 ); //returnvalue see testobject .... - KSharedPtr<KoMacro::Variable> funcreturnvalue = receivermetamethod->invoke( funcvariables ); + TDESharedPtr<KoMacro::Variable> funcreturnvalue = receivermetamethod->invoke( funcvariables ); kdDebug() << "CommonTests::testFunction() RETURNVALUE =====> " << funcreturnvalue->toString() << endl; KOMACROTEST_ASSERT( funcreturnvalue->toInt(), argument2 ); @@ -543,8 +543,8 @@ void CommonTests::testIntFunction() "</function>" )); - //create an KomacroFunction with our data, and put it into a KSharedPtr - KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //create an KomacroFunction with our data, and put it into a TDESharedPtr + TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //Cast data to function KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() ); //check that it is not null @@ -573,8 +573,8 @@ void CommonTests::testDoubleFunction() "</function>" )); - //create an KomacroFunction with our data, and put it into a KSharedPtr - KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //create an KomacroFunction with our data, and put it into a TDESharedPtr + TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //Cast data to function KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() ); //check that it is not null @@ -602,8 +602,8 @@ void CommonTests::testTQStringFunction() "</function>" )); - //create an KomacroFunction with our data, and put it into a KSharedPtr - KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //create an KomacroFunction with our data, and put it into a TDESharedPtr + TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //Cast data to function KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() ); //check that it is not null @@ -621,7 +621,7 @@ void CommonTests::testMacro() TQDomElement const domelement = d->doomdocument->documentElement(); - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); //Is our XML parseable ? KOMACROTEST_ASSERT(macro->parseXML(domelement),true); @@ -639,7 +639,7 @@ void CommonTests::testMacro() // )); // // //create Macro -// // KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); +// // TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); // //cast data to Macro // KoMacro::Macro* macro = dynamic_cast<KoMacro::Macro*>( macroptr.data() ); //check that it is not null @@ -661,11 +661,11 @@ void CommonTests::testMacro() */ //create list of KsharedPtr from the childs of the macro - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = macro->items(); //check that there is one KOMACROTEST_ASSERT( items.count(), sizetype(1) ); //fetch the first one - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //How do we know that an action exist ? //-> check that it is not null KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0)); @@ -677,7 +677,7 @@ void CommonTests::testMacro() // KOMACROTEST_ASSERT( actionptr->comment(), TQString("") ); /* //fetch the second one - KSharedPtr<KoMacro::Action> myfuncptr = children[1]; + TDESharedPtr<KoMacro::Action> myfuncptr = children[1]; //cast it to function KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() ); @@ -700,12 +700,12 @@ void CommonTests::testMacro() myfunc->activate(); */ //create another macro - KSharedPtr<KoMacro::Macro> yanMacro = KoMacro::Manager::self()->createMacro("testMacro2"); + TDESharedPtr<KoMacro::Macro> yanMacro = KoMacro::Manager::self()->createMacro("testMacro2"); KOMACROTEST_ASSERT(yanMacro->parseXML(domelement),true); //create two more macros - //KSharedPtr<KoMacro::Action> yanActionptr2 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); - //KSharedPtr<KoMacro::Action> yanActionptr3 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //TDESharedPtr<KoMacro::Action> yanActionptr2 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + //TDESharedPtr<KoMacro::Action> yanActionptr3 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //check that they aren?t null KOMACROTEST_XASSERT(sizetype(yanMacro.data()), sizetype(0)); @@ -713,7 +713,7 @@ void CommonTests::testMacro() //KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0); //create a list of the children from yanMacro - //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children(); + //TQValueList< TDESharedPtr<KoMacro::Action> > yanChildren = yanMacro->children(); //check that there are two //KOMACROTEST_ASSERT(yanChildren.count(), uint(2)); /* @@ -769,7 +769,7 @@ void CommonTests::testDom() { "</function>" )); //create functiom - KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //try to execute function and catch exception KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate()); @@ -853,21 +853,21 @@ void CommonTests::testVariables() )); //create an macro - KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); + TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ); //cast data to macro KoMacro::Macro* macro = dynamic_cast<KoMacro::Macro*>( macroptr.data() ); //check that it is not null KOMACROTEST_XASSERT((int) macro, 0); //create a list of its children - TQValueList< KSharedPtr<KoMacro::Action> > children = macro->children(); + TQValueList< TDESharedPtr<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]; + TDESharedPtr<KoMacro::Action> func1ptr = children[1]; //create new context - KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr); + TDESharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr); { //try to execute function with non-functional variable @@ -882,7 +882,7 @@ void CommonTests::testVariables() //execute function func1ptr->activate(context); //fetch return value - KSharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable"); + TDESharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable"); //check that it is not null KOMACROTEST_XASSERT( (int) returnvariable.data(), 0); //check that it is "Some String" @@ -895,7 +895,7 @@ void CommonTests::testVariables() //execute function func1ptr->activate(context); //fetch return value - KSharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable"); + TDESharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable"); //check that it is not null KOMACROTEST_XASSERT( (int) returnvariable.data(), 0); //check that it is 12345 diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp index 0ac780b0..044808d7 100644 --- a/kexi/plugins/macros/tests/macroitemtests.cpp +++ b/kexi/plugins/macros/tests/macroitemtests.cpp @@ -71,7 +71,7 @@ namespace KoMacroTest { TQDomDocument* doomdocument; - KSharedPtr<KoMacro::Macro> macro; + TDESharedPtr<KoMacro::Macro> macro; Private() : xmlguiclient(0) @@ -83,7 +83,7 @@ namespace KoMacroTest { }; } -typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype; +typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype; MacroitemTests::MacroitemTests() : KUnitTest::SlotTester() @@ -136,7 +136,7 @@ void MacroitemTests::testMacro() kdDebug()<<"===================== testMacro() ======================" << endl; //fetch Items and .. - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); //... check that there is one KOMACROTEST_XASSERT( items.count(), sizetype(0) ); @@ -148,9 +148,9 @@ void MacroitemTests::testMacroItemString() kdDebug()<<"===================== testMacroItemString() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); - KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING); //create new macroitem for testing KoMacro::MacroItem* macroitem = new KoMacro::MacroItem(); @@ -185,8 +185,8 @@ void MacroitemTests::testMacroItemInt() kdDebug()<<"===================== testMacroItemInt() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //create new macroitem for testing KoMacro::MacroItem* macroitem = new KoMacro::MacroItem(); @@ -195,7 +195,7 @@ void MacroitemTests::testMacroItemInt() items.append(macroitem); macroitem->setVariable(TESTINT,INT_MIN); - KSharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTINT); + TDESharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTINT); KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0)); KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(INT_MIN)); @@ -226,8 +226,8 @@ void MacroitemTests::testMacroItemBool() kdDebug()<<"===================== testMacroItemBool() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //create new macroitem for testing KoMacro::MacroItem* macroitem = new KoMacro::MacroItem(); @@ -236,7 +236,7 @@ void MacroitemTests::testMacroItemBool() items.append(macroitem); macroitem->setVariable(TESTBOOL,"false"); - KSharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTBOOL); + TDESharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTBOOL); KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0)); KOMACROTEST_ASSERT(variableptr->variant().toBool(),false); } diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp index d5d2c2af..7a5f30d0 100644 --- a/kexi/plugins/macros/tests/macrotests.cpp +++ b/kexi/plugins/macros/tests/macrotests.cpp @@ -83,7 +83,7 @@ namespace KoMacroTest { }; } -typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype; +typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype; MacroTests::MacroTests() @@ -136,8 +136,8 @@ void MacroTests::testMacro() TQDomElement const domelement = d->doomdocument->documentElement(); - KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro"); - KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro"); //Is our XML parseable ? KOMACROTEST_ASSERT(macro1->parseXML(domelement),true); KOMACROTEST_ASSERT(macro2->parseXML(domelement),true); @@ -150,8 +150,8 @@ void MacroTests::testMacro() KOMACROTEST_ASSERT(macro1->name(), macro2->name() ); //create list of KsharedPtr from the childs of the macro - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items(); - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items1 = macro1->items(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items2 = macro2->items(); //check that there is one KOMACROTEST_XASSERT( items1.count(), sizetype(0) ); @@ -174,7 +174,7 @@ void MacroTests::testMacro() } //fetch the first one - KSharedPtr<KoMacro::Action> actionptr = items1[0]->action(); + TDESharedPtr<KoMacro::Action> actionptr = items1[0]->action(); //check that it is not null KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0)); //check that it has the right name diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp index 845acd5f..4e7bb67b 100644 --- a/kexi/plugins/macros/tests/testaction.cpp +++ b/kexi/plugins/macros/tests/testaction.cpp @@ -43,16 +43,16 @@ TestAction::~TestAction() { } -bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) +bool TestAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { Q_UNUSED(macroitem); Q_UNUSED(name); return true; } -void TestAction::activate(KSharedPtr<KoMacro::Context> context) +void TestAction::activate(TDESharedPtr<KoMacro::Context> context) { - kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl; + kdDebug() << "TestAction::activate(TDESharedPtr<Context>)" << endl; const TQString teststring = context->variable("teststring")->variant().toString(); const int testint = context->variable("testint")->variant().toInt(); const bool testbool = context->variable("testbool")->variant().toBool(); diff --git a/kexi/plugins/macros/tests/testaction.h b/kexi/plugins/macros/tests/testaction.h index 43ce74bb..bb41e5fb 100644 --- a/kexi/plugins/macros/tests/testaction.h +++ b/kexi/plugins/macros/tests/testaction.h @@ -63,7 +63,7 @@ namespace KoMacroTest { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); + virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name); public slots: @@ -71,7 +71,7 @@ namespace KoMacroTest { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<KoMacro::Context> context); + virtual void activate(TDESharedPtr<KoMacro::Context> context); }; } diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp index c9724639..4efe3953 100644 --- a/kexi/plugins/macros/tests/variabletests.cpp +++ b/kexi/plugins/macros/tests/variabletests.cpp @@ -73,7 +73,7 @@ namespace KoMacroTest { TQDomDocument* doomdocument; - KSharedPtr<KoMacro::Macro> macro; + TDESharedPtr<KoMacro::Macro> macro; Private() : xmlguiclient(0) @@ -85,7 +85,7 @@ namespace KoMacroTest { }; } -typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype; +typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype; /****************************************************************************** * This is an xtra big TODO: @@ -144,7 +144,7 @@ void VariableTests::testMacro() kdDebug()<<"===================== testMacro() ======================" << endl; //fetch Items and .. - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); //... check that there is one KOMACROTEST_XASSERT( items.count(), sizetype(0) ); @@ -152,11 +152,11 @@ void VariableTests::testMacro() void VariableTests::testVariableString() { kdDebug()<<"===================== testVariableString() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //fetch the "teststring"-variable - KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING); + TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING); //So there is a variable, does hasVariable() work ? KOMACROTEST_ASSERT(actionptr->hasVariable(TESTSTRING),true); //check count of variables @@ -185,11 +185,11 @@ void VariableTests::testVariableString() { void VariableTests::testVariableInt() { kdDebug()<<"===================== testVariableInt() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //fetch the "testint"-variable - KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTINT); + TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTINT); //check that it is not null KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0)); //check that it is 0 @@ -218,11 +218,11 @@ void VariableTests::testVariableInt() { void VariableTests::testVariableBool() { kdDebug()<<"===================== testVariableBool() ======================" << endl; - TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); - KSharedPtr<KoMacro::Action> actionptr = items[0]->action(); + TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items(); + TDESharedPtr<KoMacro::Action> actionptr = items[0]->action(); //fetch the "testbool"-variable - KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTBOOL); + TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTBOOL); //check that it is not null KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0)); //check that it is " " diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp index 9627a00b..971c85db 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp @@ -61,7 +61,7 @@ namespace KoMacroTest { * handling and communication with from TQObject * inheritated instances. */ - KSharedPtr<KoMacro::Action> testaction; + TDESharedPtr<KoMacro::Action> testaction; Private() : xmlguiclient(0) @@ -143,7 +143,7 @@ void XMLHandlerTests::testParseAndToXML() void XMLHandlerTests::testCorrectDomElement() { // Local Init - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; // Part 1: From XML to a Macro. @@ -184,7 +184,7 @@ void XMLHandlerTests::testCorrectDomElement() // 2.Test - XML-document with bad root element. void XMLHandlerTests::testBadRoot() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -210,7 +210,7 @@ void XMLHandlerTests::testBadRoot() // 3.Test - XML-document with a missing Variable. void XMLHandlerTests::testMissingVariable() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -238,7 +238,7 @@ void XMLHandlerTests::testMissingVariable() // 4.Test - One more Variable in XML-Document. void XMLHandlerTests::testMoreVariables() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -270,7 +270,7 @@ void XMLHandlerTests::testMoreVariables() // 5.Test - XML-document with wrong macro-xmlversion. void XMLHandlerTests::testWrongVersion() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -297,7 +297,7 @@ void XMLHandlerTests::testWrongVersion() // or missing end tag. void XMLHandlerTests::testWrongXMLStruct() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -321,7 +321,7 @@ void XMLHandlerTests::testWrongXMLStruct() // 7.Test-XML-document with maximum field-size. void XMLHandlerTests::testMaxNum() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -351,7 +351,7 @@ void XMLHandlerTests::testMaxNum() // 8.Test-XML-document with maximum+1 field-size. void XMLHandlerTests::testMaxNum2() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -381,7 +381,7 @@ void XMLHandlerTests::testMaxNum2() // 9.Test-XML-document with minimum field-size. void XMLHandlerTests::testMinNum() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -411,7 +411,7 @@ void XMLHandlerTests::testMinNum() // 10.Test-XML-document with minimum+1 field-size. void XMLHandlerTests::testMinNum2() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -441,7 +441,7 @@ void XMLHandlerTests::testMinNum2() // 11.Test - With a to big number. void XMLHandlerTests::testBigNumber() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -471,7 +471,7 @@ void XMLHandlerTests::testBigNumber() // 12.Test - With two MacroItems. void XMLHandlerTests::testTwoMacroItems() { - KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); + TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro"); TQDomDocument doomdocument; const TQString xml = TQString("<!DOCTYPE macros>" @@ -517,15 +517,15 @@ void XMLHandlerTests::testTwoMacroItems() * @p isactionset Bool for expectation that the @a Action -names are equal. * @p isvariableok TQMap of Bools for comparing each @a Variable . */ -void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro, +void XMLHandlerTests::assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro, const TQDomElement& elem, const bool isitemsempty, const bool isactionset, const TQMap<TQString, bool> isvariableok) { // Make an Iterator over the MacroItems of the Macro. - const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items(); - TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator + const TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems = macro->items(); + TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator mit(macroitems.constBegin()), end(macroitems.constEnd()); //1.comparison - Is the MacroItem-list empty? @@ -545,7 +545,7 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> // Iterate over the MacroItems and item-elements. while(mit != end && ! itemnode.isNull()) { - const KSharedPtr<KoMacro::MacroItem> macroitem = *mit; + const TDESharedPtr<KoMacro::MacroItem> macroitem = *mit; const TQDomElement itemelem = itemnode.toElement(); //2.comparison - Is the Action-name equal? @@ -563,12 +563,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> } // Go down to MacroItem->Variable and item->variable and compare them. - TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables(); + TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables = macroitem->variables(); TQDomNode varnode = itemelem.firstChild(); while ( ! varnode.isNull()) { const TQDomElement varelem = varnode.toElement(); - const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data(); + const TDESharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data(); //3.comparison - Is the content of the Variable // in the MacroItem and and item equal? @@ -605,10 +605,10 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> } // Prints a TQMap of Variables to kdDebug(). -void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s) +void XMLHandlerTests::printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s) { //TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd()); - TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd()); + TQMap<TQString, TDESharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd()); while(mvit != end){ const KoMacro::Variable * v = *mvit; kdDebug() << s << ": " << v->name() << endl; diff --git a/kexi/plugins/macros/tests/xmlhandlertests.h b/kexi/plugins/macros/tests/xmlhandlertests.h index 521f9ee5..062b24b1 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests.h +++ b/kexi/plugins/macros/tests/xmlhandlertests.h @@ -77,14 +77,14 @@ namespace KoMacroTest { * @p isactionset Bool for expectation that the @a Action -names are equal. * @p isvariableok TQMap of Bools for comparing each @a Variable . */ - void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro, + void assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro, const TQDomElement& elem, const bool isitemsempty, const bool isactionset, const TQMap<TQString, bool> isvariableok); // Prints a TQMap of Variables to kdDebug(). - void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s); + void printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s); /** * Sub-methods of testParseXML() and testToXML(). diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp index cc38c077..8e990d11 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp @@ -59,39 +59,39 @@ namespace KoMacroTest { /** * @a Macro instance as a container for the macroitems; */ - KSharedPtr<KoMacro::Macro> macro; // container for manually created items - KSharedPtr<KoMacro::Macro> macro2; // container for parsen items - KSharedPtr<KoMacro::Macro> macro3; // container for parsen items after back-converting by toXML() and again parseXML() + TDESharedPtr<KoMacro::Macro> macro; // container for manually created items + TDESharedPtr<KoMacro::Macro> macro2; // container for parsen items + TDESharedPtr<KoMacro::Macro> macro3; // container for parsen items after back-converting by toXML() and again parseXML() /** * An @a TestObject instance used internaly to test * handling and communication with from TQObject * inheritated instances. */ - KSharedPtr<KoMacro::Action> testaction; - KSharedPtr<KoMacro::Action> action2; // action of the parsen macro2 - KSharedPtr<KoMacro::Action> action3; // action of the parsen macro3 - KSharedPtr<KoMacro::Action> testaction_2; // for test12 - KSharedPtr<KoMacro::Action> action2_2; // action of the parsen macro2, for test12 - KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12 + TDESharedPtr<KoMacro::Action> testaction; + TDESharedPtr<KoMacro::Action> action2; // action of the parsen macro2 + TDESharedPtr<KoMacro::Action> action3; // action of the parsen macro3 + TDESharedPtr<KoMacro::Action> testaction_2; // for test12 + TDESharedPtr<KoMacro::Action> action2_2; // action of the parsen macro2, for test12 + TDESharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12 /** * Represents a @a TQValuList of @a MacroItem which are parsen in the * correspondig @a Macro . */ - TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2 - TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3 + TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2 + TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3 /** * @a MacroItem instances which ist fillen manually from the given XML * and parsen by the @a XMLHandler over the XML. */ - KSharedPtr<KoMacro::MacroItem> macroitem; // created manually from XML - KSharedPtr<KoMacro::MacroItem> macroitem2; // parsen from XML in macro2 - KSharedPtr<KoMacro::MacroItem> macroitem3; // parsen from XML in macro3 - KSharedPtr<KoMacro::MacroItem> macroitem_2; // created manually from XML, for test12 - KSharedPtr<KoMacro::MacroItem> macroitem2_2;// parsen from XML in macro2, for test12 - KSharedPtr<KoMacro::MacroItem> macroitem3_2;// parsen from XML in macro3, for test12 + TDESharedPtr<KoMacro::MacroItem> macroitem; // created manually from XML + TDESharedPtr<KoMacro::MacroItem> macroitem2; // parsen from XML in macro2 + TDESharedPtr<KoMacro::MacroItem> macroitem3; // parsen from XML in macro3 + TDESharedPtr<KoMacro::MacroItem> macroitem_2; // created manually from XML, for test12 + TDESharedPtr<KoMacro::MacroItem> macroitem2_2;// parsen from XML in macro2, for test12 + TDESharedPtr<KoMacro::MacroItem> macroitem3_2;// parsen from XML in macro3, for test12 Private() : xmlguiclient(0) @@ -207,10 +207,10 @@ void XMLHandlerTests2::testCorrectDomElement() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -300,10 +300,10 @@ void XMLHandlerTests2::testBadRoot() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true); @@ -339,9 +339,9 @@ void XMLHandlerTests2::testMissingVariable() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -425,11 +425,11 @@ void XMLHandlerTests2::testMoreVariables() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); - KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong"); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong"); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -517,10 +517,10 @@ void XMLHandlerTests2::testWrongVersion() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true); @@ -559,10 +559,10 @@ void XMLHandlerTests2::testWrongXMLStruct() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true); @@ -599,10 +599,10 @@ void XMLHandlerTests2::testMaxNum() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -687,10 +687,10 @@ void XMLHandlerTests2::testMaxNum2() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -775,10 +775,10 @@ void XMLHandlerTests2::testMinNum() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -863,10 +863,10 @@ void XMLHandlerTests2::testMinNum2() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -951,10 +951,10 @@ void XMLHandlerTests2::testBigNumber() d->macroitem->setAction(d->testaction); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + //TODO //TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -1050,18 +1050,18 @@ void XMLHandlerTests2::testTwoMacroItems() d->macroitem_2->setAction(d->testaction_2); // Push the Variables into the macroitem. - KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); - KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); - KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); - KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); - KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong"); + TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string")); + TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0)); + TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true)); + TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6)); + TDESharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong"); // Push the Variables into the macroitem4. - KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2")); - KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4)); - KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false)); - KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7)); - KSharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2"); + TDESharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2")); + TDESharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4)); + TDESharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false)); + TDESharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7)); + TDESharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2"); // Is our XML parseable into a 2. Macro by calling parseXML()? KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true); @@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems() KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2); { - TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin()); + TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin()); // 2a.comparison - Test if the Action is correct? d->macroitem2 = *mit2; mit2++; @@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems() KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2); { - TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin()); + TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin()); // 2b.comparison - Test if the Action is correct? d->macroitem3 = *mit3; mit3++; @@ -1145,14 +1145,14 @@ void XMLHandlerTests2::testTwoMacroItems() * End of Sub-methos of testParseAndToXML2(). ***************************************************************************/ -bool XMLHandlerTests2::assertActionsEqual(KSharedPtr<KoMacro::Action> action, - KSharedPtr<KoMacro::Action> action2) +bool XMLHandlerTests2::assertActionsEqual(TDESharedPtr<KoMacro::Action> action, + TDESharedPtr<KoMacro::Action> action2) { return action->name() == action2->name(); } -bool XMLHandlerTests2::assertVariablesEqual(KSharedPtr<KoMacro::Variable> var, - KSharedPtr<KoMacro::Variable> var2) +bool XMLHandlerTests2::assertVariablesEqual(TDESharedPtr<KoMacro::Variable> var, + TDESharedPtr<KoMacro::Variable> var2) { if ( var->variant() != var2->variant() ) kdDebug() << "Variable1: " << var->variant() << " and Variable2: " << var2->variant() << endl; return var->variant() == var2->variant(); diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h index 376d7b08..3fd59609 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests2.h +++ b/kexi/plugins/macros/tests/xmlhandlertests2.h @@ -70,7 +70,7 @@ namespace KoMacroTest { Private* const d; typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap; - typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist; + typedef TQValueList<TDESharedPtr<KoMacro::MacroItem > >::size_type sizetypelist; /** * Compares a XML-Element with a Macro. Call sub-asserts. @@ -80,14 +80,14 @@ namespace KoMacroTest { * @p isactionset Bool for expectation that the @a Action -names are equal. * @p isvariableok TQMap of Bools for comparing each @a Variable . */ -/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro, +/* void assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro, const TQDomElement& elem, const bool isitemsempty, const bool isactionset, const TQMap<TQString, bool> isvariableok); // Prints a TQMap of Variables to kdDebug(). - void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s); + void printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s); */ /** * Sub-methods of testParseXML() and testToXML(). @@ -122,11 +122,11 @@ namespace KoMacroTest { void testTwoMacroItems(); - bool assertActionsEqual(KSharedPtr<KoMacro::Action> action, - KSharedPtr<KoMacro::Action> action2); + bool assertActionsEqual(TDESharedPtr<KoMacro::Action> action, + TDESharedPtr<KoMacro::Action> action2); - bool assertVariablesEqual(KSharedPtr<KoMacro::Variable> var, - KSharedPtr<KoMacro::Variable> var2); + bool assertVariablesEqual(TDESharedPtr<KoMacro::Variable> var, + TDESharedPtr<KoMacro::Variable> var2); }; } diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.h b/kexi/plugins/scripting/kexidb/kexidbconnection.h index 925a6e8e..846f2b2c 100644 --- a/kexi/plugins/scripting/kexidb/kexidbconnection.h +++ b/kexi/plugins/scripting/kexidb/kexidbconnection.h @@ -180,8 +180,8 @@ namespace Kross { namespace KexiDB { ::KexiDB::Connection* connection() const; ::KexiDB::Connection* m_connection; - KSharedPtr<KexiDBConnectionData> m_connectiondata; - KSharedPtr<KexiDBDriver> m_driver; + TDESharedPtr<KexiDBConnectionData> m_connectiondata; + TDESharedPtr<KexiDBDriver> m_driver; /// Initialize the class instance. void initialize(); |