diff options
Diffstat (limited to 'languages/java')
-rw-r--r-- | languages/java/JavaLexer.hpp | 10 | ||||
-rw-r--r-- | languages/java/JavaRecognizer.hpp | 10 | ||||
-rw-r--r-- | languages/java/JavaStoreWalker.cpp | 80 | ||||
-rw-r--r-- | languages/java/JavaStoreWalker.hpp | 32 | ||||
-rw-r--r-- | languages/java/KDevJavaSupportIface.cpp | 2 | ||||
-rw-r--r-- | languages/java/KDevJavaSupportIface.h | 4 | ||||
-rw-r--r-- | languages/java/backgroundparser.cpp | 98 | ||||
-rw-r--r-- | languages/java/backgroundparser.h | 44 | ||||
-rw-r--r-- | languages/java/driver.cpp | 56 | ||||
-rw-r--r-- | languages/java/driver.h | 50 | ||||
-rw-r--r-- | languages/java/javasupport_events.h | 22 | ||||
-rw-r--r-- | languages/java/javasupport_utils.cpp | 18 | ||||
-rw-r--r-- | languages/java/javasupport_utils.h | 4 | ||||
-rw-r--r-- | languages/java/javasupportpart.cpp | 284 | ||||
-rw-r--r-- | languages/java/javasupportpart.h | 64 | ||||
-rw-r--r-- | languages/java/kdevdeepcopy.h | 8 | ||||
-rw-r--r-- | languages/java/kdevdriver.cpp | 12 | ||||
-rw-r--r-- | languages/java/problemreporter.cpp | 88 | ||||
-rw-r--r-- | languages/java/problemreporter.h | 18 |
19 files changed, 452 insertions, 452 deletions
diff --git a/languages/java/JavaLexer.hpp b/languages/java/JavaLexer.hpp index a46022cd..9d185686 100644 --- a/languages/java/JavaLexer.hpp +++ b/languages/java/JavaLexer.hpp @@ -6,7 +6,7 @@ #include "driver.h" #include "JavaAST.hpp" - #include <qlistview.h> + #include <tqlistview.h> #include <kdebug.h> #define SET_POSITION(ast,t)\ @@ -32,18 +32,18 @@ private: public: void setDriver( Driver* d ) { m_driver = d; } - void setFileName( const QString& fileName ) { m_driver->currentFileName() = fileName; } + void setFileName( const TQString& fileName ) { m_driver->currentFileName() = fileName; } virtual void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(ex.getMessage().c_str()), ex.getLine(), ex.getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(ex.getMessage().c_str()), ex.getLine(), ex.getColumn()) ); } virtual void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(errorMessage.c_str()), getLine(), getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(errorMessage.c_str()), getLine(), getColumn()) ); } virtual void reportWarning( const ANTLR_USE_NAMESPACE(std)string& warnMessage ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(warnMessage.c_str()), getLine(), getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(warnMessage.c_str()), getLine(), getColumn()) ); } #line 30 "JavaLexer.hpp" private: diff --git a/languages/java/JavaRecognizer.hpp b/languages/java/JavaRecognizer.hpp index e9e426b7..fab59972 100644 --- a/languages/java/JavaRecognizer.hpp +++ b/languages/java/JavaRecognizer.hpp @@ -6,7 +6,7 @@ #include "driver.h" #include "JavaAST.hpp" - #include <qlistview.h> + #include <tqlistview.h> #include <kdebug.h> #define SET_POSITION(ast,t)\ @@ -144,18 +144,18 @@ private: public: void setDriver( Driver* d ) { m_driver = d; } - void setFileName( const QString& fileName ) { m_driver->currentFileName() = fileName; } + void setFileName( const TQString& fileName ) { m_driver->currentFileName() = fileName; } void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(ex.getMessage().c_str()), ex.getLine(), ex.getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(ex.getMessage().c_str()), ex.getLine(), ex.getColumn()) ); } void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(errorMessage.c_str()), LT(1)->getLine(), LT(1)->getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(errorMessage.c_str()), LT(1)->getLine(), LT(1)->getColumn()) ); } void reportMessage( const ANTLR_USE_NAMESPACE(std)string& message ){ - m_driver->addProblem( m_driver->currentFileName(), Problem( QString::fromLocal8Bit(message.c_str()), LT(1)->getLine(), LT(1)->getColumn()) ); + m_driver->addProblem( m_driver->currentFileName(), Problem( TQString::fromLocal8Bit(message.c_str()), LT(1)->getLine(), LT(1)->getColumn()) ); } #line 142 "JavaRecognizer.hpp" public: diff --git a/languages/java/JavaStoreWalker.cpp b/languages/java/JavaStoreWalker.cpp index b442aafd..1bdb9522 100644 --- a/languages/java/JavaStoreWalker.cpp +++ b/languages/java/JavaStoreWalker.cpp @@ -15,7 +15,7 @@ JavaStoreWalker::JavaStoreWalker() void JavaStoreWalker::compilationUnit(RefJavaAST _t) { RefJavaAST compilationUnit_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 75 "java.store.g" - QString package; QString imp; QStringList imports; + TQString package; TQString imp; TQStringList imports; #line 20 "JavaStoreWalker.cpp" try { // for error handling @@ -87,9 +87,9 @@ void JavaStoreWalker::compilationUnit(RefJavaAST _t) { _retTree = _t; } - QString JavaStoreWalker::packageDefinition(RefJavaAST _t) { + TQString JavaStoreWalker::packageDefinition(RefJavaAST _t) { #line 82 "java.store.g" - QString id ; + TQString id ; #line 94 "JavaStoreWalker.cpp" RefJavaAST packageDefinition_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -112,9 +112,9 @@ void JavaStoreWalker::compilationUnit(RefJavaAST _t) { return id ; } - QString JavaStoreWalker::importDefinition(RefJavaAST _t) { + TQString JavaStoreWalker::importDefinition(RefJavaAST _t) { #line 86 "java.store.g" - QString id ; + TQString id ; #line 119 "JavaStoreWalker.cpp" RefJavaAST importDefinition_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -140,7 +140,7 @@ void JavaStoreWalker::compilationUnit(RefJavaAST _t) { void JavaStoreWalker::typeDefinition(RefJavaAST _t) { RefJavaAST typeDefinition_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 90 "java.store.g" - QStringList bases; QString className; ClassDom klass; QStringList m; + TQStringList bases; TQString className; ClassDom klass; TQStringList m; #line 145 "JavaStoreWalker.cpp" try { // for error handling @@ -161,8 +161,8 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { #line 92 "java.store.g" klass = m_model->create<ClassModel>(); - QString name = QString::fromUtf8( tmp4_AST_in->getText().c_str(), tmp4_AST_in->getText().length() ); - QStringList path = QStringList::split( ".", name ); + TQString name = TQString::fromUtf8( tmp4_AST_in->getText().c_str(), tmp4_AST_in->getText().length() ); + TQStringList path = TQStringList::split( ".", name ); className = path.back(); klass->setName( path.back() ); @@ -181,7 +181,7 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { _t = _retTree; #line 110 "java.store.g" - for( QStringList::Iterator it = bases.begin(); it != bases.end(); ++it ) + for( TQStringList::Iterator it = bases.begin(); it != bases.end(); ++it ) klass->addBaseClass( *it ); #line 188 "JavaStoreWalker.cpp" @@ -219,8 +219,8 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { #line 126 "java.store.g" klass = m_model->create<ClassModel>(); - QString name = QString::fromUtf8( tmp6_AST_in->getText().c_str(), tmp6_AST_in->getText().length() ); - QStringList path = QStringList::split( ".", name ); + TQString name = TQString::fromUtf8( tmp6_AST_in->getText().c_str(), tmp6_AST_in->getText().length() ); + TQStringList path = TQStringList::split( ".", name ); className = path.back(); klass->setName( path.back() ); @@ -270,9 +270,9 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { _retTree = _t; } - QString JavaStoreWalker::identifier(RefJavaAST _t) { + TQString JavaStoreWalker::identifier(RefJavaAST _t) { #line 363 "java.store.g" - QString id ; + TQString id ; #line 277 "JavaStoreWalker.cpp" RefJavaAST identifier_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -307,7 +307,7 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { _t = _t->getNextSibling(); #line 367 "java.store.g" - id += QString(".") + tmp9_AST_in->getText().c_str(); + id += TQString(".") + tmp9_AST_in->getText().c_str(); #line 313 "JavaStoreWalker.cpp" break; @@ -327,9 +327,9 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { return id ; } - QString JavaStoreWalker::identifierStar(RefJavaAST _t) { + TQString JavaStoreWalker::identifierStar(RefJavaAST _t) { #line 372 "java.store.g" - QString id ; + TQString id ; #line 334 "JavaStoreWalker.cpp" RefJavaAST identifierStar_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -367,7 +367,7 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { match(ANTLR_USE_NAMESPACE(antlr)RefAST(_t),STAR); _t = _t->getNextSibling(); #line 376 "java.store.g" - id += QString(".") + tmp12_AST_in->getText().c_str(); + id += TQString(".") + tmp12_AST_in->getText().c_str(); #line 372 "JavaStoreWalker.cpp" break; } @@ -377,7 +377,7 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { match(ANTLR_USE_NAMESPACE(antlr)RefAST(_t),IDENT); _t = _t->getNextSibling(); #line 377 "java.store.g" - id += QString(".") + tmp13_AST_in->getText().c_str(); + id += TQString(".") + tmp13_AST_in->getText().c_str(); #line 382 "JavaStoreWalker.cpp" break; } @@ -406,9 +406,9 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { return id ; } - QStringList JavaStoreWalker::modifiers(RefJavaAST _t) { + TQStringList JavaStoreWalker::modifiers(RefJavaAST _t) { #line 183 "java.store.g" - QStringList l ; + TQStringList l ; #line 413 "JavaStoreWalker.cpp" RefJavaAST modifiers_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; RefJavaAST m = RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST); @@ -449,13 +449,13 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { return l ; } - QStringList JavaStoreWalker::extendsClause(RefJavaAST _t) { + TQStringList JavaStoreWalker::extendsClause(RefJavaAST _t) { #line 202 "java.store.g" - QStringList l ; + TQStringList l ; #line 456 "JavaStoreWalker.cpp" RefJavaAST extendsClause_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 202 "java.store.g" - QString id; + TQString id; #line 460 "JavaStoreWalker.cpp" try { // for error handling @@ -493,13 +493,13 @@ void JavaStoreWalker::typeDefinition(RefJavaAST _t) { return l ; } - QStringList JavaStoreWalker::implementsClause(RefJavaAST _t) { + TQStringList JavaStoreWalker::implementsClause(RefJavaAST _t) { #line 206 "java.store.g" - QStringList l ; + TQStringList l ; #line 500 "JavaStoreWalker.cpp" RefJavaAST implementsClause_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 206 "java.store.g" - QString id; + TQString id; #line 504 "JavaStoreWalker.cpp" try { // for error handling @@ -695,9 +695,9 @@ void JavaStoreWalker::interfaceBlock(RefJavaAST _t, _retTree = _t; } - QString JavaStoreWalker::typeSpec(RefJavaAST _t) { + TQString JavaStoreWalker::typeSpec(RefJavaAST _t) { #line 157 "java.store.g" - QString tp ; + TQString tp ; #line 702 "JavaStoreWalker.cpp" RefJavaAST typeSpec_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -720,9 +720,9 @@ void JavaStoreWalker::interfaceBlock(RefJavaAST _t, return tp ; } - QString JavaStoreWalker::typeSpecArray(RefJavaAST _t) { + TQString JavaStoreWalker::typeSpecArray(RefJavaAST _t) { #line 161 "java.store.g" - QString tp ; + TQString tp ; #line 727 "JavaStoreWalker.cpp" RefJavaAST typeSpecArray_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; @@ -776,9 +776,9 @@ void JavaStoreWalker::interfaceBlock(RefJavaAST _t, return tp ; } - QString JavaStoreWalker::type(RefJavaAST _t) { + TQString JavaStoreWalker::type(RefJavaAST _t) { #line 166 "java.store.g" - QString tp ; + TQString tp ; #line 783 "JavaStoreWalker.cpp" RefJavaAST type_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; RefJavaAST b = RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST); @@ -1023,8 +1023,8 @@ void JavaStoreWalker::modifier(RefJavaAST _t) { RefJavaAST methodDecl_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 257 "java.store.g" - QStringList m; - QString tp; + TQStringList m; + TQString tp; meth = m_model->create<FunctionModel>(); meth->setFileName( m_file->name() ); @@ -1071,8 +1071,8 @@ void JavaStoreWalker::modifier(RefJavaAST _t) { RefJavaAST variableDef_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 293 "java.store.g" - QStringList m; - QString tp; + TQStringList m; + TQString tp; attr = m_model->create<VariableModel>(); attr->setFileName( m_file->name() ); @@ -1123,7 +1123,7 @@ void JavaStoreWalker::modifier(RefJavaAST _t) { RefJavaAST ctorDef_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 239 "java.store.g" - QStringList m; + TQStringList m; meth = m_model->create<FunctionModel>(); meth->setFileName( m_file->name() ); @@ -1169,8 +1169,8 @@ void JavaStoreWalker::modifier(RefJavaAST _t) { RefJavaAST methodDef_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 275 "java.store.g" - QStringList m; - QString tp; + TQStringList m; + TQString tp; meth = m_model->create<FunctionModel>(); meth->setFileName( m_file->name() ); @@ -1426,7 +1426,7 @@ void JavaStoreWalker::varInitializer(RefJavaAST _t) { RefJavaAST parameterDef_AST_in = (_t == RefJavaAST(ASTNULL)) ? RefJavaAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t; #line 313 "java.store.g" - QString tp; + TQString tp; arg = m_model->create<ArgumentModel>(); #line 1433 "JavaStoreWalker.cpp" diff --git a/languages/java/JavaStoreWalker.hpp b/languages/java/JavaStoreWalker.hpp index ed43efcc..676163ad 100644 --- a/languages/java/JavaStoreWalker.hpp +++ b/languages/java/JavaStoreWalker.hpp @@ -6,10 +6,10 @@ #include <codemodel.h> #include "JavaAST.hpp" - #include <qstring.h> - #include <qstringlist.h> - #include <qvaluestack.h> - #include <qfileinfo.h> + #include <tqstring.h> + #include <tqstringlist.h> + #include <tqvaluestack.h> + #include <tqfileinfo.h> #line 15 "JavaStoreWalker.hpp" #include <antlr/config.hpp> @@ -42,10 +42,10 @@ class CUSTOM_API JavaStoreWalker : public ANTLR_USE_NAMESPACE(antlr)TreeParser, #line 43 "java.store.g" private: - QStringList m_currentScope; + TQStringList m_currentScope; CodeModel* m_model; FileDom m_file; - QValueStack<ClassDom> m_currentClass; + TQValueStack<ClassDom> m_currentClass; int m_currentAccess; int m_anon; ANTLR_USE_NAMESPACE(antlr)JavaASTFactory ast_factory; @@ -88,23 +88,23 @@ public: return JavaStoreWalker::tokenNames; } public: void compilationUnit(RefJavaAST _t); - public: QString packageDefinition(RefJavaAST _t); - public: QString importDefinition(RefJavaAST _t); + public: TQString packageDefinition(RefJavaAST _t); + public: TQString importDefinition(RefJavaAST _t); public: void typeDefinition(RefJavaAST _t); - public: QString identifier(RefJavaAST _t); - public: QString identifierStar(RefJavaAST _t); - public: QStringList modifiers(RefJavaAST _t); - public: QStringList extendsClause(RefJavaAST _t); - public: QStringList implementsClause(RefJavaAST _t); + public: TQString identifier(RefJavaAST _t); + public: TQString identifierStar(RefJavaAST _t); + public: TQStringList modifiers(RefJavaAST _t); + public: TQStringList extendsClause(RefJavaAST _t); + public: TQStringList implementsClause(RefJavaAST _t); public: void objBlock(RefJavaAST _t, ClassDom klass ); public: void interfaceBlock(RefJavaAST _t, ClassDom klass ); - public: QString typeSpec(RefJavaAST _t); - public: QString typeSpecArray(RefJavaAST _t); - public: QString type(RefJavaAST _t); + public: TQString typeSpec(RefJavaAST _t); + public: TQString typeSpecArray(RefJavaAST _t); + public: TQString type(RefJavaAST _t); public: void builtInType(RefJavaAST _t); public: void modifier(RefJavaAST _t); public: FunctionDom methodDecl(RefJavaAST _t); diff --git a/languages/java/KDevJavaSupportIface.cpp b/languages/java/KDevJavaSupportIface.cpp index 306ad76e..b1225700 100644 --- a/languages/java/KDevJavaSupportIface.cpp +++ b/languages/java/KDevJavaSupportIface.cpp @@ -3,7 +3,7 @@ #include "javasupportpart.h" KDevJavaSupportIface::KDevJavaSupportIface( JavaSupportPart* javaSupport ) - : QObject( javaSupport ), DCOPObject( "KDevJavaSupport" ), m_javaSupport( javaSupport ) + : TQObject( javaSupport ), DCOPObject( "KDevJavaSupport" ), m_javaSupport( javaSupport ) { } diff --git a/languages/java/KDevJavaSupportIface.h b/languages/java/KDevJavaSupportIface.h index e0dce53f..ae5ee39f 100644 --- a/languages/java/KDevJavaSupportIface.h +++ b/languages/java/KDevJavaSupportIface.h @@ -2,12 +2,12 @@ #ifndef KDEVJAVASUPPORTIFACE_H #define KDEVJAVASUPPORTIFACE_H -#include <qobject.h> +#include <tqobject.h> #include <dcopobject.h> class JavaSupportPart; -class KDevJavaSupportIface : public QObject, public DCOPObject +class KDevJavaSupportIface : public TQObject, public DCOPObject { Q_OBJECT K_DCOP diff --git a/languages/java/backgroundparser.cpp b/languages/java/backgroundparser.cpp index 4081949c..0820b4d1 100644 --- a/languages/java/backgroundparser.cpp +++ b/languages/java/backgroundparser.cpp @@ -19,7 +19,7 @@ #if QT_VERSION < 0x030100 #include <kdevmutex.h> #else -#include <qmutex.h> +#include <tqmutex.h> #endif #include <kparts/part.h> @@ -34,9 +34,9 @@ #include <kdebug.h> #include <kapplication.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> class KDevSourceProvider: public SourceProvider { @@ -48,7 +48,7 @@ public: void setReadFromDisk( bool b ) { m_readFromDisk = b; } bool readFromDisk() const { return m_readFromDisk; } - virtual QString contents( const QString& fileName ) + virtual TQString contents( const TQString& fileName ) { if( !m_readFromDisk ){ //kdDebug(9013) << "-------> kapp is locked = " << kapp->locked() << endl; @@ -59,8 +59,8 @@ public: //kdDebug(9013) << "-------> kapp locked" << endl; - QPtrList<KParts::Part> parts( *m_javaSupport->partController()->parts() ); - QPtrListIterator<KParts::Part> it( parts ); + TQPtrList<KParts::Part> parts( *m_javaSupport->partController()->parts() ); + TQPtrListIterator<KParts::Part> it( parts ); while( it.current() ){ KTextEditor::Document* doc = dynamic_cast<KTextEditor::Document*>( it.current() ); ++it; @@ -69,7 +69,7 @@ public: if( !doc || !editIface || doc->url().path() != fileName ) continue; - QString contents = QString( editIface->text().ascii() ); // deep copy + TQString contents = TQString( editIface->text().ascii() ); // deep copy if( needToLock ) kapp->unlock(); @@ -84,18 +84,18 @@ public: //kdDebug(9013) << "-------> kapp unlocked" << endl; } - QFile f( fileName ); - QTextStream stream( &f ); + TQFile f( fileName ); + TQTextStream stream( &f ); if( f.open(IO_ReadOnly) ){ - QString contents = stream.read(); + TQString contents = stream.read(); f.close(); return contents; } - return QString::null; + return TQString::null; } - virtual bool isModified( const QString& fileName ) + virtual bool isModified( const TQString& fileName ) { Q_UNUSED( fileName ); return true; @@ -116,44 +116,44 @@ public: bool isEmpty() const { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); return m_fileList.isEmpty(); } uint count() const { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); return m_fileList.count(); } - QPair<QString, bool> front() const + QPair<TQString, bool> front() const { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); return m_fileList.front(); } void clear() { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); m_fileList.clear(); } - void push_back( const QString& fileName, bool readFromDisk=false ) + void push_back( const TQString& fileName, bool readFromDisk=false ) { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); m_fileList.append( qMakePair(fileName, readFromDisk) ); /// \FIXME ROBE deepcopy?! } void pop_front() { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); m_fileList.pop_front(); } - bool contains( const QString& fileName ) const + bool contains( const TQString& fileName ) const { - QMutexLocker locker( &m_mutex ); - QValueList< QPair<QString, bool> >::ConstIterator it = m_fileList.begin(); + TQMutexLocker locker( &m_mutex ); + TQValueList< QPair<TQString, bool> >::ConstIterator it = m_fileList.begin(); while( it != m_fileList.end() ){ if( (*it).first == fileName ) return true; @@ -162,10 +162,10 @@ public: return false; } - void remove( const QString& fileName ) + void remove( const TQString& fileName ) { - QMutexLocker locker( &m_mutex ); - QValueList< QPair<QString, bool> >::Iterator it = m_fileList.begin(); + TQMutexLocker locker( &m_mutex ); + TQValueList< QPair<TQString, bool> >::Iterator it = m_fileList.begin(); while( it != m_fileList.end() ){ if( (*it).first == fileName ) m_fileList.remove( it ); @@ -174,11 +174,11 @@ public: } private: - mutable QMutex m_mutex; - QValueList< QPair<QString, bool> > m_fileList; + mutable TQMutex m_mutex; + TQValueList< QPair<TQString, bool> > m_fileList; }; -BackgroundParser::BackgroundParser( JavaSupportPart* part, QWaitCondition* consumed ) +BackgroundParser::BackgroundParser( JavaSupportPart* part, TQWaitCondition* consumed ) : m_consumed( consumed ), m_javaSupport( part ), m_close( false ) { m_fileList = new SynchronizedFileList(); @@ -198,9 +198,9 @@ BackgroundParser::~BackgroundParser() m_fileList = 0; } -void BackgroundParser::addFile( const QString& fileName, bool readFromDisk ) +void BackgroundParser::addFile( const TQString& fileName, bool readFromDisk ) { - QString fn = deepCopy( fileName ); + TQString fn = deepCopy( fileName ); bool added = false; if( !m_fileList->contains(fn) ){ @@ -215,9 +215,9 @@ void BackgroundParser::addFile( const QString& fileName, bool readFromDisk ) void BackgroundParser::removeAllFiles() { kdDebug(9013) << "BackgroundParser::removeAllFiles()" << endl; - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); - QMap<QString, Unit*>::Iterator it = m_unitDict.begin(); + TQMap<TQString, Unit*>::Iterator it = m_unitDict.begin(); while( it != m_unitDict.end() ){ Unit* unit = it.data(); ++it; @@ -231,9 +231,9 @@ void BackgroundParser::removeAllFiles() m_isEmpty.wakeAll(); } -void BackgroundParser::removeFile( const QString& fileName ) +void BackgroundParser::removeFile( const TQString& fileName ) { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); if( Unit* unit = findUnit(fileName) ){ m_driver->remove( fileName ); @@ -246,7 +246,7 @@ void BackgroundParser::removeFile( const QString& fileName ) m_isEmpty.wakeAll(); } -Unit* BackgroundParser::parseFile( const QString& fileName, bool readFromDisk ) +Unit* BackgroundParser::parseFile( const TQString& fileName, bool readFromDisk ) { static_cast<KDevSourceProvider*>( m_driver->sourceProvider() )->setReadFromDisk( readFromDisk ); @@ -276,7 +276,7 @@ Unit* BackgroundParser::parseFile( const QString& fileName, bool readFromDisk ) KApplication::postEvent( m_javaSupport, new FileParsedEvent(fileName, unit->problems) ); } - m_currentFile = QString::null; + m_currentFile = TQString::null; if( m_fileList->isEmpty() ) m_isEmpty.wakeAll(); @@ -284,13 +284,13 @@ Unit* BackgroundParser::parseFile( const QString& fileName, bool readFromDisk ) return unit; } -Unit* BackgroundParser::findUnit( const QString& fileName ) +Unit* BackgroundParser::findUnit( const TQString& fileName ) { - QMap<QString, Unit*>::Iterator it = m_unitDict.find( fileName ); + TQMap<TQString, Unit*>::Iterator it = m_unitDict.find( fileName ); return it != m_unitDict.end() ? *it : 0; } -RefJavaAST BackgroundParser::translationUnit( const QString& fileName ) +RefJavaAST BackgroundParser::translationUnit( const TQString& fileName ) { Unit* u = 0; if( (u = findUnit(fileName)) == 0 ){ @@ -301,7 +301,7 @@ RefJavaAST BackgroundParser::translationUnit( const QString& fileName ) return u->translationUnit; } -QValueList<Problem> BackgroundParser::problems( const QString& fileName ) +TQValueList<Problem> BackgroundParser::problems( const TQString& fileName ) { Unit* u = 0; if( (u = findUnit(fileName)) == 0 ){ @@ -309,26 +309,26 @@ QValueList<Problem> BackgroundParser::problems( const QString& fileName ) u = parseFile( fileName, false ); } - return u ? u->problems : QValueList<Problem>(); + return u ? u->problems : TQValueList<Problem>(); } void BackgroundParser::close() { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); m_close = true; m_canParse.wakeAll(); } bool BackgroundParser::filesInQueue() { - QMutexLocker locker( &m_mutex ); + TQMutexLocker locker( &m_mutex ); return m_fileList->count() || !m_currentFile.isEmpty(); } void BackgroundParser::run() { - // (void) m_javaSupport->codeCompletion()->repository()->getEntriesInScope( QStringList(), false ); + // (void) m_javaSupport->codeCompletion()->repository()->getEntriesInScope( TQStringList(), false ); while( !m_close ){ @@ -346,8 +346,8 @@ void BackgroundParser::run() break; } - QPair<QString, bool> entry = m_fileList->front(); - QString fileName = entry.first; + QPair<TQString, bool> entry = m_fileList->front(); + TQString fileName = entry.first; bool readFromDisk = entry.second; m_currentFile = fileName; m_fileList->pop_front(); @@ -359,5 +359,5 @@ void BackgroundParser::run() kdDebug(9013) << "!!!!!!!!!!!!!!!!!! BG PARSER DESTROYED !!!!!!!!!!!!" << endl; //commented to fix #83352 - //QThread::exit(); + //TQThread::exit(); } diff --git a/languages/java/backgroundparser.h b/languages/java/backgroundparser.h index 2029ebf5..4cc52f33 100644 --- a/languages/java/backgroundparser.h +++ b/languages/java/backgroundparser.h @@ -15,10 +15,10 @@ #include "driver.h" #include "JavaAST.hpp" -#include <qthread.h> -#include <qwaitcondition.h> -#include <qmutex.h> -#include <qmap.h> +#include <tqthread.h> +#include <tqwaitcondition.h> +#include <tqmutex.h> +#include <tqmap.h> #include <kdebug.h> class JavaSupportPart; @@ -31,8 +31,8 @@ public: Unit() {} ~Unit() {} - QString fileName; - QValueList<Problem> problems; + TQString fileName; + TQValueList<Problem> problems; RefJavaAST translationUnit; protected: @@ -43,44 +43,44 @@ protected: class BackgroundParser: public QThread { public: - BackgroundParser( JavaSupportPart*, QWaitCondition* consumed ); + BackgroundParser( JavaSupportPart*, TQWaitCondition* consumed ); virtual ~BackgroundParser(); - QMutex& mutex() { return m_mutex; } + TQMutex& mutex() { return m_mutex; } void lock() { m_mutex.lock(); } void unlock() { m_mutex.unlock(); } - QWaitCondition& canParse() { return m_canParse; } - QWaitCondition& isEmpty() { return m_isEmpty; } + TQWaitCondition& canParse() { return m_canParse; } + TQWaitCondition& isEmpty() { return m_isEmpty; } bool filesInQueue(); - void addFile( const QString& fileName, bool readFromDisk=false ); - void removeFile( const QString& fileName ); + void addFile( const TQString& fileName, bool readFromDisk=false ); + void removeFile( const TQString& fileName ); void removeAllFiles(); - RefJavaAST translationUnit( const QString& fileName ); - QValueList<Problem> problems( const QString& fileName ); + RefJavaAST translationUnit( const TQString& fileName ); + TQValueList<Problem> problems( const TQString& fileName ); void close(); virtual void run(); protected: - Unit* findUnit( const QString& fileName ); - Unit* parseFile( const QString& fileName, bool readFromDisk ); + Unit* findUnit( const TQString& fileName ); + Unit* parseFile( const TQString& fileName, bool readFromDisk ); private: class KDevDriver* m_driver; - QString m_currentFile; - QWaitCondition m_canParse; - QWaitCondition m_isEmpty; - QWaitCondition* m_consumed; - QMutex m_mutex; + TQString m_currentFile; + TQWaitCondition m_canParse; + TQWaitCondition m_isEmpty; + TQWaitCondition* m_consumed; + TQMutex m_mutex; SynchronizedFileList* m_fileList; JavaSupportPart* m_javaSupport; bool m_close; - QMap<QString, Unit*> m_unitDict; + TQMap<TQString, Unit*> m_unitDict; }; #endif diff --git a/languages/java/driver.cpp b/languages/java/driver.cpp index ee49625d..f856fc74 100644 --- a/languages/java/driver.cpp +++ b/languages/java/driver.cpp @@ -23,9 +23,9 @@ #include <kdebug.h> #include <stdlib.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <string> #include <sstream> @@ -35,20 +35,20 @@ class DefaultSourceProvider: public SourceProvider public: DefaultSourceProvider() {} - virtual QString contents( const QString& fileName ) + virtual TQString contents( const TQString& fileName ) { - QString source; + TQString source; - QFile f( fileName ); + TQFile f( fileName ); if( f.open(IO_ReadOnly) ){ - QTextStream s( &f ); + TQTextStream s( &f ); source = s.read(); f.close(); } return source; } - virtual bool isModified( const QString& fileName ) + virtual bool isModified( const TQString& fileName ) { Q_UNUSED( fileName ); return true; @@ -96,11 +96,11 @@ void Driver::reset( ) } } -void Driver::remove( const QString & fileName ) +void Driver::remove( const TQString & fileName ) { m_problems.remove( fileName ); - QMap<QString, RefJavaAST>::Iterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, RefJavaAST>::Iterator it = m_parsedUnits.find( fileName ); if( it != m_parsedUnits.end() ){ RefJavaAST unit = *it; m_parsedUnits.remove( it ); @@ -108,51 +108,51 @@ void Driver::remove( const QString & fileName ) } } -RefJavaAST Driver::takeTranslationUnit( const QString& fileName ) +RefJavaAST Driver::takeTranslationUnit( const TQString& fileName ) { - QMap<QString, RefJavaAST>::Iterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, RefJavaAST>::Iterator it = m_parsedUnits.find( fileName ); RefJavaAST unit( *it ); //m_parsedUnits.remove( it ); m_parsedUnits[ fileName] = 0; return unit; } -RefJavaAST Driver::translationUnit( const QString& fileName ) const +RefJavaAST Driver::translationUnit( const TQString& fileName ) const { - QMap<QString, RefJavaAST>::ConstIterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, RefJavaAST>::ConstIterator it = m_parsedUnits.find( fileName ); return it != m_parsedUnits.end() ? *it : RefJavaAST(); } -void Driver::addProblem( const QString & fileName, const Problem & problem ) +void Driver::addProblem( const TQString & fileName, const Problem & problem ) { findOrInsertProblemList( fileName ).append( problem ); } -QValueList < Problem >& Driver::findOrInsertProblemList( const QString & fileName ) +TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName ) { - QMap<QString, QValueList<Problem> >::Iterator it = m_problems.find( fileName ); + TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName ); if( it != m_problems.end() ) return it.data(); - QValueList<Problem> l; + TQValueList<Problem> l; m_problems.insert( fileName, l ); return m_problems[ fileName ]; } -QValueList < Problem > Driver::problems( const QString & fileName ) const +TQValueList < Problem > Driver::problems( const TQString & fileName ) const { - QMap<QString, QValueList<Problem> >::ConstIterator it = m_problems.find( fileName ); + TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName ); if( it != m_problems.end() ) return it.data(); - return QValueList<Problem>(); + return TQValueList<Problem>(); } -void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force ) +void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool force ) { - QFileInfo fileInfo( fileName ); - QString absFilePath = fileInfo.absFilePath(); + TQFileInfo fileInfo( fileName ); + TQString absFilePath = fileInfo.absFilePath(); - QMap<QString, RefJavaAST>::Iterator it = m_parsedUnits.find( absFilePath ); + TQMap<TQString, RefJavaAST>::Iterator it = m_parsedUnits.find( absFilePath ); if( force && it != m_parsedUnits.end() ){ takeTranslationUnit( absFilePath ); @@ -199,7 +199,7 @@ void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force } - m_currentFileName = QString::null; + m_currentFileName = TQString::null; lexer = 0; fileParsed( fileName ); @@ -215,13 +215,13 @@ void Driver::setupParser( JavaRecognizer * parser ) Q_UNUSED( parser ); } -void Driver::addIncludePath( const QString &path ) +void Driver::addIncludePath( const TQString &path ) { if( !path.stripWhiteSpace().isEmpty() ) m_includePaths << path; } -void Driver::fileParsed( const QString & fileName ) +void Driver::fileParsed( const TQString & fileName ) { Q_UNUSED( fileName ); } diff --git a/languages/java/driver.h b/languages/java/driver.h index 66813e38..5b8c522a 100644 --- a/languages/java/driver.h +++ b/languages/java/driver.h @@ -22,10 +22,10 @@ #include "JavaAST.hpp" -#include <qpair.h> -#include <qvaluestack.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqpair.h> +#include <tqvaluestack.h> +#include <tqstringlist.h> +#include <tqmap.h> class JavaLexer; class JavaRecognizer; @@ -46,7 +46,7 @@ public: Problem( const Problem& source ) : m_text( source.m_text ), m_line( source.m_line ), m_column( source.m_column ), m_level( source.m_level ) {} - Problem( const QString& text, int line, int column, int level=Level_Error ) + Problem( const TQString& text, int line, int column, int level=Level_Error ) : m_text( text ), m_line( line ), m_column( column ), m_level(level) {} Problem& operator = ( const Problem& source ) @@ -63,13 +63,13 @@ public: return m_text == p.m_text && m_line == p.m_line && m_column == p.m_column && m_level == p.m_level; } - QString text() const { return m_text; } + TQString text() const { return m_text; } int line() const { return m_line; } int column() const { return m_column; } int level() const { return m_level; } private: - QString m_text; + TQString m_text; int m_line; int m_column; int m_level; @@ -81,8 +81,8 @@ public: SourceProvider() {} virtual ~SourceProvider() {} - virtual QString contents( const QString& fileName ) = 0; - virtual bool isModified( const QString& fileName ) = 0; + virtual TQString contents( const TQString& fileName ) = 0; + virtual bool isModified( const TQString& fileName ) = 0; private: SourceProvider( const SourceProvider& source ); @@ -100,34 +100,34 @@ public: virtual void reset(); - virtual void parseFile( const QString& fileName, bool onlyPreProcesss=false, bool force=false ); - virtual void fileParsed( const QString& fileName ); - virtual void remove( const QString& fileName ); + virtual void parseFile( const TQString& fileName, bool onlyPreProcesss=false, bool force=false ); + virtual void fileParsed( const TQString& fileName ); + virtual void remove( const TQString& fileName ); - virtual void addProblem( const QString& fileName, const Problem& problem ); + virtual void addProblem( const TQString& fileName, const Problem& problem ); - QString currentFileName() const { return m_currentFileName; } - RefJavaAST takeTranslationUnit( const QString& fileName ); - RefJavaAST translationUnit( const QString& fileName ) const; - QValueList<Problem> problems( const QString& fileName ) const; + TQString currentFileName() const { return m_currentFileName; } + RefJavaAST takeTranslationUnit( const TQString& fileName ); + RefJavaAST translationUnit( const TQString& fileName ) const; + TQValueList<Problem> problems( const TQString& fileName ) const; - QStringList includePaths() const { return m_includePaths; } - virtual void addIncludePath( const QString &path ); + TQStringList includePaths() const { return m_includePaths; } + virtual void addIncludePath( const TQString &path ); - const QMap<QString, RefJavaAST> &parsedUnits() const { return m_parsedUnits; } + const TQMap<TQString, RefJavaAST> &parsedUnits() const { return m_parsedUnits; } protected: virtual void setupLexer( JavaLexer* lexer ); virtual void setupParser( JavaRecognizer* parser ); private: - QValueList<Problem>& findOrInsertProblemList( const QString& fileName ); + TQValueList<Problem>& findOrInsertProblemList( const TQString& fileName ); private: - QString m_currentFileName; - QMap< QString, QValueList<Problem> > m_problems; - QMap< QString, RefJavaAST > m_parsedUnits; - QStringList m_includePaths; + TQString m_currentFileName; + TQMap< TQString, TQValueList<Problem> > m_problems; + TQMap< TQString, RefJavaAST > m_parsedUnits; + TQStringList m_includePaths; JavaLexer *lexer; SourceProvider* m_sourceProvider; diff --git a/languages/java/javasupport_events.h b/languages/java/javasupport_events.h index c267b8e5..e325e635 100644 --- a/languages/java/javasupport_events.h +++ b/languages/java/javasupport_events.h @@ -15,28 +15,28 @@ #include "driver.h" #include "kdevdeepcopy.h" -#include <qevent.h> -#include <qvaluelist.h> +#include <tqevent.h> +#include <tqvaluelist.h> #if QT_VERSION < 0x030100 #include <kdevmutex.h> #else -#include <qmutex.h> +#include <tqmutex.h> #endif enum { - Event_FileParsed = QEvent::User + 1000 + Event_FileParsed = TQEvent::User + 1000 }; class FileParsedEvent: public QCustomEvent { public: - FileParsedEvent( const QString& fileName, const QValueList<Problem>& problems ) - : QCustomEvent(Event_FileParsed), m_fileName( deepCopy(fileName) ) + FileParsedEvent( const TQString& fileName, const TQValueList<Problem>& problems ) + : TQCustomEvent(Event_FileParsed), m_fileName( deepCopy(fileName) ) { // the members are deep copies - QValueListConstIterator<Problem> it = problems.begin(); + TQValueListConstIterator<Problem> it = problems.begin(); while (it != problems.end()) { Problem p = *it; m_problems.append(Problem(deepCopy(p.text()), p.line(), p.column(), p.level())); @@ -44,12 +44,12 @@ public: } } - QString fileName() const { return m_fileName; } - QValueList<Problem> problems() const { return m_problems; } + TQString fileName() const { return m_fileName; } + TQValueList<Problem> problems() const { return m_problems; } private: - QString m_fileName; - QValueList<Problem> m_problems; + TQString m_fileName; + TQValueList<Problem> m_problems; private: FileParsedEvent( const FileParsedEvent& source ); diff --git a/languages/java/javasupport_utils.cpp b/languages/java/javasupport_utils.cpp index 1fa28b81..f3c00904 100644 --- a/languages/java/javasupport_utils.cpp +++ b/languages/java/javasupport_utils.cpp @@ -2,26 +2,26 @@ #include "javasupport_utils.h" #include <codemodel.h> -static void typeNameList( QStringList& path, QStringList & lst, const CodeModel * model ); -static void typeNameList( QStringList& path, QStringList & lst, NamespaceDom ns ); -static void typeNameList( QStringList & path, QStringList & lst, ClassDom klass ); +static void typeNameList( TQStringList& path, TQStringList & lst, const CodeModel * model ); +static void typeNameList( TQStringList& path, TQStringList & lst, NamespaceDom ns ); +static void typeNameList( TQStringList & path, TQStringList & lst, ClassDom klass ); -QStringList typeNameList( const CodeModel* model ) +TQStringList typeNameList( const CodeModel* model ) { - QStringList lst; - QStringList path; + TQStringList lst; + TQStringList path; typeNameList( path, lst, model ); return lst; } -static void typeNameList( QStringList& path, QStringList & lst, const CodeModel * model ) +static void typeNameList( TQStringList& path, TQStringList & lst, const CodeModel * model ) { const FileList fileList = model->fileList(); for( FileList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it ) typeNameList( path, lst, model_cast<NamespaceDom>(*it) ); } -static void typeNameList( QStringList& path, QStringList & lst, NamespaceDom ns ) +static void typeNameList( TQStringList& path, TQStringList & lst, NamespaceDom ns ) { if( !ns->isFile() ) path.push_back( ns->name() ); @@ -38,7 +38,7 @@ static void typeNameList( QStringList& path, QStringList & lst, NamespaceDom ns path.pop_back(); } -static void typeNameList( QStringList & path, QStringList & lst, ClassDom klass ) +static void typeNameList( TQStringList & path, TQStringList & lst, ClassDom klass ) { path.push_back( klass->name() ); diff --git a/languages/java/javasupport_utils.h b/languages/java/javasupport_utils.h index 12d2fec0..ad380966 100644 --- a/languages/java/javasupport_utils.h +++ b/languages/java/javasupport_utils.h @@ -12,10 +12,10 @@ #ifndef __javasupport_utils_h #define __javasupport_utils_h -#include <qstringlist.h> +#include <tqstringlist.h> class CodeModel; -QStringList typeNameList( const CodeModel* model ); +TQStringList typeNameList( const CodeModel* model ); #endif // __javasupport_utils_h diff --git a/languages/java/javasupportpart.cpp b/languages/java/javasupportpart.cpp index c8122a47..62d4811f 100644 --- a/languages/java/javasupportpart.cpp +++ b/languages/java/javasupportpart.cpp @@ -26,20 +26,20 @@ #include "JavaStoreWalker.hpp" #include "JavaAST.hpp" -#include <qheader.h> -#include <qdir.h> -#include <qdom.h> -#include <qfileinfo.h> -#include <qguardedptr.h> -#include <qpopupmenu.h> -#include <qprogressdialog.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qstatusbar.h> -#include <qprogressbar.h> -#include <qregexp.h> -#include <qlabel.h> -#include <qvbox.h> +#include <tqheader.h> +#include <tqdir.h> +#include <tqdom.h> +#include <tqfileinfo.h> +#include <tqguardedptr.h> +#include <tqpopupmenu.h> +#include <tqprogressdialog.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqstatusbar.h> +#include <tqprogressbar.h> +#include <tqregexp.h> +#include <tqlabel.h> +#include <tqvbox.h> #include <kmessagebox.h> #include <kaction.h> #include <kapplication.h> @@ -85,7 +85,7 @@ public: { } - void fileParsed( const QString& fileName ) + void fileParsed( const TQString& fileName ) { //kdDebug(9013) << "-----> file " << fileName << " parsed!" << endl; RefJavaAST ast = takeTranslationUnit( fileName ); @@ -93,8 +93,8 @@ public: if( javaSupport()->problemReporter() ){ javaSupport()->problemReporter()->removeAllProblems( fileName ); - QValueList<Problem> pl = problems( fileName ); - QValueList<Problem>::ConstIterator it = pl.begin(); + TQValueList<Problem> pl = problems( fileName ); + TQValueList<Problem>::ConstIterator it = pl.begin(); while( it != pl.end() ){ const Problem& p = *it++; javaSupport()->problemReporter()->reportProblem( fileName, p ); @@ -118,7 +118,7 @@ public: } }; -JavaSupportPart::JavaSupportPart(QObject *parent, const char *name, const QStringList &/*args*/) +JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStringList &/*args*/) : KDevLanguageSupport(JavaSupportFactory::info(), parent, name ? name : "KDevJavaSupport"), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_valid( false ) @@ -135,37 +135,37 @@ JavaSupportPart::JavaSupportPart(QObject *parent, const char *name, const QStrin m_backgroundParser = new BackgroundParser( this, &m_eventConsumed ); m_backgroundParser->start(); - connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) ); - connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) ); - connect( partController(), SIGNAL(savedFile(const KURL&)), - this, SLOT(savedFile(const KURL&)) ); - connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); - connect( partController(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(activePartChanged(KParts::Part*))); - connect( partController(), SIGNAL(partRemoved(KParts::Part*)), - this, SLOT(partRemoved(KParts::Part*))); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); + connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); + connect( partController(), TQT_SIGNAL(savedFile(const KURL&)), + this, TQT_SLOT(savedFile(const KURL&)) ); + connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); + connect( partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(activePartChanged(KParts::Part*))); + connect( partController(), TQT_SIGNAL(partRemoved(KParts::Part*)), + this, TQT_SLOT(partRemoved(KParts::Part*))); m_problemReporter = new ProblemReporter( this, 0, "problemReporterWidget" ); m_problemReporter->setIcon( SmallIcon("info") ); mainWindow( )->embedOutputView( m_problemReporter, i18n("Problems"), i18n("Problem reporter")); - connect( core(), SIGNAL(configWidget(KDialogBase*)), - m_problemReporter, SLOT(configWidget(KDialogBase*)) ); - connect( core(), SIGNAL(configWidget(KDialogBase*)), - this, SLOT(configWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), + m_problemReporter, TQT_SLOT(configWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), + this, TQT_SLOT(configWidget(KDialogBase*)) ); KAction *action; action = new KAction(i18n("New Class..."), "classnew", 0, - this, SLOT(slotNewClass()), + this, TQT_SLOT(slotNewClass()), actionCollection(), "project_newclass"); action->setToolTip( i18n("Generate a new class") ); action->setWhatsThis( i18n("<b>New Class</b>Generates a new class.<p>") ); // daniel - connect( core( ), SIGNAL( projectConfigWidget( KDialogBase* ) ), this, - SLOT( projectConfigWidget( KDialogBase* ) ) ); + connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, + TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); new KDevJavaSupportIface( this ); //(void) dcopClient(); @@ -186,7 +186,7 @@ JavaSupportPart::~JavaSupportPart() codeRepository()->setMainCatalog( 0 ); - QPtrListIterator<Catalog> it( m_catalogList ); + TQPtrListIterator<Catalog> it( m_catalogList ); while( Catalog* catalog = it.current() ){ ++it; codeRepository()->unregisterCatalog( catalog ); @@ -198,20 +198,20 @@ JavaSupportPart::~JavaSupportPart() m_problemReporter = 0; } -void JavaSupportPart::customEvent( QCustomEvent* ev ) +void JavaSupportPart::customEvent( TQCustomEvent* ev ) { //kdDebug(9013) << "JavaSupportPart::customEvent()" << endl; if( ev->type() == int(Event_FileParsed) ){ FileParsedEvent* event = (FileParsedEvent*) ev; - QString fileName = event->fileName(); + TQString fileName = event->fileName(); if( m_problemReporter ){ m_problemReporter->removeAllProblems( fileName ); bool hasErrors = false; - QValueList<Problem> problems = event->problems(); - QValueList<Problem>::ConstIterator it = problems.begin(); + TQValueList<Problem> problems = event->problems(); + TQValueList<Problem>::ConstIterator it = problems.begin(); while( it != problems.end() ){ const Problem& p = *it++; if( p.level() == Problem::Level_Error ) @@ -267,12 +267,12 @@ void JavaSupportPart::activePartChanged(KParts::Part *part) m_activeSelection = dynamic_cast<KTextEditor::SelectionInterface*>( part ); m_activeViewCursor = part ? dynamic_cast<KTextEditor::ViewCursorInterface*>( m_activeView ) : 0; - m_activeFileName = QString::null; + m_activeFileName = TQString::null; if (m_activeDocument) { m_activeFileName = URLUtil::canonicalPath( m_activeDocument->url().path() ); - QFileInfo fi( m_activeFileName ); - QString ext = fi.extension(); + TQFileInfo fi( m_activeFileName ); + TQString ext = fi.extension(); if (fileExtensions().contains(ext)) enabled = true; } @@ -288,8 +288,8 @@ void JavaSupportPart::activePartChanged(KParts::Part *part) if( !textHintIface ) return; - connect( view, SIGNAL(needTextHint(int,int,QString&)), - this, SLOT(slotNeedTextHint(int,int,QString&)) ); + connect( view, TQT_SIGNAL(needTextHint(int,int,TQString&)), + this, TQT_SLOT(slotNeedTextHint(int,int,TQString&)) ); textHintIface->enableTextHints( 1000 ); #endif @@ -302,20 +302,20 @@ void JavaSupportPart::projectOpened( ) m_projectDirectory = URLUtil::canonicalPath( project()->projectDirectory() ); - connect( project( ), SIGNAL( addedFilesToProject( const QStringList & ) ), - this, SLOT( addedFilesToProject( const QStringList & ) ) ); - connect( project( ), SIGNAL( removedFilesFromProject( const QStringList &) ), - this, SLOT( removedFilesFromProject( const QStringList & ) ) ); - connect( project( ), SIGNAL( changedFilesInProject( const QStringList & ) ), - this, SLOT( changedFilesInProject( const QStringList & ) ) ); - connect( project(), SIGNAL(projectCompiled()), - this, SLOT(slotProjectCompiled()) ); + connect( project( ), TQT_SIGNAL( addedFilesToProject( const TQStringList & ) ), + this, TQT_SLOT( addedFilesToProject( const TQStringList & ) ) ); + connect( project( ), TQT_SIGNAL( removedFilesFromProject( const TQStringList &) ), + this, TQT_SLOT( removedFilesFromProject( const TQStringList & ) ) ); + connect( project( ), TQT_SIGNAL( changedFilesInProject( const TQStringList & ) ), + this, TQT_SLOT( changedFilesInProject( const TQStringList & ) ) ); + connect( project(), TQT_SIGNAL(projectCompiled()), + this, TQT_SLOT(slotProjectCompiled()) ); m_timestamp.clear(); m_projectClosed = false; - QTimer::singleShot( 500, this, SLOT( initialParse( ) ) ); + TQTimer::singleShot( 500, this, TQT_SLOT( initialParse( ) ) ); } @@ -331,7 +331,7 @@ void JavaSupportPart::projectClosed( ) m_projectClosed = true; } -void JavaSupportPart::contextMenu(QPopupMenu */*popup*/, const Context *context) +void JavaSupportPart::contextMenu(TQPopupMenu */*popup*/, const Context *context) { m_activeClass = 0; m_activeFunction = 0; @@ -350,37 +350,37 @@ void JavaSupportPart::contextMenu(QPopupMenu */*popup*/, const Context *context) } } -void JavaSupportPart::addedFilesToProject(const QStringList &fileList) +void JavaSupportPart::addedFilesToProject(const TQStringList &fileList) { - QStringList files = fileList; + TQStringList files = fileList; - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { - QString path = URLUtil::canonicalPath( m_projectDirectory + "/" + (*it) ); + TQString path = URLUtil::canonicalPath( m_projectDirectory + "/" + (*it) ); maybeParse( path ); emit addedSourceInfo( path ); } } -void JavaSupportPart::removedFilesFromProject(const QStringList &fileList) +void JavaSupportPart::removedFilesFromProject(const TQStringList &fileList) { - for ( QStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) + for ( TQStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) { - QString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); + TQString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); removeWithReferences( path ); m_backgroundParser->removeFile( path ); } } -void JavaSupportPart::changedFilesInProject( const QStringList & fileList ) +void JavaSupportPart::changedFilesInProject( const TQStringList & fileList ) { - QStringList files = fileList; + TQStringList files = fileList; - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { - QString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); + TQString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); maybeParse( path ); emit addedSourceInfo( path ); @@ -394,7 +394,7 @@ void JavaSupportPart::savedFile(const KURL &fileName) #if 0 // not needed anymore kdDebug(9013) << "savedFile(): " << fileName.mid ( m_projectDirectory.length() + 1 ) << endl; - QStringList projectFileList = project()->allFiles(); + TQStringList projectFileList = project()->allFiles(); if (projectFileList.contains(fileName.mid ( m_projectDirectory.length() + 1 ))) { maybeParse( fileName ); emit addedSourceInfo( fileName ); @@ -402,13 +402,13 @@ void JavaSupportPart::savedFile(const KURL &fileName) #endif } -QString JavaSupportPart::findSourceFile() +TQString JavaSupportPart::findSourceFile() { - QFileInfo fi( m_activeFileName ); - QString path = fi.filePath(); - QString ext = fi.extension(); - QString base = path.left( path.length() - ext.length() ); - QStringList candidates; + TQFileInfo fi( m_activeFileName ); + TQString path = fi.filePath(); + TQString ext = fi.extension(); + TQString base = path.left( path.length() - ext.length() ); + TQStringList candidates; if (ext == "h" || ext == "H" || ext == "hh" || ext == "hxx" || ext == "hpp" || ext == "tlh") { candidates << (base + "c"); @@ -423,10 +423,10 @@ QString JavaSupportPart::findSourceFile() candidates << (base + "inl"); } - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = candidates.begin(); it != candidates.end(); ++it) { kdDebug(9013) << "Trying " << (*it) << endl; - if (QFileInfo(*it).exists()) { + if (TQFileInfo(*it).exists()) { return *it; } } @@ -439,19 +439,19 @@ KDevLanguageSupport::Features JavaSupportPart::features() return Features( Classes | Functions | Variables ); } -QString JavaSupportPart::formatClassName(const QString &name) +TQString JavaSupportPart::formatClassName(const TQString &name) { return name; } -QString JavaSupportPart::unformatClassName(const QString &name) +TQString JavaSupportPart::unformatClassName(const TQString &name) { return name; } -QStringList JavaSupportPart::fileExtensions() const +TQStringList JavaSupportPart::fileExtensions() const { - return QStringList::split(",", "java"); + return TQStringList::split(",", "java"); } void JavaSupportPart::slotNewClass() @@ -482,8 +482,8 @@ void JavaSupportPart::initialParse( ) } #if QT_VERSION < 0x030100 -// Taken from qt-3.2/tools/qdatetime.java/QDateTime::toTime_t() and modified for normal function -uint toTime_t(QDateTime t) +// Taken from qt-3.2/tools/qdatetime.java/TQDateTime::toTime_t() and modified for normal function +uint toTime_t(TQDateTime t) { tm brokenDown; brokenDown.tm_sec = t.time().second(); @@ -503,7 +503,7 @@ uint toTime_t(QDateTime t) bool JavaSupportPart::parseProject( ) { - //QLabel* label = new QLabel( "", mainWindow( )->statusBar( ) ); + //TQLabel* label = new TQLabel( "", mainWindow( )->statusBar( ) ); //label->setMinimumWidth( 600 ); //mainWindow( )->statusBar( )->addWidget( label ); //label->show( ); @@ -513,30 +513,30 @@ JavaSupportPart::parseProject( ) kapp->processEvents( ); kapp->setOverrideCursor( waitCursor ); - QStringList files = modifiedFileList(); + TQStringList files = modifiedFileList(); - QProgressBar* bar = new QProgressBar( files.count( ), mainWindow( )->statusBar( ) ); + TQProgressBar* bar = new TQProgressBar( files.count( ), mainWindow( )->statusBar( ) ); bar->setMinimumWidth( 120 ); bar->setCenterIndicator( true ); mainWindow( )->statusBar( )->addWidget( bar ); bar->show( ); - QDir d( m_projectDirectory ); + TQDir d( m_projectDirectory ); - QDataStream stream; - QMap< QString, QPair<uint, uint> > pcs; + TQDataStream stream; + TQMap< TQString, QPair<uint, uint> > pcs; - if( QFileInfo( project()->projectDirectory() + "/" + + if( TQFileInfo( project()->projectDirectory() + "/" + project()->projectName().lower() + ".kdevelop.pcs" ).exists() ) { d.rename(project()->projectName().lower() + ".kdevelop.pcs", project()->projectName() + ".kdevelop.pcs"); } - QFile f(project()->projectDirectory() + "/" + project()->projectName() + ".kdevelop.pcs"); + TQFile f(project()->projectDirectory() + "/" + project()->projectName() + ".kdevelop.pcs"); if( f.open(IO_ReadOnly) ){ stream.setDevice( &f ); - QString sig; + TQString sig; int pcs_version = 0; stream >> sig >> pcs_version; if( sig == "PCS" && pcs_version == KDEV_PCS_VERSION ){ @@ -545,7 +545,7 @@ JavaSupportPart::parseProject( ) stream >> numFiles; for( int i=0; i<numFiles; ++i ){ - QString fn; + TQString fn; uint ts; uint offset; @@ -556,12 +556,12 @@ JavaSupportPart::parseProject( ) } int n = 0; - for( QStringList::Iterator it = files.begin( ); it != files.end( ); ++it ) { + for( TQStringList::Iterator it = files.begin( ); it != files.end( ); ++it ) { bar->setProgress( n++ ); - QFileInfo fileInfo( d, *it ); + TQFileInfo fileInfo( d, *it ); if( fileInfo.exists() && fileInfo.isFile() && fileInfo.isReadable() ){ - QString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() ); + TQString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() ); kdDebug(9013) << "parse file: " << absFilePath << endl; if( (n%5) == 0 ){ @@ -574,7 +574,7 @@ JavaSupportPart::parseProject( ) } if( isValidSource(absFilePath) ){ - QDateTime t = fileInfo.lastModified(); + TQDateTime t = fileInfo.lastModified(); if( m_timestamp.contains(absFilePath) && m_timestamp[absFilePath] == t ) continue; @@ -616,21 +616,21 @@ JavaSupportPart::parseProject( ) return true; } -void JavaSupportPart::maybeParse( const QString& fileName ) +void JavaSupportPart::maybeParse( const TQString& fileName ) { if( !isValidSource(fileName) ) return; - QFileInfo fileInfo( fileName ); - QString path = URLUtil::canonicalPath( fileName ); - QDateTime t = fileInfo.lastModified(); + TQFileInfo fileInfo( fileName ); + TQString path = URLUtil::canonicalPath( fileName ); + TQDateTime t = fileInfo.lastModified(); if( !fileInfo.exists() ){ removeWithReferences( path ); return; } - QMap<QString, QDateTime>::Iterator it = m_timestamp.find( path ); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( path ); if( it != m_timestamp.end() && *it == t ){ return; } @@ -639,19 +639,19 @@ void JavaSupportPart::maybeParse( const QString& fileName ) m_driver->parseFile( path ); } -void JavaSupportPart::slotNeedTextHint( int /*line*/, int /*column*/, QString& /*textHint*/ ) +void JavaSupportPart::slotNeedTextHint( int /*line*/, int /*column*/, TQString& /*textHint*/ ) { } -QStringList JavaSupportPart::subclassWidget(const QString& /*formName*/) +TQStringList JavaSupportPart::subclassWidget(const TQString& /*formName*/) { - QStringList newFileNames; + TQStringList newFileNames; return newFileNames; } -QStringList JavaSupportPart::updateWidget(const QString& /*formName*/, const QString& /*fileName*/) +TQStringList JavaSupportPart::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/) { - QStringList dummy; + TQStringList dummy; return dummy; } @@ -661,11 +661,11 @@ void JavaSupportPart::partRemoved( KParts::Part* part ) if( KTextEditor::Document* doc = dynamic_cast<KTextEditor::Document*>( part ) ){ - QString fileName = doc->url().path(); + TQString fileName = doc->url().path(); if( fileName.isEmpty() ) return; - QString canonicalFileName = URLUtil::canonicalPath( fileName ); + TQString canonicalFileName = URLUtil::canonicalPath( fileName ); m_backgroundParser->removeFile( canonicalFileName ); m_backgroundParser->addFile( canonicalFileName, true ); } @@ -677,24 +677,24 @@ void JavaSupportPart::slotProjectCompiled() parseProject(); } -QStringList JavaSupportPart::modifiedFileList() +TQStringList JavaSupportPart::modifiedFileList() { - QStringList lst; + TQStringList lst; - QStringList fileList = project()->allFiles(); - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = project()->allFiles(); + TQStringList::Iterator it = fileList.begin(); while( it != fileList.end() ){ - QString fileName = *it; + TQString fileName = *it; ++it; - QFileInfo fileInfo( m_projectDirectory, fileName ); + TQFileInfo fileInfo( m_projectDirectory, fileName ); if( !fileExtensions().contains(fileInfo.extension()) ) continue; - QDateTime t = fileInfo.lastModified(); - QString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); - QMap<QString, QDateTime>::Iterator dictIt = m_timestamp.find( path ); + TQDateTime t = fileInfo.lastModified(); + TQString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); + TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.find( path ); if( fileInfo.exists() && dictIt != m_timestamp.end() && *dictIt == t ) continue; @@ -709,8 +709,8 @@ KTextEditor::Document * JavaSupportPart::findDocument( const KURL & url ) if( !partController()->parts() ) return 0; - QPtrList<KParts::Part> parts( *partController()->parts() ); - QPtrListIterator<KParts::Part> it( parts ); + TQPtrList<KParts::Part> parts( *partController()->parts() ); + TQPtrListIterator<KParts::Part> it( parts ); while( KParts::Part* part = it.current() ){ KTextEditor::Document* doc = dynamic_cast<KTextEditor::Document*>( part ); if( doc && doc->url() == url ) @@ -725,19 +725,19 @@ void JavaSupportPart::setupCatalog( ) { kdDebug(9013) << "JavaSupportPart::setupCatalog()" << endl; - QStringList indexList = QStringList() << "kind" << "name" << "scope" << "fileName"; + TQStringList indexList = TQStringList() << "kind" << "name" << "scope" << "fileName"; KStandardDirs *dirs = JavaSupportFactory::instance()->dirs(); - QStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true ); - QStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true ); + TQStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true ); + TQStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true ); if( pcsList.size() && pcsVersion() < KDEV_DB_VERSION ){ - QStringList l = pcsList + pcsIdxList; + TQStringList l = pcsList + pcsIdxList; int rtn = KMessageBox::questionYesNoList( 0, i18n("Persistent class store will be disabled: you have a wrong version of pcs installed.\nRemove old pcs files?"), l, i18n("Java Support"), KStdGuiItem::remove(), i18n("Keep Them") ); if( rtn == KMessageBox::Yes ){ - QStringList::Iterator it = l.begin(); + TQStringList::Iterator it = l.begin(); while( it != l.end() ){ - QFile::remove( *it ); + TQFile::remove( *it ); ++it; } // @todo regenerate the pcs list @@ -747,13 +747,13 @@ void JavaSupportPart::setupCatalog( ) } } - QStringList::Iterator it = pcsList.begin(); + TQStringList::Iterator it = pcsList.begin(); while( it != pcsList.end() ){ Catalog* catalog = new Catalog(); catalog->open( *it ); ++it; - for( QStringList::Iterator idxIt=indexList.begin(); idxIt!=indexList.end(); ++idxIt ) + for( TQStringList::Iterator idxIt=indexList.begin(); idxIt!=indexList.end(); ++idxIt ) catalog->addIndex( (*idxIt).utf8() ); m_catalogList.append( catalog ); @@ -790,12 +790,12 @@ void JavaSupportPart::setPcsVersion( int version ) config->sync(); } -QString JavaSupportPart::formatTag( const Tag & /*inputTag*/ ) +TQString JavaSupportPart::formatTag( const Tag & /*inputTag*/ ) { - return QString::null; + return TQString::null; } -void JavaSupportPart::removeWithReferences( const QString & fileName ) +void JavaSupportPart::removeWithReferences( const TQString & fileName ) { kdDebug(9013) << "remove with references: " << fileName << endl; m_timestamp.remove( fileName ); @@ -807,19 +807,19 @@ void JavaSupportPart::removeWithReferences( const QString & fileName ) codeModel()->removeFile( codeModel()->fileByName(fileName) ); } -bool JavaSupportPart::isValidSource( const QString& fileName ) const +bool JavaSupportPart::isValidSource( const TQString& fileName ) const { - QFileInfo fileInfo( fileName ); - return fileExtensions().contains( fileInfo.extension() ) && !QFile::exists(fileInfo.dirPath(true) + "/.kdev_ignore"); + TQFileInfo fileInfo( fileName ); + return fileExtensions().contains( fileInfo.extension() ) && !TQFile::exists(fileInfo.dirPath(true) + "/.kdev_ignore"); } -QString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool shortDescription ) +TQString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool shortDescription ) { if (item->isFunction()) { const FunctionModel *model = static_cast<const FunctionModel*>(item); - QString function; - QString args; + TQString function; + TQString args; ArgumentList argumentList = model->argumentList(); for (ArgumentList::const_iterator it = argumentList.begin(); it != argumentList.end(); ++it) { @@ -830,7 +830,7 @@ QString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool shortD function += model->resultType() + " "; function += model->name() + "(" + args + ")" + - (model->isAbstract() ? QString(" = 0") : QString("") ); + (model->isAbstract() ? TQString(" = 0") : TQString("") ); return function; } @@ -844,12 +844,12 @@ QString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool shortD else if (item->isArgument()) { const ArgumentModel *model = static_cast<const ArgumentModel*>(item); - QString arg; + TQString arg; if( !shortDescription ) arg += model->type() + " "; arg += model->name(); if( !shortDescription ) - arg += model->defaultValue().isEmpty() ? QString("") : QString(" = ") + model->defaultValue(); + arg += model->defaultValue().isEmpty() ? TQString("") : TQString(" = ") + model->defaultValue(); return arg.stripWhiteSpace(); } else @@ -868,15 +868,15 @@ void JavaSupportPart::saveProjectSourceInfo( ) if( !project() || fileList.isEmpty() ) return; - QFile f( project()->projectDirectory() + "/" + + TQFile f( project()->projectDirectory() + "/" + project()->projectName() + ".kdevelop.pcs" ); if( !f.open( IO_WriteOnly ) ) return; - QDataStream stream( &f ); - QMap<QString, uint> offsets; + TQDataStream stream( &f ); + TQMap<TQString, uint> offsets; - QString pcs( "PCS" ); + TQString pcs( "PCS" ); stream << pcs << KDEV_PCS_VERSION; stream << int( fileList.size() ); diff --git a/languages/java/javasupportpart.h b/languages/java/javasupportpart.h index e6280560..3b1f08be 100644 --- a/languages/java/javasupportpart.h +++ b/languages/java/javasupportpart.h @@ -20,10 +20,10 @@ #include <kdevlanguagesupport.h> #include <kdialogbase.h> -#include <qguardedptr.h> -#include <qstring.h> -#include <qwaitcondition.h> -#include <qdatetime.h> +#include <tqguardedptr.h> +#include <tqstring.h> +#include <tqwaitcondition.h> +#include <tqdatetime.h> class Context; class ProblemReporter; @@ -51,7 +51,7 @@ class JavaSupportPart : public KDevLanguageSupport Q_OBJECT public: - JavaSupportPart( QObject *parent, const char *name, const QStringList &args ); + JavaSupportPart( TQObject *parent, const char *name, const TQStringList &args ); virtual ~JavaSupportPart(); bool isValid() const { return m_valid; } @@ -59,32 +59,32 @@ public: ProblemReporter* problemReporter() { return m_problemReporter; } BackgroundParser* backgroundParser() { return m_backgroundParser; } - const QPtrList<Catalog>& catalogList() { return m_catalogList; } + const TQPtrList<Catalog>& catalogList() { return m_catalogList; } - bool isValidSource( const QString& fileName ) const; - QStringList fileExtensions( ) const; + bool isValidSource( const TQString& fileName ) const; + TQStringList fileExtensions( ) const; - virtual void customEvent( QCustomEvent* ev ); + virtual void customEvent( TQCustomEvent* ev ); - virtual QStringList subclassWidget(const QString& formName); - virtual QStringList updateWidget(const QString& formName, const QString& fileName); + virtual TQStringList subclassWidget(const TQString& formName); + virtual TQStringList updateWidget(const TQString& formName, const TQString& fileName); KTextEditor::Document* findDocument( const KURL& url ); static KConfig *config(); - virtual QString formatTag( const Tag& tag ); - virtual QString formatModelItem( const CodeModelItem *item, bool shortDescription=false ); + virtual TQString formatTag( const Tag& tag ); + virtual TQString formatModelItem( const CodeModelItem *item, bool shortDescription=false ); virtual void addClass(); signals: - void fileParsed( const QString& fileName ); + void fileParsed( const TQString& fileName ); protected: virtual KDevLanguageSupport::Features features(); virtual KMimeType::List mimeTypes(); - virtual QString formatClassName(const QString &name); - virtual QString unformatClassName(const QString &name); + virtual TQString formatClassName(const TQString &name); + virtual TQString unformatClassName(const TQString &name); virtual void addMethod( ClassDom klass ); virtual void addAttribute( ClassDom klass ); @@ -96,16 +96,16 @@ private slots: void savedFile(const KURL &fileName); void configWidget(KDialogBase *dlg); void projectConfigWidget(KDialogBase *dlg); - void contextMenu(QPopupMenu *popup, const Context *context); - void addedFilesToProject(const QStringList &fileList); - void removedFilesFromProject(const QStringList &fileList); - void changedFilesInProject( const QStringList & fileList ); + void contextMenu(TQPopupMenu *popup, const Context *context); + void addedFilesToProject(const TQStringList &fileList); + void removedFilesFromProject(const TQStringList &fileList); + void changedFilesInProject( const TQStringList & fileList ); void slotProjectCompiled(); void setupCatalog(); void slotNewClass(); - void slotNeedTextHint( int, int, QString& ); + void slotNeedTextHint( int, int, TQString& ); /** * loads, parses and creates both classstores needed @@ -122,19 +122,19 @@ private: /** * checks if a file has to be parsed */ - void maybeParse( const QString& fileName ); - void removeWithReferences( const QString& fileName ); + void maybeParse( const TQString& fileName ); + void removeWithReferences( const TQString& fileName ); - QStringList modifiedFileList(); - QString findSourceFile(); + TQStringList modifiedFileList(); + TQString findSourceFile(); int pcsVersion(); void setPcsVersion( int version ); void saveProjectSourceInfo(); - QString m_contextFileName; + TQString m_contextFileName; - QGuardedPtr< ProblemReporter > m_problemReporter; + TQGuardedPtr< ProblemReporter > m_problemReporter; BackgroundParser* m_backgroundParser; KTextEditor::Document* m_activeDocument; @@ -142,17 +142,17 @@ private: KTextEditor::SelectionInterface* m_activeSelection; KTextEditor::EditInterface* m_activeEditor; KTextEditor::ViewCursorInterface* m_activeViewCursor; - QString m_activeFileName; + TQString m_activeFileName; - QWaitCondition m_eventConsumed; + TQWaitCondition m_eventConsumed; bool m_projectClosed; - QMap<QString, QDateTime> m_timestamp; + TQMap<TQString, TQDateTime> m_timestamp; bool m_valid; - QPtrList<Catalog> m_catalogList; + TQPtrList<Catalog> m_catalogList; Driver* m_driver; - QString m_projectDirectory; + TQString m_projectDirectory; ClassDom m_activeClass; FunctionDom m_activeFunction; diff --git a/languages/java/kdevdeepcopy.h b/languages/java/kdevdeepcopy.h index 8e7d8fbe..dd4d8f4d 100644 --- a/languages/java/kdevdeepcopy.h +++ b/languages/java/kdevdeepcopy.h @@ -1,12 +1,12 @@ #ifndef KDEVDEEPCOPY_H #define KDEVDEEPCOPY_H -#include <qstring.h> +#include <tqstring.h> -inline QString deepCopy( const QString& s ) +inline TQString deepCopy( const TQString& s ) { - QCString str = s.utf8(); - return QString::fromUtf8( str, str.length() ); + TQCString str = s.utf8(); + return TQString::fromUtf8( str, str.length() ); } #endif diff --git a/languages/java/kdevdriver.cpp b/languages/java/kdevdriver.cpp index 444217ff..d19a20c3 100644 --- a/languages/java/kdevdriver.cpp +++ b/languages/java/kdevdriver.cpp @@ -2,7 +2,7 @@ #include "kdevdriver.h" #include "JavaLexer.hpp" #include <unistd.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> KDevDriver::KDevDriver( JavaSupportPart* javaSupport ) : m_javaSupport( javaSupport ) @@ -16,13 +16,13 @@ JavaSupportPart* KDevDriver::javaSupport() void KDevDriver::setupProject() { - QMap<QString, bool> map; + TQMap<TQString, bool> map; { - QStringList fileList = m_javaSupport->project()->allFiles(); - QStringList::ConstIterator it = fileList.begin(); + TQStringList fileList = m_javaSupport->project()->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); while( it != fileList.end() ){ - QFileInfo info( *it ); + TQFileInfo info( *it ); ++it; map.insert( info.dirPath(true), true ); @@ -30,7 +30,7 @@ void KDevDriver::setupProject() } { - QMap<QString, bool>::Iterator it = map.begin(); + TQMap<TQString, bool>::Iterator it = map.begin(); while( it != map.end() ){ addIncludePath( it.key() ); ++it; diff --git a/languages/java/problemreporter.cpp b/languages/java/problemreporter.cpp index e7cbbcb5..a5beaaf2 100644 --- a/languages/java/problemreporter.cpp +++ b/languages/java/problemreporter.cpp @@ -43,26 +43,26 @@ #include <kconfig.h> -#include <qtimer.h> -#include <qregexp.h> -#include <qvbox.h> -#include <qfileinfo.h> -#include <qwhatsthis.h> -#include <qgroupbox.h> +#include <tqtimer.h> +#include <tqregexp.h> +#include <tqvbox.h> +#include <tqfileinfo.h> +#include <tqwhatsthis.h> +#include <tqgroupbox.h> class ProblemItem: public KListViewItem { public: - ProblemItem( QListView* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) + ProblemItem( TQListView* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) : KListViewItem( parent, level, problem, file, line, column ) {} - ProblemItem( QListViewItem* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) + ProblemItem( TQListViewItem* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) : KListViewItem( parent, level, problem, file, line, column ) {} - int compare( QListViewItem* item, int column, bool ascending ) const { + int compare( TQListViewItem* item, int column, bool ascending ) const { if( column == 2 || column == 3 ){ int a = text( column ).toInt(); int b = item->text( column ).toInt(); @@ -75,13 +75,13 @@ public: }; -ProblemReporter::ProblemReporter( JavaSupportPart* part, QWidget* parent, const char* name ) +ProblemReporter::ProblemReporter( JavaSupportPart* part, TQWidget* parent, const char* name ) : KListView( parent, name ? name : "problemreporter" ), m_javaSupport( part ), m_document( 0 ), m_markIface( 0 ) { - QWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " + TQWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " "It displays TODO entries, FIXME's and errors reported by a language parser. " "To add a TODO or FIXME entry, just type<br>" "<tt>//@todo my todo</tt><br>" @@ -95,19 +95,19 @@ ProblemReporter::ProblemReporter( JavaSupportPart* part, QWidget* parent, const addColumn( i18n("Problem") ); setAllColumnsShowFocus( TRUE ); - m_timer = new QTimer( this ); + m_timer = new TQTimer( this ); - connect( part->partController(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(slotActivePartChanged(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partAdded(KParts::Part*)), - this, SLOT(slotPartAdded(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partRemoved(KParts::Part*)), - this, SLOT(slotPartRemoved(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partAdded(KParts::Part*)), + this, TQT_SLOT(slotPartAdded(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partRemoved(KParts::Part*)), + this, TQT_SLOT(slotPartRemoved(KParts::Part*)) ); - connect( m_timer, SIGNAL(timeout()), this, SLOT(reparse()) ); + connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reparse()) ); - connect( this, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); configure(); } @@ -137,7 +137,7 @@ void ProblemReporter::slotActivePartChanged( KParts::Part* part ) if( !m_javaSupport->isValidSource(m_fileName) ) return; - connect( m_document, SIGNAL(textChanged()), this, SLOT(slotTextChanged()) ); + connect( m_document, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()) ); m_markIface = dynamic_cast<KTextEditor::MarkInterface*>( part ); if( !m_javaSupport->backgroundParser() ) @@ -159,11 +159,11 @@ void ProblemReporter::slotTextChanged() m_timer->changeInterval( m_delay ); } -void ProblemReporter::removeAllProblems( const QString& filename ) +void ProblemReporter::removeAllProblems( const TQString& filename ) { - QListViewItem* current = firstChild(); + TQListViewItem* current = firstChild(); while( current ){ - QListViewItem* i = current; + TQListViewItem* i = current; current = current->nextSibling(); if( i->text(1) == filename ) @@ -171,8 +171,8 @@ void ProblemReporter::removeAllProblems( const QString& filename ) } if( m_document && m_markIface ){ - QPtrList<KTextEditor::Mark> marks = m_markIface->marks(); - QPtrListIterator<KTextEditor::Mark> it( marks ); + TQPtrList<KTextEditor::Mark> marks = m_markIface->marks(); + TQPtrListIterator<KTextEditor::Mark> it( marks ); while( it.current() ){ m_markIface->removeMark( it.current()->line, KTextEditor::MarkInterface::markType07 ); ++it; @@ -197,7 +197,7 @@ void ProblemReporter::reparse() kdDebug(9013) << "---> file added " << m_fileName << endl; } -void ProblemReporter::slotSelected( QListViewItem* item ) +void ProblemReporter::slotSelected( TQListViewItem* item ) { KURL url( item->text(1) ); int line = item->text( 2 ).toInt(); @@ -206,21 +206,21 @@ void ProblemReporter::slotSelected( QListViewItem* item ) // m_javaSupport->mainWindow()->lowerView( this ); } -void ProblemReporter::reportProblem( const QString& fileName, const Problem& p ) +void ProblemReporter::reportProblem( const TQString& fileName, const Problem& p ) { int markType = levelToMarkType( p.level() ); if( markType != -1 && m_document && m_markIface && m_fileName == fileName ){ m_markIface->addMark( p.line(), markType ); } - QString msg = p.text(); - msg = msg.replace( QRegExp("\n"), "" ); + TQString msg = p.text(); + msg = msg.replace( TQRegExp("\n"), "" ); new ProblemItem( this, levelToString( p.level() ), fileName, - QString::number( p.line() + 1 ), - QString::number( p.column() + 1 ), + TQString::number( p.line() + 1 ), + TQString::number( p.column() + 1 ), msg ); } @@ -235,12 +235,12 @@ void ProblemReporter::configure() void ProblemReporter::configWidget( KDialogBase* dlg ) { - QVBox *vbox = dlg->addVBoxPage(i18n("Java Parsing")); + TQVBox *vbox = dlg->addVBoxPage(i18n("Java Parsing")); ConfigureProblemReporter* w = new ConfigureProblemReporter( vbox ); //FIXME adymo: unused functionality w->groupBox3->hide(); - connect(dlg, SIGNAL(okClicked()), w, SLOT(accept())); - connect(dlg, SIGNAL(okClicked()), this, SLOT(configure())); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(configure())); } void ProblemReporter::slotPartAdded( KParts::Part* part ) @@ -262,20 +262,20 @@ void ProblemReporter::slotPartRemoved( KParts::Part* part ) } } -QString ProblemReporter::levelToString( int level ) const +TQString ProblemReporter::levelToString( int level ) const { switch( level ) { case Problem::Level_Error: - return QString::fromLatin1( "Error" ); + return TQString::fromLatin1( "Error" ); case Problem::Level_Warning: - return QString::fromLatin1( "Warning" ); + return TQString::fromLatin1( "Warning" ); case Problem::Level_Todo: - return QString::fromLatin1( "Todo" ); + return TQString::fromLatin1( "Todo" ); case Problem::Level_Fixme: - return QString::fromLatin1( "Fixme" ); + return TQString::fromLatin1( "Fixme" ); default: - return QString::null; + return TQString::null; } } diff --git a/languages/java/problemreporter.h b/languages/java/problemreporter.h index 579a1afd..40467c08 100644 --- a/languages/java/problemreporter.h +++ b/languages/java/problemreporter.h @@ -20,7 +20,7 @@ #define PROBLEMSREPORTER_H #include <klistview.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> class JavaSupportPart; class QTimer; @@ -39,11 +39,11 @@ namespace KTextEditor{ class ProblemReporter: public KListView{ Q_OBJECT public: - ProblemReporter( JavaSupportPart* part, QWidget* parent=0, const char* name=0 ); + ProblemReporter( JavaSupportPart* part, TQWidget* parent=0, const char* name=0 ); virtual ~ProblemReporter(); - void removeAllProblems( const QString& filename ); - void reportProblem( const QString& fileName, const Problem& p ); + void removeAllProblems( const TQString& filename ); + void reportProblem( const TQString& fileName, const Problem& p ); public slots: void reparse(); @@ -55,18 +55,18 @@ private slots: void slotPartRemoved( KParts::Part* ); void slotActivePartChanged( KParts::Part* ); void slotTextChanged(); - void slotSelected( QListViewItem* ); + void slotSelected( TQListViewItem* ); private: - QString levelToString( int level ) const; + TQString levelToString( int level ) const; int levelToMarkType( int level ) const; private: JavaSupportPart* m_javaSupport; - QGuardedPtr<KTextEditor::Document> m_document; + TQGuardedPtr<KTextEditor::Document> m_document; KTextEditor::MarkInterface* m_markIface; - QTimer* m_timer; - QString m_fileName; + TQTimer* m_timer; + TQString m_fileName; int m_active; int m_delay; }; |