From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: TQt4 port kdevelop This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- languages/cpp/addattributedialog.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'languages/cpp/addattributedialog.cpp') diff --git a/languages/cpp/addattributedialog.cpp b/languages/cpp/addattributedialog.cpp index 42031f59..70dd27b3 100644 --- a/languages/cpp/addattributedialog.cpp +++ b/languages/cpp/addattributedialog.cpp @@ -41,8 +41,8 @@ #include AddAttributeDialog::AddAttributeDialog( CppSupportPart* cppSupport, ClassDom klass, - TQWidget* parent, const char* name, bool modal, WFlags fl ) -: AddAttributeDialogBase( parent, name, modal, fl ), m_cppSupport( cppSupport ), m_klass( klass ), m_count( 0 ) + TQWidget* tqparent, const char* name, bool modal, WFlags fl ) +: AddAttributeDialogBase( tqparent, name, modal, fl ), m_cppSupport( cppSupport ), m_klass( klass ), m_count( 0 ) { access->insertStringList( TQStringList() << "Public" << "Protected" << "Private" ); @@ -91,7 +91,7 @@ void AddAttributeDialog::accept() m_klass->getEndPosition( &line, &column ); // compute the insertion point map - TQMap > points; + TQMap > points; TQStringList accessList; const VariableList variableList = m_klass->variableList(); @@ -100,9 +100,9 @@ void AddAttributeDialog::accept() int varEndLine, varEndColumn; ( *it ) ->getEndPosition( &varEndLine, &varEndColumn ); TQString access = accessID( *it ); - QPair varEndPoint = qMakePair( varEndLine, varEndColumn ); + TQPair varEndPoint = tqMakePair( varEndLine, varEndColumn ); - if ( !points.contains( access ) || points[ access ] < varEndPoint ) + if ( !points.tqcontains( access ) || points[ access ] < varEndPoint ) { accessList.remove( access ); accessList.push_back( access ); // move 'access' at the end of the list @@ -131,20 +131,20 @@ void AddAttributeDialog::accept() TQString str = variableDeclaration( currentItem ); - QPair pt; - if ( points.contains( *it ) ) + TQPair 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' ) ); } } @@ -194,7 +194,7 @@ void AddAttributeDialog::updateGUI() void AddAttributeDialog::addAttribute() { TQListViewItem * item = new TQListViewItem( attributes, "Protected", "Normal", - "int", TQString( "attribute_%1" ).arg( ++m_count ) ); + "int", TQString( "attribute_%1" ).tqarg( ++m_count ) ); attributes->setCurrentItem( item ); attributes->setSelected( item, true ); @@ -236,7 +236,7 @@ TQStringList AddAttributeDialog::newAccessList( const TQStringList& accessList ) item = item->nextSibling(); TQString access = currentItem->text( 0 ); - if ( !( accessList.contains( access ) || newAccessList.contains( access ) ) ) + if ( !( accessList.tqcontains( access ) || newAccessList.tqcontains( access ) ) ) newAccessList.push_back( access ); } @@ -248,16 +248,16 @@ TQString AddAttributeDialog::accessID( VariableDom var ) const switch ( var->access() ) { case CodeModelItem::Public: - return TQString::fromLatin1( "Public" ); + return TQString::tqfromLatin1( "Public" ); case CodeModelItem::Protected: - return TQString::fromLatin1( "Protected" ); + return TQString::tqfromLatin1( "Protected" ); case CodeModelItem::Private: - return TQString::fromLatin1( "Private" ); + return TQString::tqfromLatin1( "Private" ); } - return TQString::null; + return TQString(); } #include "addattributedialog.moc" -- cgit v1.2.1