summaryrefslogtreecommitdiffstats
path: root/languages/cpp/addattributedialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/addattributedialog.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
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
Diffstat (limited to 'languages/cpp/addattributedialog.cpp')
-rw-r--r--languages/cpp/addattributedialog.cpp30
1 files changed, 15 insertions, 15 deletions
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 <tqtextstream.h>
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<TQString, QPair<int, int> > points;
+ TQMap<TQString, TQPair<int, int> > 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<int, int> varEndPoint = qMakePair( varEndLine, varEndColumn );
+ TQPair<int, int> 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<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' ) );
}
}
@@ -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"