diff options
Diffstat (limited to 'languages/cpp/qtdesignercppintegration.cpp')
-rw-r--r-- | languages/cpp/qtdesignercppintegration.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/languages/cpp/qtdesignercppintegration.cpp b/languages/cpp/qtdesignercppintegration.cpp index 9314aceb..83354fa8 100644 --- a/languages/cpp/qtdesignercppintegration.cpp +++ b/languages/cpp/qtdesignercppintegration.cpp @@ -40,12 +40,12 @@ #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerCppIntegration::QtDesignerCppIntegration( KDevLanguageSupport *part, +TQtDesignerCppIntegration::TQtDesignerCppIntegration( KDevLanguageSupport *part, ImplementationWidget *impl ) -: QtDesignerIntegration( part, impl, true, 0 ) +: TQtDesignerIntegration( part, impl, true, 0 ) {} -void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function function, ClassDom klass ) +void TQtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function function, ClassDom klass ) { m_part->partController() ->editDocument( KURL( klass->fileName() ) ); KTextEditor::EditInterface* editIface = dynamic_cast<KTextEditor::EditInterface*>( m_part->partController() ->activePart() ); @@ -60,7 +60,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function klass->getEndPosition( &line, &column ); // compute the insertion point map - TQMap<TQString, QPair<int, int> > points; + TQMap<TQString, TQPair<int, int> > points; const FunctionList functionList = klass->functionList(); for ( FunctionList::ConstIterator it = functionList.begin(); it != functionList.end(); ++it ) @@ -68,9 +68,9 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function int funEndLine, funEndColumn; ( *it ) ->getEndPosition( &funEndLine, &funEndColumn ); TQString access = accessID( *it ); - QPair<int, int> funEndPoint = qMakePair( funEndLine, funEndColumn ); + TQPair<int, int> funEndPoint = tqMakePair( funEndLine, funEndColumn ); - if ( !points.contains( access ) || points[ access ] < funEndPoint ) + if ( !points.tqcontains( access ) || points[ access ] < funEndPoint ) { points[ access ] = funEndPoint; } @@ -78,7 +78,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function int insertedLine = 0; - TQString access = function.access + ( function.type == KInterfaceDesigner::ftQtSlot ? " slots" : "" ); + TQString access = function.access + ( function.type == KInterfaceDesigner::ftTQtSlot ? " slots" : "" ); TQString str = function.returnType + " " + function.function; if ( function.specifier == "virtual" ) @@ -90,20 +90,20 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function str += ";\n"; str = " " + str; - QPair<int, int> pt; - if ( points.contains( access ) ) + TQPair<int, int> pt; + if ( points.tqcontains( access ) ) { pt = points[ access ]; } else { str.prepend( access + ":\n" ); - points[ access ] = qMakePair( line - 1, 0 ); + points[ access ] = tqMakePair( line - 1, 0 ); pt = points[ access ]; // end of class declaration } editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str ); - insertedLine += str.contains( TQChar( '\n' ) ); + insertedLine += str.tqcontains( TQChar( '\n' ) ); CppSupportPart *cppPart = dynamic_cast<CppSupportPart *>( m_part ); cppPart->backgroundParser() ->addFile( klass->fileName() ); @@ -121,7 +121,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function TQFileInfo fi( klass->fileName() ); TQString implementationFile = fi.absFilePath(); - implementationFile.replace( ".h", ".cpp" ); + implementationFile.tqreplace( ".h", ".cpp" ); TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) @@ -158,7 +158,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function } else { - if ( editIface->textLine( line ).contains( TQRegExp( ".*#include .*\\.moc.*" ) ) ) + if ( editIface->textLine( line ).tqcontains( TQRegExp( ".*#include .*\\.tqmoc.*" ) ) ) atLine = line; break; } @@ -167,7 +167,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function atColumn = 0; } - // editIface->insertLine( atLine + 1, TQString::fromLatin1("") ); + // editIface->insertLine( atLine + 1, TQString::tqfromLatin1("") ); kdDebug() << "at line in intg: " << atLine << " atCol: " << atColumn << endl; kdDebug() << "text: " << stri << endl; editIface->insertText( atLine, atColumn, stri ); @@ -182,35 +182,35 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function cppPart->backgroundParser() ->addFile( implementationFile ); } -TQString QtDesignerCppIntegration::accessID( FunctionDom fun ) const +TQString TQtDesignerCppIntegration::accessID( FunctionDom fun ) const { if ( fun->isSignal() ) - return TQString::fromLatin1( "signals" ); + return TQString::tqfromLatin1( "signals" ); switch ( fun->access() ) { case CodeModelItem::Public: if ( fun->isSlot() ) - return TQString::fromLatin1( "public slots" ); - return TQString::fromLatin1( "public" ); + return TQString::tqfromLatin1( "public slots" ); + return TQString::tqfromLatin1( "public" ); case CodeModelItem::Protected: if ( fun->isSlot() ) - return TQString::fromLatin1( "protected slots" ); - return TQString::fromLatin1( "protected" ); + return TQString::tqfromLatin1( "protected slots" ); + return TQString::tqfromLatin1( "protected" ); case CodeModelItem::Private: if ( fun->isSlot() ) - return TQString::fromLatin1( "private slots" ); - return TQString::fromLatin1( "private" ); + return TQString::tqfromLatin1( "private slots" ); + return TQString::tqfromLatin1( "private" ); } - return TQString::null; + return TQString(); } -void QtDesignerCppIntegration::processImplementationName( TQString &name ) +void TQtDesignerCppIntegration::processImplementationName( TQString &name ) { - name.replace( ".h", ".cpp" ); + name.tqreplace( ".h", ".cpp" ); } #include "qtdesignercppintegration.moc" |