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/kdevdriver.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/kdevdriver.cpp')
-rw-r--r-- | languages/cpp/kdevdriver.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/languages/cpp/kdevdriver.cpp b/languages/cpp/kdevdriver.cpp index 53cf413e..f240ed36 100644 --- a/languages/cpp/kdevdriver.cpp +++ b/languages/cpp/kdevdriver.cpp @@ -24,18 +24,18 @@ CppSupportPart* KDevDriver::cppSupport() { return m_cppSupport; } void KDevDriver::setupProject() { - QMap<QString, bool> map; + TQMap<TQString, bool> map; - QStringList fileList = m_cppSupport->project() ->allFiles(); - QStringList::ConstIterator it = fileList.begin(); + TQStringList fileList = m_cppSupport->project() ->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); while ( it != fileList.end() ) { - QFileInfo info( *it ); + TQFileInfo info( *it ); ++it; map.insert( info.dirPath( true ), true ); } - QMap<QString, bool>::Iterator mapit = map.begin(); + TQMap<TQString, bool>::Iterator mapit = map.begin(); while ( mapit != map.end() ) { addIncludePath( mapit.key() ); @@ -61,16 +61,16 @@ void KDevDriver::setup() addMacro( Macro("KDEVELOP_PARSER", "3.4") ); bool ok; - QString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); - QStringList verboseGccLines = QStringList::split( '\n', verboseGccOutput ); + TQString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); + TQStringList verboseGccLines = TQStringList::split( '\n', verboseGccOutput ); if( verboseGccLines.count() > 3 ) { ///Parse the output of gcc. It includes gcc's final include-path when parsing an empty c++-file(including dirs like /usr/include/c++/4.xx/...) //what about order? - for( QStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { + for( TQStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { if( (*it).startsWith(" ") && (*it).length() > 2 && (*it)[1] != ' ' ) { //it is a potential include-file - QString path = (*it).stripWhiteSpace(); - QFileInfo info( path ); + TQString path = (*it).stripWhiteSpace(); + TQFileInfo info( path ); if( info.exists() ) { kdDebug( 9007 ) << "Adding include-path from gcc-output: \"" << path << "\" absolute: \"" << info.absFilePath() << "\"" << endl; addIncludePath(info.absFilePath()); @@ -84,10 +84,10 @@ void KDevDriver::setup() addIncludePath( "/usr/local/include" ); bool ok; - QString includePath = SetupHelper::getGccIncludePath(&ok); + TQString includePath = SetupHelper::getGccIncludePath(&ok); if (ok) { - QStringList ls = QStringList::split( "\n", includePath ); - for( QStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { + TQStringList ls = TQStringList::split( "\n", includePath ); + for( TQStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { if( !(*it).isEmpty() ) addIncludePath( *it ); } @@ -101,15 +101,15 @@ void KDevDriver::setup() addMacro( Macro( "__cplusplus", "1" ) ); ///@todo maybe remove the following? Is there any normal user who has his environment set up correctly so this is of any use? - QString kdedir = getenv( "KDEDIR" ); + TQString kdedir = getenv( "KDEDIR" ); if( !kdedir.isNull() ) addIncludePath( kdedir + "/include" ); - QString qmakespec = getenv( "QMAKESPEC" ); + TQString qmakespec = getenv( "QMAKESPEC" ); if ( qmakespec.isNull() ) qmakespec = "linux-g++"; - QString qtdir = getenv( "QTDIR" ); + TQString qtdir = getenv( "QTDIR" ); if( !qtdir.isNull() ) { addIncludePath( qtdir + "/include" ); @@ -119,10 +119,10 @@ void KDevDriver::setup() addIncludePath( qtdir + "/mkspecs/" + qmakespec ); } - QStringList lines = SetupHelper::getGccMacros(&ok); + TQStringList lines = SetupHelper::getGccMacros(&ok); if (!ok) { - for (QStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { - QStringList lst = QStringList::split( ' ', *it ); + for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { + TQStringList lst = TQStringList::split( ' ', *it ); if ( lst.count() != 3 ) continue; addMacro( Macro( lst[1], lst[2] ) ); @@ -135,7 +135,7 @@ void KDevDriver::setup() addMacro( Macro( "Q_SCRIPTABLE", "" ) ); CppCodeCompletionConfig* cfg = m_cppSupport->codeCompletionConfig(); - QString str = cfg->customIncludePaths(); + TQString str = cfg->customIncludePaths(); int pos = 0; while( pos < str.length() ) { int end = str.find( ';', pos ); @@ -143,7 +143,7 @@ void KDevDriver::setup() end = str.length(); } - QString s = str.mid( pos, end-pos ).stripWhiteSpace(); + TQString s = str.mid( pos, end-pos ).stripWhiteSpace(); if( !s.isEmpty() ) { if( !s.startsWith( "/" ) && m_cppSupport->project() ) { s = m_cppSupport->project()->projectDirectory() + "/" + s; @@ -167,7 +167,7 @@ void KDevDriver::setup() m_shouldParseIncludedFiles = cfg->parseMissingHeaders(); } -QStringList KDevDriver::getCustomIncludePath( const QString& file ) { +TQStringList KDevDriver::getCustomIncludePath( const TQString& file ) { if( !file.startsWith("/") ) kdDebug( 9007 ) << "KDevDriver::getCustomIncludePath(..): given file \"" << file << "\" is not absolute" << endl; if( !m_includePathResolver ) @@ -184,7 +184,7 @@ QStringList KDevDriver::getCustomIncludePath( const QString& file ) { } bool KDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { - QString compoundString = file->fileName() + "||" + QString("%1").arg(file->usedMacros().valueHash()) + "||" + QString("%1").arg(file->usedMacros().idHash()); + TQString compoundString = file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()); if( !m_shouldParseIncludedFiles ) return false; |