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/codeinformationrepository.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/codeinformationrepository.cpp')
-rw-r--r-- | languages/cpp/codeinformationrepository.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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 <kdebug.h> /// @todo move in utils.cpp -static QValueList<KTextEditor::CompletionEntry> -my_unique( const QValueList<KTextEditor::CompletionEntry>& entryList ) +static TQValueList<KTextEditor::CompletionEntry> +my_unique( const TQValueList<KTextEditor::CompletionEntry>& entryList ) { - QValueList< KTextEditor::CompletionEntry > l; - QMap<QString, bool> map; - QValueList< KTextEditor::CompletionEntry >::ConstIterator it = entryList.begin(); + TQValueList< KTextEditor::CompletionEntry > l; + TQMap<TQString, bool> 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<Tag> CodeInformationRepository::query( const QValueList<Catalog :: QueryArgument> & args ) +TQValueList<Tag> CodeInformationRepository::query( const TQValueList<Catalog :: QueryArgument> & args ) { // kdDebug( 9007 ) << "CodeInformationRepository::query()" << endl; - QValueList<Tag> tags; + TQValueList<Tag> tags; - QValueList<Catalog*> catalogs = m_rep->registeredCatalogs(); - QValueList<Catalog*>::Iterator it = catalogs.begin(); + TQValueList<Catalog*> catalogs = m_rep->registeredCatalogs(); + TQValueList<Catalog*>::Iterator it = catalogs.begin(); while ( it != catalogs.end() ) { Catalog * catalog = *it; @@ -68,36 +68,36 @@ QValueList<Tag> CodeInformationRepository::query( const QValueList<Catalog :: Qu return tags; } -QValueList<Tag> CodeInformationRepository::getTagsInFile( const QString & fileName ) +TQValueList<Tag> CodeInformationRepository::getTagsInFile( const TQString & fileName ) { kdDebug( 9007 ) << "CodeInformationRepository::getTagsInFile()" << endl; - QValueList<Catalog::QueryArgument> args; + TQValueList<Catalog::QueryArgument> args; args << Catalog::QueryArgument( "fileName", fileName ); - QValueList<Catalog*> catalogs = m_rep->registeredCatalogs(); - QValueList<Catalog*>::Iterator it = catalogs.begin(); + TQValueList<Catalog*> catalogs = m_rep->registeredCatalogs(); + TQValueList<Catalog*>::Iterator it = catalogs.begin(); while ( it != catalogs.end() ) { Catalog * catalog = *it; ++it; - QValueList<Tag> tags = catalog->query( args ); + TQValueList<Tag> tags = catalog->query( args ); if ( tags.size() ) return tags; } - return QValueList<Tag>(); + return TQValueList<Tag>(); } -QValueList<Tag> CodeInformationRepository::getTagsInScope( const QStringList & scope, bool // isInstance +TQValueList<Tag> CodeInformationRepository::getTagsInScope( const TQStringList & scope, bool // isInstance ) { kdDebug( 9007 ) << "CodeInformationRepository::getTagsInScope()" << endl; - QValueList<Tag> tags; - QValueList<Catalog::QueryArgument> args; + TQValueList<Tag> tags; + TQValueList<Catalog::QueryArgument> args; #if 0 @@ -133,7 +133,7 @@ QValueList<Tag> CodeInformationRepository::getTagsInScope( const QStringList & s return tags; } -QValueList<KTextEditor::CompletionEntry> CodeInformationRepository::getEntriesInScope( const QStringList & scope, bool isInstance, bool recompute ) +TQValueList<KTextEditor::CompletionEntry> CodeInformationRepository::getEntriesInScope( const TQStringList & scope, bool isInstance, bool recompute ) { kdDebug( 9007 ) << "CodeInformationRepository::getEntriesInScope()" << endl; @@ -149,14 +149,14 @@ QValueList<KTextEditor::CompletionEntry> CodeInformationRepository::getEntriesIn } -QValueList<Tag> CodeInformationRepository::getBaseClassList( const QString& className ) +TQValueList<Tag> CodeInformationRepository::getBaseClassList( const TQString& className ) { // kdDebug( 9007 ) << "CodeInformationRepository::getBaseClassList()" << endl; if ( className.isEmpty() ) - return QValueList<Tag>(); + return TQValueList<Tag>(); - QValueList<Catalog::QueryArgument> args; + TQValueList<Catalog::QueryArgument> 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<Tag> CodeInformationRepository::getBaseClassList( const QString& clas return query( args ); } -QValueList<Tag> CodeInformationRepository::getClassOrNamespaceList( const QStringList & scope ) +TQValueList<Tag> CodeInformationRepository::getClassOrNamespaceList( const TQStringList & scope ) { kdDebug( 9007 ) << "CodeInformationRepository::getClassOrNamespaceList()" << endl; - QValueList<Tag> tags; - QValueList<Catalog::QueryArgument> args; + TQValueList<Tag> tags; + TQValueList<Catalog::QueryArgument> args; args << Catalog::QueryArgument( "kind", Tag::Kind_Namespace ) << Catalog::QueryArgument( "scope", scope ); @@ -183,10 +183,10 @@ QValueList<Tag> CodeInformationRepository::getClassOrNamespaceList( const QStrin return tags; } -QValueList<Tag> CodeInformationRepository::getTagsInScope( const QString & name, const QStringList & scope ) +TQValueList<Tag> CodeInformationRepository::getTagsInScope( const TQString & name, const TQStringList & scope ) { - QValueList<Tag> tags; - QValueList<Catalog::QueryArgument> args; + TQValueList<Tag> tags; + TQValueList<Catalog::QueryArgument> args; args.clear(); args << Catalog::QueryArgument( "scope", scope ); @@ -233,8 +233,8 @@ KTextEditor::CompletionEntry CodeInformationRepository::toEntry( Tag & tag, CppC { CppFunction<Tag> 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<KTextEditor :: CompletionEntry> CodeInformationRepository::toEntryList( const QValueList<Tag> & tags, CppCodeCompletion::CompletionMode completionMode ) +TQValueList<KTextEditor :: CompletionEntry> CodeInformationRepository::toEntryList( const TQValueList<Tag> & tags, CppCodeCompletion::CompletionMode completionMode ) { - QValueList<KTextEditor :: CompletionEntry> entryList; - QMap<QString, bool> ns; + TQValueList<KTextEditor :: CompletionEntry> entryList; + TQMap<TQString, bool> ns; - QValueList<Tag>::ConstIterator it = tags.begin(); + TQValueList<Tag>::ConstIterator it = tags.begin(); while ( it != tags.end() ) { Tag tag = *it; |