From f7055674768fa7f0267da4a14b9061e60ebab3fc Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 31 Jan 2013 00:15:51 -0600 Subject: Rename KShared --- kexi/plugins/macros/lib/context.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kexi/plugins/macros/lib/context.cpp') diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index c0eea2505..a09704bd2 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; + TDESharedPtr macro; /** * List of @a Action instances that are children of the * macro. */ - TQValueList > items; + TQValueList > items; /** * The currently selected @a MacroItem or NULL if there * is now @a MacroItem selected yet. */ - KSharedPtr macroitem; + TDESharedPtr macroitem; /** * Map of all @a Variable instance that are defined within * this context. */ - TQMap > variables; + TQMap > variables; /** * The @a Exception instance thrown at the last @a activate() @@ -68,7 +68,7 @@ namespace KoMacro { Exception* exception; /// Constructor. - explicit Private(KSharedPtr m) + explicit Private(TDESharedPtr 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) +Context::Context(TDESharedPtr 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 Context::variable(const TQString& name) const +TDESharedPtr 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 Context::variable(const TQString& name) const } //if there is a macroitem try to get variable from it if(d->macroitem.data()) { - KSharedPtr v = d->macroitem->variable(name, true); + TDESharedPtr 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) +void Context::setVariable(const TQString& name, TDESharedPtr 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) } //return the associated Macro -KSharedPtr Context::macro() const +TDESharedPtr Context::macro() const { return d->macro; } //return the currently selected MacroItem -KSharedPtr Context::macroItem() const +TDESharedPtr 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 >::ConstIterator it) +void Context::activate(TQValueList >::ConstIterator it) { //debuging infos kdDebug() << "Context::activate()" << endl; //TQ_ASSIGN(d->macro); //set end to constEnd - TQValueList >::ConstIterator end(d->items.constEnd()); + TQValueList >::ConstIterator end(d->items.constEnd()); //loop through actions for(;it != end; ++it) { // fetch the MacroItem we are currently pointing to. - d->macroitem = KSharedPtr(*it); + d->macroitem = TDESharedPtr(*it); //skip empty macroitems if(! d->macroitem.data()) { kdDebug() << "Context::activate() Skipping empty MacroItem" << endl; @@ -181,7 +181,7 @@ void Context::activate(TQValueList >::ConstIterator it) } // fetch the Action, the MacroItem points to. - KSharedPtr action = d->macroitem->action(); + TDESharedPtr 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 >::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 v = d->macroitem->variable(*vit, true); + TDESharedPtr 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 >::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(0); + d->macroitem = TDESharedPtr(0); } //try to activated an context -void Context::activate(KSharedPtr context) +void Context::activate(TDESharedPtr context) { //setup context delete d->exception; d->exception = 0; @@ -252,7 +252,7 @@ void Context::activateNext() } //find the macroitem from which to continue - TQValueList >::ConstIterator it = d->items.find(d->macroitem); + TQValueList >::ConstIterator it = d->items.find(d->macroitem); if (it != d->items.constEnd()) { activate(++it); // try to continue the execution. } -- cgit v1.2.3