diff options
Diffstat (limited to 'kig/filters/native-filter.cc')
-rw-r--r-- | kig/filters/native-filter.cc | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kig/filters/native-filter.cc b/kig/filters/native-filter.cc index 4a3d0a04..9e92130d 100644 --- a/kig/filters/native-filter.cc +++ b/kig/filters/native-filter.cc @@ -51,7 +51,7 @@ struct HierElem { int id; - std::vector<int> tqparents; + std::vector<int> parents; TQDomElement el; }; @@ -73,8 +73,8 @@ static void visitElem( std::vector<HierElem>& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].tqparents[j] - 1); + for ( uint j = 0; j < elems[i].parents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].parents[j] - 1); ret.push_back( elems[i] ); seen[i] = true; }; @@ -273,7 +273,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( ! ok ) KIG_FILTER_PARSE_ERROR; extendVect( elems, id ); - elems[id-1].tqparents.push_back( pid ); + elems[id-1].parents.push_back( pid ); } } }; @@ -315,8 +315,8 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& propname = ec.text().latin1(); }; - if ( i->tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* tqparent = retcalcers[i->tqparents[0] -1]; + if ( i->parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = retcalcers[i->parents[0] -1]; QCStringList propnames = tqparent->imp()->propertiesInternalNames(); int propid = propnames.tqfindIndex( propname ); if ( propid == -1 ) @@ -342,12 +342,12 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& return false; }; - std::vector<ObjectCalcer*> tqparents; - for ( std::vector<int>::iterator j = i->tqparents.begin(); - j != i->tqparents.end(); ++j ) - tqparents.push_back( retcalcers[*j - 1] ); + std::vector<ObjectCalcer*> parents; + for ( std::vector<int>::iterator j = i->parents.begin(); + j != i->parents.end(); ++j ) + parents.push_back( retcalcers[*j - 1] ); - o = new ObjectTypeCalcer( type, tqparents ); + o = new ObjectTypeCalcer( type, parents ); } else continue; @@ -434,25 +434,25 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& uint id = tmp.toInt( &ok ); if ( id <= 0 ) KIG_FILTER_PARSE_ERROR; - std::vector<ObjectCalcer*> tqparents; - for ( TQDomElement tqparentel = e.firstChild().toElement(); ! tqparentel.isNull(); - tqparentel = tqparentel.nextSibling().toElement() ) + std::vector<ObjectCalcer*> parents; + for ( TQDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); + parentel = parentel.nextSibling().toElement() ) { - if ( tqparentel.tagName() != "Parent" ) continue; - TQString tmp = tqparentel.attribute( "id" ); - uint tqparentid = tmp.toInt( &ok ); + if ( parentel.tagName() != "Parent" ) continue; + TQString tmp = parentel.attribute( "id" ); + uint parentid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( tqparentid == 0 || tqparentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* tqparent = calcers[tqparentid - 1].get(); + if ( parentid == 0 || parentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = calcers[parentid - 1].get(); if ( ! tqparent ) KIG_FILTER_PARSE_ERROR; - tqparents.push_back( tqparent ); + parents.push_back( tqparent ); } ObjectCalcer* o = 0; if ( e.tagName() == "Data" ) { - if ( !tqparents.empty() ) KIG_FILTER_PARSE_ERROR; + if ( !parents.empty() ) KIG_FILTER_PARSE_ERROR; TQString tmp = e.attribute( "type" ); TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); @@ -465,10 +465,10 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } else if ( e.tagName() == "Property" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; TQCString propname = e.attribute( "which" ).latin1(); - ObjectCalcer* tqparent = tqparents[0]; + ObjectCalcer* tqparent = parents[0]; int propid = tqparent->imp()->propertiesInternalNames().tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; @@ -490,17 +490,17 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } // mp: (I take the responsibility for this!) explanation: the usual ObjectTypeCalcer - // constructor also "sortArgs" the tqparents. I believe that this *must not* be done + // constructor also "sortArgs" the parents. I believe that this *must not* be done // when loading from a saved kig file for the following reasons: // 1. the arguments should already be in their intended order, since the file was // saved from a working hierarchy; furthermore we actually want to restore the original // hierarchy, not really to also fix possible problems with the original hierarchy; // 2. calling sortArgs could have undesirable side effects in particular situations, // since kig actually allow an ObjectType to produce different type of ObjectImp's - // it may happen that the tqparents of an object do not satisfy the requirements + // it may happen that the parents of an object do not satisfy the requirements // enforced by sortArgs (while moving around the free objects) but still be // perfectly valid - o = new ObjectTypeCalcer( type, tqparents, false ); + o = new ObjectTypeCalcer( type, parents, false ); } else KIG_FILTER_PARSE_ERROR; @@ -615,8 +615,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) } else assert( false ); - const std::vector<ObjectCalcer*> tqparents = ( *i )->tqparents(); - for ( std::vector<ObjectCalcer*>::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) + const std::vector<ObjectCalcer*> parents = ( *i )->parents(); + for ( std::vector<ObjectCalcer*>::const_iterator i = parents.begin(); i != parents.end(); ++i ) { std::map<const ObjectCalcer*,int>::const_iterator idp = idmap.find( *i ); assert( idp != idmap.end() ); |