diff options
Diffstat (limited to 'languages/java/backgroundparser.cpp')
-rw-r--r-- | languages/java/backgroundparser.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/languages/java/backgroundparser.cpp b/languages/java/backgroundparser.cpp index 0820b4d1..e1f058c7 100644 --- a/languages/java/backgroundparser.cpp +++ b/languages/java/backgroundparser.cpp @@ -16,11 +16,7 @@ #include "kdevdeepcopy.h" #include "kdevdriver.h" -#if QT_VERSION < 0x030100 -#include <kdevmutex.h> -#else #include <tqmutex.h> -#endif #include <kparts/part.h> #include <ktexteditor/editinterface.h> @@ -92,7 +88,7 @@ public: return contents; } - return TQString::null; + return TQString(); } virtual bool isModified( const TQString& fileName ) @@ -126,7 +122,7 @@ public: return m_fileList.count(); } - QPair<TQString, bool> front() const + TQPair<TQString, bool> front() const { TQMutexLocker locker( &m_mutex ); return m_fileList.front(); @@ -141,7 +137,7 @@ public: void push_back( const TQString& fileName, bool readFromDisk=false ) { TQMutexLocker locker( &m_mutex ); - m_fileList.append( qMakePair(fileName, readFromDisk) ); /// \FIXME ROBE deepcopy?! + m_fileList.append( tqMakePair(fileName, readFromDisk) ); /// \FIXME ROBE deepcopy?! } void pop_front() @@ -150,10 +146,10 @@ public: m_fileList.pop_front(); } - bool contains( const TQString& fileName ) const + bool tqcontains( const TQString& fileName ) const { TQMutexLocker locker( &m_mutex ); - TQValueList< QPair<TQString, bool> >::ConstIterator it = m_fileList.begin(); + TQValueList< TQPair<TQString, bool> >::ConstIterator it = m_fileList.begin(); while( it != m_fileList.end() ){ if( (*it).first == fileName ) return true; @@ -165,7 +161,7 @@ public: void remove( const TQString& fileName ) { TQMutexLocker locker( &m_mutex ); - TQValueList< QPair<TQString, bool> >::Iterator it = m_fileList.begin(); + TQValueList< TQPair<TQString, bool> >::Iterator it = m_fileList.begin(); while( it != m_fileList.end() ){ if( (*it).first == fileName ) m_fileList.remove( it ); @@ -175,7 +171,7 @@ public: private: mutable TQMutex m_mutex; - TQValueList< QPair<TQString, bool> > m_fileList; + TQValueList< TQPair<TQString, bool> > m_fileList; }; BackgroundParser::BackgroundParser( JavaSupportPart* part, TQWaitCondition* consumed ) @@ -203,7 +199,7 @@ void BackgroundParser::addFile( const TQString& fileName, bool readFromDisk ) TQString fn = deepCopy( fileName ); bool added = false; - if( !m_fileList->contains(fn) ){ + if( !m_fileList->tqcontains(fn) ){ m_fileList->push_back( fn, readFromDisk ); added = true; } @@ -261,7 +257,7 @@ Unit* BackgroundParser::parseFile( const TQString& fileName, bool readFromDisk ) static_cast<KDevSourceProvider*>( m_driver->sourceProvider() )->setReadFromDisk( false ); - if( m_unitDict.find(fileName) != m_unitDict.end() ){ + if( m_unitDict.tqfind(fileName) != m_unitDict.end() ){ Unit* u = m_unitDict[ fileName ]; m_unitDict.remove( fileName ); delete( u ); @@ -270,13 +266,13 @@ Unit* BackgroundParser::parseFile( const TQString& fileName, bool readFromDisk ) m_unitDict.insert( fileName, unit ); - if( m_fileList->contains(fileName) ){ - kdDebug(9013) << "========================> FILE: " << fileName << " IN QUEUE <=============" << endl; + if( m_fileList->tqcontains(fileName) ){ + kdDebug(9013) << "========================> FILE: " << fileName << " IN TQUEUE <=============" << endl; } else { KApplication::postEvent( m_javaSupport, new FileParsedEvent(fileName, unit->problems) ); } - m_currentFile = TQString::null; + m_currentFile = TQString(); if( m_fileList->isEmpty() ) m_isEmpty.wakeAll(); @@ -286,7 +282,7 @@ Unit* BackgroundParser::parseFile( const TQString& fileName, bool readFromDisk ) Unit* BackgroundParser::findUnit( const TQString& fileName ) { - TQMap<TQString, Unit*>::Iterator it = m_unitDict.find( fileName ); + TQMap<TQString, Unit*>::Iterator it = m_unitDict.tqfind( fileName ); return it != m_unitDict.end() ? *it : 0; } @@ -346,7 +342,7 @@ void BackgroundParser::run() break; } - QPair<TQString, bool> entry = m_fileList->front(); + TQPair<TQString, bool> entry = m_fileList->front(); TQString fileName = entry.first; bool readFromDisk = entry.second; m_currentFile = fileName; |