diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/simpletypefunction.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/simpletypefunction.cpp')
-rw-r--r-- | languages/cpp/simpletypefunction.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/languages/cpp/simpletypefunction.cpp b/languages/cpp/simpletypefunction.cpp index 898228bb..3fc1ce52 100644 --- a/languages/cpp/simpletypefunction.cpp +++ b/languages/cpp/simpletypefunction.cpp @@ -40,24 +40,24 @@ HashedStringSet getIncludeFiles( const ItemDom& item ) { //SimpleTypeFunctionInterface implementation -QString SimpleTypeFunctionInterface::signature() { - QString sig = "( "; +TQString SimpleTypeFunctionInterface::signature() { + TQString sig = "( "; SimpleTypeImpl* asType = dynamic_cast<SimpleTypeImpl*>( this ); - QStringList argDefaults = getArgumentDefaults(); - QStringList argNames = getArgumentNames(); - QValueList<TypeDesc> argTypes = getArgumentTypes(); - QValueList<LocateResult> argRealTypes; + TQStringList argDefaults = getArgumentDefaults(); + TQStringList argNames = getArgumentNames(); + TQValueList<TypeDesc> argTypes = getArgumentTypes(); + TQValueList<LocateResult> argRealTypes; if ( asType ) { - for ( QValueList<TypeDesc>::iterator it = argTypes.begin(); it != argTypes.end(); ++it ) { + for ( TQValueList<TypeDesc>::iterator it = argTypes.begin(); it != argTypes.end(); ++it ) { argRealTypes << asType->locateDecType( *it ); } } - QStringList::iterator def = argDefaults.begin(); - QStringList::iterator name = argNames.begin(); - QValueList<LocateResult>::iterator realType = argRealTypes.begin(); + TQStringList::iterator def = argDefaults.begin(); + TQStringList::iterator name = argNames.begin(); + TQValueList<LocateResult>::iterator realType = argRealTypes.begin(); while ( realType != argRealTypes.end() ) { if ( sig != "( " ) @@ -128,9 +128,9 @@ void SimpleTypeFunctionInterface::resolveImplicitTypes( TypeDesc::TemplateParams } } -void SimpleTypeFunctionInterface::resolveImplicitTypes( QValueList<TypeDesc>& argTypes, QValueList<TypeDesc>& gottenArgTypes, SimpleTypeImpl::TemplateParamInfo& paramInfo ) { - QValueList<TypeDesc>::iterator it = argTypes.begin(); - QValueList<TypeDesc>::iterator it2 = gottenArgTypes.begin(); +void SimpleTypeFunctionInterface::resolveImplicitTypes( TQValueList<TypeDesc>& argTypes, TQValueList<TypeDesc>& gottenArgTypes, SimpleTypeImpl::TemplateParamInfo& paramInfo ) { + TQValueList<TypeDesc>::iterator it = argTypes.begin(); + TQValueList<TypeDesc>::iterator it2 = gottenArgTypes.begin(); while ( it != argTypes.end() && it2 != gottenArgTypes.end() ) { resolveImplicitTypes( *it, *it2, paramInfo ); @@ -191,13 +191,13 @@ SimpleTypeCodeModel::SimpleTypeCodeModel( ItemDom& item ) : m_item( item ) { FunctionModel* m = dynamic_cast<FunctionModel*>( i ); ClassModel* c = dynamic_cast<ClassModel*>( i ); if ( m ) { - QStringList l = m->scope(); + TQStringList l = m->scope(); l << m->name(); setScope( l ); return; } if ( c ) { - QStringList l = c->scope(); + TQStringList l = c->scope(); l << c->name(); setScope( l ); return; @@ -237,7 +237,7 @@ ItemDom SimpleTypeCodeModel::locateModelContainer( class CodeModel* m, TypeDesc } ///Until header-parsing is implemented, this tries to find the class that is most related to this item -/*ClassDom SimpleTypeCodeModel::pickMostRelated( ClassList lst, QString fn ) { +/*ClassDom SimpleTypeCodeModel::pickMostRelated( ClassList lst, TQString fn ) { if( lst.isEmpty() ) return ClassDom(); ClassDom best = lst.front(); @@ -247,7 +247,7 @@ ItemDom SimpleTypeCodeModel::locateModelContainer( class CodeModel* m, TypeDesc for( ClassList::iterator it = lst.begin(); it != lst.end(); ++it ) { if( !(*it)->getSpecializationDeclaration().isEmpty() ) continue; ///Don't consider specialized classes //kdDebug() << "comparing " << (*it)->fileName() << endl; - QString str = (*it)->fileName(); + TQString str = (*it)->fileName(); uint len = str.length(); if( fn.length() < len ) len = fn.length(); @@ -271,11 +271,11 @@ ItemDom SimpleTypeCodeModel::locateModelContainer( class CodeModel* m, TypeDesc return best; }*/ -/*QValueList<TypePointer> SimpleTypeCodeModel::findSpecializations( const QString& name ) { +/*TQValueList<TypePointer> SimpleTypeCodeModel::findSpecializations( const TQString& name ) { ClassModel* klass = dynamic_cast<ClassModel*> ( & (*m_item) ); if( !klass ) { ifVerbose( dbg() << "\"" << str() << "\": search for member " << name.name() << " unsuccessful because the own type is invalid" << endl ); - return QValueList<TypePointer>(); + return TQValueList<TypePointer>(); } ClassList l = klass->classByName( name.name() ); @@ -290,12 +290,12 @@ ItemDom SimpleTypeCodeModel::locateModelContainer( class CodeModel* m, TypeDesc } } - return QValueList<TypePointer>(); + return TQValueList<TypePointer>(); }*/ -QValueList<TypePointer> SimpleTypeCodeModel::getMemberClasses( const TypeDesc& name ) { - QValueList<TypePointer> ret; +TQValueList<TypePointer> SimpleTypeCodeModel::getMemberClasses( const TypeDesc& name ) { + TQValueList<TypePointer> ret; if ( !m_item ) return ret; @@ -319,10 +319,10 @@ QValueList<TypePointer> SimpleTypeCodeModel::getMemberClasses( const TypeDesc& n } template<class Item> -Item pickMostRelated( const HashedStringSet& includeFiles, const QValueList<Item>& list ) { +Item pickMostRelated( const HashedStringSet& includeFiles, const TQValueList<Item>& list ) { if ( list.isEmpty() ) return Item(); - for ( typename QValueList<Item>::const_iterator it = list.begin(); it != list.end(); ++it ) { + for ( typename TQValueList<Item>::const_iterator it = list.begin(); it != list.end(); ++it ) { if ( includeFiles[( *it )->fileName()] ) return *it; } @@ -330,10 +330,10 @@ Item pickMostRelated( const HashedStringSet& includeFiles, const QValueList<Item } template<> -ClassDom pickMostRelated( const HashedStringSet& includeFiles, const QValueList<ClassDom>& list ) { +ClassDom pickMostRelated( const HashedStringSet& includeFiles, const TQValueList<ClassDom>& list ) { if ( list.isEmpty() ) return ClassDom(); ///@todo the current file must be preferred - for ( QValueList<ClassDom>::const_iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQValueList<ClassDom>::const_iterator it = list.begin(); it != list.end(); ++it ) { if ( !( *it )->getSpecializationDeclaration().isEmpty() ) continue; ///Don't consider specialized classes if ( includeFiles[( *it )->fileName()] ) return *it; @@ -466,7 +466,7 @@ SimpleTypeImpl::MemberInfo SimpleTypeCodeModel::findMember( TypeDesc name , Memb } bool SimpleTypeCodeModel::findItem() { - QString key = str(); + TQString key = str(); m_item = locateModelContainer( cppCompletionInstance->m_pSupport->codeModel(), str() ); return ( bool ) m_item; } @@ -492,9 +492,9 @@ DeclarationInfo SimpleTypeCodeModel::getDeclarationInfo() { return ret; } -QString SimpleTypeCodeModel::specialization() const { +TQString SimpleTypeCodeModel::specialization() const { const ClassModel* klass = dynamic_cast<const ClassModel*>( m_item.data() ); - if ( !klass ) return QString::null; + if ( !klass ) return TQString::null; return klass->getSpecializationDeclaration(); } @@ -520,7 +520,7 @@ SimpleTypeImpl::TemplateParamInfo SimpleTypeCodeModel::getTemplateParamInfo() { return ret; } -const LocateResult SimpleTypeCodeModel::findTemplateParam( const QString& name ) { +const LocateResult SimpleTypeCodeModel::findTemplateParam( const TQString& name ) { if ( m_item ) { TemplateModelItem* ti = dynamic_cast<TemplateModelItem*>( & ( *m_item ) ); TypeDesc::TemplateParams& templateParams = m_desc.templateParams(); @@ -529,7 +529,7 @@ const LocateResult SimpleTypeCodeModel::findTemplateParam( const QString& name ) return *templateParams[pi]; } else { if ( pi != -1 && !ti->getParam( pi ).second.isEmpty() ) { - QString def = ti->getParam( pi ).second; + TQString def = ti->getParam( pi ).second; ifVerbose( dbg() << "\"" << str() << "\": using default-template-parameter \"" << def << "\" for " << name << endl ); return TypeDesc( def ); } else if ( pi != -1 ) { @@ -540,21 +540,21 @@ const LocateResult SimpleTypeCodeModel::findTemplateParam( const QString& name ) return LocateResult(); } -QStringList SimpleTypeCodeModel::getBaseStrings() { +TQStringList SimpleTypeCodeModel::getBaseStrings() { Debug d( "#getbases#" ); if ( !d || !safetyCounter ) { //ifVerbose( dbg() << "\"" << str() << "\": recursion to deep while getting bases" << endl ); - return QStringList(); + return TQStringList(); } - QStringList ret; + TQStringList ret; ClassModel* klass; if ( !m_item || ( klass = dynamic_cast<ClassModel*>( & ( *m_item ) ) ) == 0 ) return ret; - QStringList parents = klass->baseClassList(); - for ( QStringList::Iterator it = parents.begin(); it != parents.end(); ++it ) { + TQStringList parents = klass->baseClassList(); + for ( TQStringList::Iterator it = parents.begin(); it != parents.end(); ++it ) { ret << *it; } @@ -592,8 +592,8 @@ bool SimpleTypeCodeModelFunction::isConst() { } -QValueList<TypeDesc> SimpleTypeCodeModelFunction::getArgumentTypes() { - QValueList<TypeDesc> ret; +TQValueList<TypeDesc> SimpleTypeCodeModelFunction::getArgumentTypes() { + TQValueList<TypeDesc> ret; if ( item() ) { IncludeFiles files; @@ -611,8 +611,8 @@ QValueList<TypeDesc> SimpleTypeCodeModelFunction::getArgumentTypes() { return ret; } -QStringList SimpleTypeCodeModelFunction::getArgumentNames() { - QStringList ret; +TQStringList SimpleTypeCodeModelFunction::getArgumentNames() { + TQStringList ret; if ( item() ) { if ( FunctionModel* m = dynamic_cast<FunctionModel*>( & ( *item() ) ) ) { @@ -625,8 +625,8 @@ QStringList SimpleTypeCodeModelFunction::getArgumentNames() { return ret; } -QStringList SimpleTypeCodeModelFunction::getArgumentDefaults() { - QStringList ret; +TQStringList SimpleTypeCodeModelFunction::getArgumentDefaults() { + TQStringList ret; if ( item() ) { if ( FunctionModel* m = dynamic_cast<FunctionModel*>( & ( *item() ) ) ) { @@ -650,7 +650,7 @@ SimpleTypeCodeModelFunction::CodeModelFunctionBuildInfo::CodeModelFunctionBuildI } TypePointer SimpleTypeCodeModelFunction::CodeModelFunctionBuildInfo::build() { - QValueList<TypePointer> ret; + TQValueList<TypePointer> ret; TypePointer last; for ( FunctionList::iterator it = m_items.begin(); it != m_items.end(); ++it ) { TypePointer tp = new SimpleTypeCodeModelFunction( model_cast<ItemDom> ( *it ) ); @@ -684,19 +684,19 @@ bool SimpleTypeCatalogFunction::isConst() { return tagInfo.isConst(); } -QStringList SimpleTypeCatalogFunction::getArgumentNames() { - QStringList ret; +TQStringList SimpleTypeCatalogFunction::getArgumentNames() { + TQStringList ret; Tag t = tag(); CppFunction<Tag> tagInfo( t ); return tagInfo.argumentNames(); } -QValueList<TypeDesc> SimpleTypeCatalogFunction::getArgumentTypes() { - QValueList<TypeDesc> ret; +TQValueList<TypeDesc> SimpleTypeCatalogFunction::getArgumentTypes() { + TQValueList<TypeDesc> ret; Tag t = tag(); CppFunction<Tag> tagInfo( t ); - QStringList arguments = tagInfo.arguments(); - for ( QStringList::iterator it = arguments.begin(); it != arguments.end(); ++it ) + TQStringList arguments = tagInfo.arguments(); + for ( TQStringList::iterator it = arguments.begin(); it != arguments.end(); ++it ) ret << TypeDesc( *it ); return ret; } @@ -704,9 +704,9 @@ QValueList<TypeDesc> SimpleTypeCatalogFunction::getArgumentTypes() { //SimpleTypeCatalogFunction::CatalogFunctionBuildInfo implementation TypePointer SimpleTypeCatalogFunction::CatalogFunctionBuildInfo::build() { - QValueList<TypePointer> ret; + TQValueList<TypePointer> ret; TypePointer last; - for ( QValueList<Tag>::iterator it = m_tags.begin(); it != m_tags.end(); ++it ) { + for ( TQValueList<Tag>::iterator it = m_tags.begin(); it != m_tags.end(); ++it ) { TypePointer tp = new SimpleTypeCatalogFunction( *it ); tp->takeTemplateParams( m_desc ); tp->descForEdit().increaseFunctionDepth(); |