From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- languages/cpp/codeinformationrepository.cpp | 82 ++++++++++++++--------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'languages/cpp/codeinformationrepository.cpp') diff --git a/languages/cpp/codeinformationrepository.cpp b/languages/cpp/codeinformationrepository.cpp index 5bb22a68..e71f3a66 100644 --- a/languages/cpp/codeinformationrepository.cpp +++ b/languages/cpp/codeinformationrepository.cpp @@ -16,17 +16,17 @@ #include /// @todo move in utils.cpp -static QValueList -my_unique( const QValueList& entryList ) +static TQValueList +my_unique( const TQValueList& entryList ) { - QValueList< KTextEditor::CompletionEntry > l; - QMap map; - QValueList< KTextEditor::CompletionEntry >::ConstIterator it = entryList.begin(); + TQValueList< KTextEditor::CompletionEntry > l; + TQMap map; + TQValueList< KTextEditor::CompletionEntry >::ConstIterator it = entryList.begin(); while ( it != entryList.end() ) { KTextEditor::CompletionEntry e = *it++; - QString key = e.type + " " + + TQString key = e.type + " " + e.text + " " + e.prefix + " " + e.postfix + " "; @@ -46,14 +46,14 @@ CodeInformationRepository::CodeInformationRepository( KDevCodeRepository* rep ) CodeInformationRepository::~CodeInformationRepository() {} -QValueList CodeInformationRepository::query( const QValueList & args ) +TQValueList CodeInformationRepository::query( const TQValueList & args ) { // kdDebug( 9007 ) << "CodeInformationRepository::query()" << endl; - QValueList tags; + TQValueList tags; - QValueList catalogs = m_rep->registeredCatalogs(); - QValueList::Iterator it = catalogs.begin(); + TQValueList catalogs = m_rep->registeredCatalogs(); + TQValueList::Iterator it = catalogs.begin(); while ( it != catalogs.end() ) { Catalog * catalog = *it; @@ -68,36 +68,36 @@ QValueList CodeInformationRepository::query( const QValueList CodeInformationRepository::getTagsInFile( const QString & fileName ) +TQValueList CodeInformationRepository::getTagsInFile( const TQString & fileName ) { kdDebug( 9007 ) << "CodeInformationRepository::getTagsInFile()" << endl; - QValueList args; + TQValueList args; args << Catalog::QueryArgument( "fileName", fileName ); - QValueList catalogs = m_rep->registeredCatalogs(); - QValueList::Iterator it = catalogs.begin(); + TQValueList catalogs = m_rep->registeredCatalogs(); + TQValueList::Iterator it = catalogs.begin(); while ( it != catalogs.end() ) { Catalog * catalog = *it; ++it; - QValueList tags = catalog->query( args ); + TQValueList tags = catalog->query( args ); if ( tags.size() ) return tags; } - return QValueList(); + return TQValueList(); } -QValueList CodeInformationRepository::getTagsInScope( const QStringList & scope, bool // isInstance +TQValueList CodeInformationRepository::getTagsInScope( const TQStringList & scope, bool // isInstance ) { kdDebug( 9007 ) << "CodeInformationRepository::getTagsInScope()" << endl; - QValueList tags; - QValueList args; + TQValueList tags; + TQValueList args; #if 0 @@ -133,7 +133,7 @@ QValueList CodeInformationRepository::getTagsInScope( const QStringList & s return tags; } -QValueList CodeInformationRepository::getEntriesInScope( const QStringList & scope, bool isInstance, bool recompute ) +TQValueList CodeInformationRepository::getEntriesInScope( const TQStringList & scope, bool isInstance, bool recompute ) { kdDebug( 9007 ) << "CodeInformationRepository::getEntriesInScope()" << endl; @@ -149,14 +149,14 @@ QValueList CodeInformationRepository::getEntriesIn } -QValueList CodeInformationRepository::getBaseClassList( const QString& className ) +TQValueList CodeInformationRepository::getBaseClassList( const TQString& className ) { // kdDebug( 9007 ) << "CodeInformationRepository::getBaseClassList()" << endl; if ( className.isEmpty() ) - return QValueList(); + return TQValueList(); - QValueList args; + TQValueList args; args << Catalog::QueryArgument( "kind", Tag::Kind_Base_class ); /* if( className.length() >= 2 ) args << Catalog::QueryArgument( "prefix", className.left(2) );*/ @@ -164,12 +164,12 @@ QValueList CodeInformationRepository::getBaseClassList( const QString& clas return query( args ); } -QValueList CodeInformationRepository::getClassOrNamespaceList( const QStringList & scope ) +TQValueList CodeInformationRepository::getClassOrNamespaceList( const TQStringList & scope ) { kdDebug( 9007 ) << "CodeInformationRepository::getClassOrNamespaceList()" << endl; - QValueList tags; - QValueList args; + TQValueList tags; + TQValueList args; args << Catalog::QueryArgument( "kind", Tag::Kind_Namespace ) << Catalog::QueryArgument( "scope", scope ); @@ -183,10 +183,10 @@ QValueList CodeInformationRepository::getClassOrNamespaceList( const QStrin return tags; } -QValueList CodeInformationRepository::getTagsInScope( const QString & name, const QStringList & scope ) +TQValueList CodeInformationRepository::getTagsInScope( const TQString & name, const TQStringList & scope ) { - QValueList tags; - QValueList args; + TQValueList tags; + TQValueList args; args.clear(); args << Catalog::QueryArgument( "scope", scope ); @@ -233,8 +233,8 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC { CppFunction tagInfo( tag ); - QStringList arguments = tagInfo.arguments(); - QStringList argumentNames = tagInfo.argumentNames(); + TQStringList arguments = tagInfo.arguments(); + TQStringList argumentNames = tagInfo.argumentNames(); if ( completionMode == CppCodeCompletion::VirtualDeclCompletion ) { @@ -252,7 +252,7 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC else entry.text += "( "; - QString signature; + TQString signature; for ( uint i = 0; i < arguments.size(); ++i ) { if( !proc ) @@ -263,9 +263,9 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC if ( completionMode == CppCodeCompletion::NormalCompletion || completionMode == CppCodeCompletion::VirtualDeclCompletion ) { - QString argName = argumentNames[ i ]; + TQString argName = argumentNames[ i ]; if ( !argName.isEmpty() ) - signature += QString::fromLatin1( " " ) + argName; + signature += TQString::fromLatin1( " " ) + argName; } @@ -286,15 +286,15 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC if ( completionMode == CppCodeCompletion::VirtualDeclCompletion ) { entry.text += entry.postfix + ";"; - entry.postfix = QString::null; + entry.postfix = TQString::null; } else if ( completionMode != CppCodeCompletion::NormalCompletion ) { entry.text += entry.postfix; - entry.postfix = QString::null; + entry.postfix = TQString::null; } - QString comment = tag.attribute( "description" ).toString(); + TQString comment = tag.attribute( "description" ).toString(); if ( !comment.isNull() ) entry.comment = comment; //else @@ -317,12 +317,12 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC return entry; } -QValueList CodeInformationRepository::toEntryList( const QValueList & tags, CppCodeCompletion::CompletionMode completionMode ) +TQValueList CodeInformationRepository::toEntryList( const TQValueList & tags, CppCodeCompletion::CompletionMode completionMode ) { - QValueList entryList; - QMap ns; + TQValueList entryList; + TQMap ns; - QValueList::ConstIterator it = tags.begin(); + TQValueList::ConstIterator it = tags.begin(); while ( it != tags.end() ) { Tag tag = *it; -- cgit v1.2.1