diff options
Diffstat (limited to 'languages/cpp/addmethoddialog.cpp')
-rw-r--r-- | languages/cpp/addmethoddialog.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/languages/cpp/addmethoddialog.cpp b/languages/cpp/addmethoddialog.cpp index ae4e1738..71f03b5d 100644 --- a/languages/cpp/addmethoddialog.cpp +++ b/languages/cpp/addmethoddialog.cpp @@ -44,8 +44,8 @@ #include <tqtextstream.h> AddMethodDialog::AddMethodDialog( CppSupportPart* cppSupport, ClassDom klass, - TQWidget* parent, const char* name, bool modal, WFlags fl ) -: AddMethodDialogBase( parent, name, modal, fl ), m_cppSupport( cppSupport ), m_klass( klass ), m_count( 0 ) + TQWidget* tqparent, const char* name, bool modal, WFlags fl ) +: AddMethodDialogBase( tqparent, name, modal, fl ), m_cppSupport( cppSupport ), m_klass( klass ), m_count( 0 ) { TQString fileName = m_klass->fileName(); @@ -75,7 +75,7 @@ AddMethodDialog::AddMethodDialog( CppSupportPart* cppSupport, ClassDom klass, while ( it != m.end() ) { TQString ext = TQFileInfo( it.key() ).extension(); - if ( !headers.contains( ext ) ) + if ( !headers.tqcontains( ext ) ) sourceFile->insertItem( it.key() ); ++it; } @@ -119,27 +119,27 @@ void AddMethodDialog::reject() TQString AddMethodDialog::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 AddMethodDialog::accept() @@ -157,7 +157,7 @@ void AddMethodDialog::accept() m_klass->getEndPosition( &line, &column ); // compute the insertion point map - TQMap<TQString, QPair<int, int> > points; + TQMap<TQString, TQPair<int, int> > points; TQStringList accessList; const FunctionList functionList = m_klass->functionList(); @@ -166,9 +166,9 @@ void AddMethodDialog::accept() 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 ) { accessList.remove( access ); accessList.push_back( access ); // move 'access' at the end of the list @@ -198,20 +198,20 @@ void AddMethodDialog::accept() bool isInline = currentItem->text( 0 ) == "True"; TQString str = isInline ? functionDefinition( currentItem ) : functionDeclaration( currentItem ); - QPair<int, int> pt; - if ( points.contains( *it ) ) + TQPair<int, int> pt; + if ( points.tqcontains( *it ) ) { pt = points[ *it ]; } else { str.prepend( access + ":\n" ); - points[ *it ] = qMakePair( line - 1, 0 ); + points[ *it ] = tqMakePair( line - 1, 0 ); pt = points[ *it ]; // end of class declaration } editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str ); - insertedLine += str.contains( TQChar( '\n' ) ); + insertedLine += str.tqcontains( TQChar( '\n' ) ); } } @@ -248,7 +248,7 @@ void AddMethodDialog::accept() bool isInline = currentItem->text( 0 ) == "True"; if ( !isInline ) { - editIface->insertLine( editIface->numLines(), TQString::fromLatin1( "" ) ); + editIface->insertLine( editIface->numLines(), TQString::tqfromLatin1( "" ) ); editIface->insertText( editIface->numLines() - 1, 0, str ); m_cppSupport->backgroundParser() ->addFile( implementationFile ); } @@ -293,7 +293,7 @@ void AddMethodDialog::updateGUI() void AddMethodDialog::addMethod() { TQListViewItem * item = new TQListViewItem( methods, "False", "Public", "Normal", - "void", TQString( "method_%1()" ).arg( ++m_count ), + "void", TQString( "method_%1()" ).tqarg( ++m_count ), sourceFile->currentText() ); methods->setCurrentItem( item ); methods->setSelected( item, true ); @@ -363,7 +363,7 @@ TQString AddMethodDialog::functionDefinition( TQListViewItem* item ) const if ( item->text( 1 ) == "Signals" || item->text( 2 ) == "Pure Virtual" || item->text( 2 ) == "Friend" ) { - return TQString::null; + return TQString(); } TQString className = m_klass->name(); @@ -387,7 +387,7 @@ TQString AddMethodDialog::functionDefinition( TQListViewItem* item ) const << ind << " */\n"; stream - << ind << item->text( 3 ) << " " << ( isInline ? TQString::fromLatin1( "" ) : fullName + "::" ) + << ind << item->text( 3 ) << " " << ( isInline ? TQString::tqfromLatin1( "" ) : fullName + "::" ) << item->text( 4 ) << "\n" << ind << "{\n" << ind << " /// @todo implement me\n" @@ -408,7 +408,7 @@ TQStringList AddMethodDialog::newAccessList( const TQStringList& accessList ) co item = item->nextSibling(); TQString access = currentItem->text( 1 ); - if ( !( accessList.contains( access ) || newAccessList.contains( access ) ) ) + if ( !( accessList.tqcontains( access ) || newAccessList.tqcontains( access ) ) ) newAccessList.push_back( access ); } |