summaryrefslogtreecommitdiffstats
path: root/languages/cpp/cppcodecompletion.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-01-14 14:24:33 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-01-21 23:12:29 +0900
commit0b6a83b773c37ee6949d73346c4a669aa1fc98b8 (patch)
tree03606cf5d79c9c08b77909997c4301fb34bc783c /languages/cpp/cppcodecompletion.cpp
parent19ccb502fc61ce7dfa1d030d833d2b1f898051f4 (diff)
downloadtdevelop-0b6a83b773c37ee6949d73346c4a669aa1fc98b8.tar.gz
tdevelop-0b6a83b773c37ee6949d73346c4a669aa1fc98b8.zip
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 35fbd60457d1e51e6a0df5d181d1a0f00ad75a2c)
Diffstat (limited to 'languages/cpp/cppcodecompletion.cpp')
-rw-r--r--languages/cpp/cppcodecompletion.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp
index a62087ac..7f97ba1e 100644
--- a/languages/cpp/cppcodecompletion.cpp
+++ b/languages/cpp/cppcodecompletion.cpp
@@ -358,7 +358,7 @@ struct PopupFillerHelpStruct {
memType = "enum";
TQString txt = i18n( "Jump to %1 %2" ).arg( memType ).arg( cleanForMenu( d.name ) );
- int id = parent->insertItem( txt, receiver, TQT_SLOT( popupAction( int ) ) );
+ int id = parent->insertItem( txt, receiver, TQ_SLOT( popupAction( int ) ) );
receiver->m_popupActions.insert( id, d.decl );
}
@@ -448,12 +448,12 @@ struct PopupFillerHelpStruct {
}
}
- int id = parent->insertItem( txt1, receiver, TQT_SLOT( popupAction( int ) ) );
+ int id = parent->insertItem( txt1, receiver, TQ_SLOT( popupAction( int ) ) );
if ( d.resolved() )
receiver->m_popupActions.insert( id, d.resolved() ->getDeclarationInfo() );
if ( !txt2.isEmpty() ) {
- int id2 = parent->insertItem( txt2, receiver, TQT_SLOT( popupDefinitionAction( int ) ) );
+ int id2 = parent->insertItem( txt2, receiver, TQ_SLOT( popupDefinitionAction( int ) ) );
if ( d.resolved() )
receiver->m_popupDefinitionActions.insert( id2, d.resolved() ->getDeclarationInfo() );
}
@@ -538,7 +538,7 @@ struct PopupClassViewFillerHelpStruct {
memType = "enum";
TQString txt = i18n( "Show %1 %2" ).arg( memType ).arg( cleanForMenu( d.name ) );
- int id = parent->insertItem( txt, receiver, TQT_SLOT( popupClassViewAction( int ) ) );
+ int id = parent->insertItem( txt, receiver, TQ_SLOT( popupClassViewAction( int ) ) );
receiver->m_popupClassViewActions.insert( id, dom );
}
@@ -597,7 +597,7 @@ struct PopupClassViewFillerHelpStruct {
}
}
- int id = parent->insertItem( txt, receiver, TQT_SLOT( popupClassViewAction( int ) ) );
+ int id = parent->insertItem( txt, receiver, TQ_SLOT( popupClassViewAction( int ) ) );
if ( dom )
receiver->m_popupClassViewActions.insert( id, dom );
@@ -645,7 +645,7 @@ class PopupFiller {
//kdDebug( 9007 ) << "found include-file \"" << includeFile << "\"" << endl;
}
- int id = parent->insertItem( i18n( "#include \"%1\" ( defines %2 )" ).arg ( includeFile ).arg( decl.name ), struk.receiver, TQT_SLOT( popupAction( int ) ) );
+ int id = parent->insertItem( i18n( "#include \"%1\" ( defines %2 )" ).arg ( includeFile ).arg( decl.name ), struk.receiver, TQ_SLOT( popupAction( int ) ) );
DeclarationInfo fakeDec;
fakeDec.name = decl.name;
fakeDec.file = includeFile;
@@ -671,7 +671,7 @@ class PopupFiller {
f.type = d.desc();
f.memberType = SimpleTypeImpl::MemberInfo::Variable;
- /*int id = m->insertItem( i18n("jump to variable-declaration \"%1\"").arg( type.sourceVariable.name ) , this, TQT_SLOT( popupAction( int ) ) );
+ /*int id = m->insertItem( i18n("jump to variable-declaration \"%1\"").arg( type.sourceVariable.name ) , this, TQ_SLOT( popupAction( int ) ) );
m_popupActions.insert( id, type.sourceVariable );*/
struk.insertItem( parent, f, prefix );
@@ -683,7 +683,7 @@ class PopupFiller {
parent->insertItem( i18n( "Comment on %1" ).arg( sourceVariable.name ), m );
TQStringList ls = prepareTextForMenu( sourceVariable.comment, 15, 100 );
for ( TQStringList::iterator it = ls.begin(); it != ls.end(); ++it ) {
- m->insertItem( *it, 0, TQT_SLOT( popupClassViewAction( int ) ) );
+ m->insertItem( *it, 0, TQ_SLOT( popupClassViewAction( int ) ) );
}
parent->insertSeparator();
}
@@ -764,7 +764,7 @@ class PopupFiller {
mo->insertItem( i18n( "Comment" ), m );
TQStringList ls = prepareTextForMenu( ( *it ).first.decl.comment, 15, 100 );
for ( TQStringList::iterator it = ls.begin(); it != ls.end(); ++it ) {
- m->insertItem( *it, 0, TQT_SLOT( popupClassViewAction( int ) ) );
+ m->insertItem( *it, 0, TQ_SLOT( popupClassViewAction( int ) ) );
}
}
@@ -796,7 +796,7 @@ class PopupFiller {
parent->insertItem( i18n( "Comment on %1" ).arg( cleanForMenu( d->name() ) ), m );
TQStringList ls = prepareTextForMenu( d->resolved() ->comment(), 15, 100 );
for ( TQStringList::iterator it = ls.begin(); it != ls.end(); ++it ) {
- m->insertItem( *it, 0, TQT_SLOT( popupClassViewAction( int ) ) );
+ m->insertItem( *it, 0, TQ_SLOT( popupClassViewAction( int ) ) );
}
}
}
@@ -896,7 +896,7 @@ m_codeCompleteCh2Rx( "(->)|(\\:\\:)" ) {
m_pSupport = part;
- connect( m_pSupport->codeCompletionConfig(), TQT_SIGNAL( stored() ), this, TQT_SLOT( emptyCache() ) );
+ connect( m_pSupport->codeCompletionConfig(), TQ_SIGNAL( stored() ), this, TQ_SLOT( emptyCache() ) );
m_activeCursor = 0;
m_activeEditor = 0;
@@ -908,17 +908,17 @@ m_codeCompleteCh2Rx( "(->)|(\\:\\:)" ) {
m_ccLine = 0;
m_ccColumn = 0;
- connect( m_ccTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) );
- connect( m_showStatusTextTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotStatusTextTimeout() ) );
+ connect( m_ccTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTimeout() ) );
+ connect( m_showStatusTextTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotStatusTextTimeout() ) );
computeFileEntryList();
CppSupportPart* cppSupport = m_pSupport;
- connect( cppSupport->project(), TQT_SIGNAL( addedFilesToProject( const TQStringList& ) ),
- this, TQT_SLOT( computeFileEntryList() ) );
- connect( cppSupport->project(), TQT_SIGNAL( removedFilesFromProject( const TQStringList& ) ),
- this, TQT_SLOT( computeFileEntryList() ) );
- connect( cppSupport, TQT_SIGNAL( synchronousParseReady( const TQString&, ParsedFilePointer ) ), this, TQT_SLOT( synchronousParseReady( const TQString&, ParsedFilePointer ) ) );
+ connect( cppSupport->project(), TQ_SIGNAL( addedFilesToProject( const TQStringList& ) ),
+ this, TQ_SLOT( computeFileEntryList() ) );
+ connect( cppSupport->project(), TQ_SIGNAL( removedFilesFromProject( const TQStringList& ) ),
+ this, TQ_SLOT( computeFileEntryList() ) );
+ connect( cppSupport, TQ_SIGNAL( synchronousParseReady( const TQString&, ParsedFilePointer ) ), this, TQ_SLOT( synchronousParseReady( const TQString&, ParsedFilePointer ) ) );
m_bArgHintShow = false;
m_bCompletionBoxShow = false;
@@ -928,9 +928,9 @@ m_codeCompleteCh2Rx( "(->)|(\\:\\:)" ) {
m_repository = new CodeInformationRepository( cppSupport->codeRepository() );
- connect( cppSupport->codeRepository(), TQT_SIGNAL(catalogRegistered( Catalog* )), this, TQT_SLOT( emptyCache() ) );
- connect( cppSupport->codeRepository(), TQT_SIGNAL(catalogUnregistered( Catalog* )), this, TQT_SLOT( emptyCache() ) );
- connect( cppSupport->codeRepository(), TQT_SIGNAL(catalogChanged( Catalog* )), this, TQT_SLOT( emptyCache() ) );
+ connect( cppSupport->codeRepository(), TQ_SIGNAL(catalogRegistered( Catalog* )), this, TQ_SLOT( emptyCache() ) );
+ connect( cppSupport->codeRepository(), TQ_SIGNAL(catalogUnregistered( Catalog* )), this, TQ_SLOT( emptyCache() ) );
+ connect( cppSupport->codeRepository(), TQ_SIGNAL(catalogChanged( Catalog* )), this, TQ_SLOT( emptyCache() ) );
setupCodeInformationRepository();
@@ -945,22 +945,22 @@ m_codeCompleteCh2Rx( "(->)|(\\:\\:)" ) {
if ( part->partController() ->activePart() )
slotActivePartChanged( part->partController() ->activePart() );
- connect( part->partController( ), TQT_SIGNAL( partAdded( KParts::Part* ) ),
- this, TQT_SLOT( slotPartAdded( KParts::Part* ) ) );
- connect( part->partController( ), TQT_SIGNAL( activePartChanged( KParts::Part* ) ),
- this, TQT_SLOT( slotActivePartChanged( KParts::Part* ) ) );
+ connect( part->partController( ), TQ_SIGNAL( partAdded( KParts::Part* ) ),
+ this, TQ_SLOT( slotPartAdded( KParts::Part* ) ) );
+ connect( part->partController( ), TQ_SIGNAL( activePartChanged( KParts::Part* ) ),
+ this, TQ_SLOT( slotActivePartChanged( KParts::Part* ) ) );
- connect( part, TQT_SIGNAL( fileParsed( const TQString& ) ),
- this, TQT_SLOT( slotFileParsed( const TQString& ) ) );
- connect( part, TQT_SIGNAL( codeModelUpdated( const TQString& ) ),
- this, TQT_SLOT( slotCodeModelUpdated( const TQString& ) ) );
+ connect( part, TQ_SIGNAL( fileParsed( const TQString& ) ),
+ this, TQ_SLOT( slotFileParsed( const TQString& ) ) );
+ connect( part, TQ_SIGNAL( codeModelUpdated( const TQString& ) ),
+ this, TQ_SLOT( slotCodeModelUpdated( const TQString& ) ) );
TDEAction * action = new TDEAction( i18n("Jump to declaration under cursor"), 0, CTRL + Key_Comma,
- this, TQT_SLOT(slotJumpToDeclCursorContext()), part->actionCollection(), "jump_to_declaration_cursor_context" );
+ this, TQ_SLOT(slotJumpToDeclCursorContext()), part->actionCollection(), "jump_to_declaration_cursor_context" );
action->plug( &m_DummyActionWidget );
action = new TDEAction( i18n("Jump to definition under cursor"), 0, CTRL + Key_Period,
- this, TQT_SLOT(slotJumpToDefCursorContext()), part->actionCollection(), "jump_to_defintion_cursor_context" );
+ this, TQ_SLOT(slotJumpToDefCursorContext()), part->actionCollection(), "jump_to_defintion_cursor_context" );
action->plug( &m_DummyActionWidget );
}
@@ -1028,13 +1028,13 @@ void CppCodeCompletion::integratePart( KParts::Part * part ) {
if ( m_pSupport ) { //The slot should connected even when automatic completion is disabled, so it can be enabled any time
kdDebug( 9007 ) << k_funcinfo << "enabling code completion" << endl;
- connect( part, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( slotTextChanged() ) );
- connect( part->widget(), TQT_SIGNAL( completionDone() ), this,
- TQT_SLOT( slotCompletionBoxHidden() ) );
- connect( part->widget(), TQT_SIGNAL( completionAborted() ), this,
- TQT_SLOT( slotCompletionBoxHidden() ) );
- connect( part->widget(), TQT_SIGNAL( argHintHidden() ), this,
- TQT_SLOT( slotArgHintHidden() ) );
+ connect( part, TQ_SIGNAL( textChanged() ), this, TQ_SLOT( slotTextChanged() ) );
+ connect( part->widget(), TQ_SIGNAL( completionDone() ), this,
+ TQ_SLOT( slotCompletionBoxHidden() ) );
+ connect( part->widget(), TQ_SIGNAL( completionAborted() ), this,
+ TQ_SLOT( slotCompletionBoxHidden() ) );
+ connect( part->widget(), TQ_SIGNAL( argHintHidden() ), this,
+ TQ_SLOT( slotArgHintHidden() ) );
}
}
}
@@ -1047,7 +1047,7 @@ void CppCodeCompletion::slotActivePartChanged( KParts::Part * part ) {
emptyCache();
this->d->recoveryPoints.clear();
if ( m_activeHintInterface && m_activeView ) {
- disconnect( m_activeView , TQT_SIGNAL( needTextHint( int, int, TQString & ) ), this, TQT_SLOT( slotTextHint( int, int, TQString& ) ) );
+ disconnect( m_activeView , TQ_SIGNAL( needTextHint( int, int, TQString & ) ), this, TQ_SLOT( slotTextHint( int, int, TQString& ) ) );
m_activeHintInterface = 0;
}
@@ -1094,7 +1094,7 @@ void CppCodeCompletion::slotActivePartChanged( KParts::Part * part ) {
if ( m_activeHintInterface ) {
#ifndef DISABLETOOLTIPS
m_activeHintInterface->enableTextHints( 500 );
- connect( m_activeView, TQT_SIGNAL( needTextHint( int, int, TQString & ) ), this, TQT_SLOT( slotTextHint( int, int, TQString& ) ) );
+ connect( m_activeView, TQ_SIGNAL( needTextHint( int, int, TQString & ) ), this, TQ_SLOT( slotTextHint( int, int, TQString& ) ) );
#endif
} else {
@@ -1537,7 +1537,7 @@ void CppCodeCompletion::contextEvaluationMenus ( TQPopupMenu *popup, const Conte
else
gid = popup->insertItem( i18n( "Navigate by Macro \"%1\"" ).arg( cleanForMenu( type.macro.name() ) ), m );
- int id = m->insertItem( i18n( "Jump to %1" ).arg( cleanForMenu( type.macro.name() ) ), this, TQT_SLOT( popupAction( int ) ) );
+ int id = m->insertItem( i18n( "Jump to %1" ).arg( cleanForMenu( type.macro.name() ) ), this, TQ_SLOT( popupAction( int ) ) );
TQPopupMenu * b = PopupTracker::createPopup( m );
m->insertItem( i18n( "Body" ), b );
@@ -1551,7 +1551,7 @@ void CppCodeCompletion::contextEvaluationMenus ( TQPopupMenu *popup, const Conte
TQStringList ls = prepareTextForMenu( type.macro.body(), 20, 100 );
for ( TQStringList::iterator it = ls.begin(); it != ls.end(); ++it ) {
- b->insertItem( *it, 0, TQT_SLOT( popupClassViewAction( int ) ) );
+ b->insertItem( *it, 0, TQ_SLOT( popupClassViewAction( int ) ) );
}
}
@@ -1569,7 +1569,7 @@ void CppCodeCompletion::contextEvaluationMenus ( TQPopupMenu *popup, const Conte
else
gid = popup->insertItem( i18n( "Goto Include File: %1" ).arg( cleanForMenu( includeFileName ) ), m );
- int id = m->insertItem( i18n( "Jump to %1" ).arg( cleanForMenu( includeFilePath ) ), this, TQT_SLOT( popupAction( int ) ) );
+ int id = m->insertItem( i18n( "Jump to %1" ).arg( cleanForMenu( includeFilePath ) ), this, TQ_SLOT( popupAction( int ) ) );
DeclarationInfo i;
i.file = includeFilePath;
@@ -1617,7 +1617,7 @@ void CppCodeCompletion::contextEvaluationMenus ( TQPopupMenu *popup, const Conte
popup->setWhatsThis( gid, i18n( "<b>Navigation</b><p>Provides a menu to navigate to positions of items that are involved in this expression" ) );
/*if( type.sourceVariable && type.sourceVariable.name != "this" ) {
- int id = m->insertItem( i18n("jump to variable-declaration \"%1\"").arg( type.sourceVariable.name ) , this, TQT_SLOT( popupAction( int ) ) );
+ int id = m->insertItem( i18n("jump to variable-declaration \"%1\"").arg( type.sourceVariable.name ) , this, TQ_SLOT( popupAction( int ) ) );
m_popupActions.insert( id, type.sourceVariable );
}*/
@@ -2500,8 +2500,8 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) {
if ( start_expr != int( contents.length() ) )
expr = contents.mid( start_expr, contents.length() - start_expr ).stripWhiteSpace();
- if ( expr.startsWith( "SIGNAL" ) || expr.startsWith( "SLOT" ) ) {
- m_completionMode = expr.startsWith( "SIGNAL" ) ? SignalCompletion : SlotCompletion;
+ if ( expr.startsWith( "TQ_SIGNAL" ) || expr.startsWith( "TQ_SLOT" ) ) {
+ m_completionMode = expr.startsWith( "TQ_SIGNAL" ) ? SignalCompletion : SlotCompletion;
showArguments = false;
int end_expr = start_expr - 1;
@@ -2705,8 +2705,8 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) {
if ( start_expr != int( contents.length() ) )
expr = contents.mid( start_expr, contents.length() - start_expr ).stripWhiteSpace();
- if ( expr.startsWith( "SIGNAL" ) || expr.startsWith( "SLOT" ) ) {
- m_completionMode = expr.startsWith( "SIGNAL" ) ? SignalCompletion : SlotCompletion;
+ if ( expr.startsWith( "TQ_SIGNAL" ) || expr.startsWith( "TQ_SLOT" ) ) {
+ m_completionMode = expr.startsWith( "TQ_SIGNAL" ) ? SignalCompletion : SlotCompletion;
showArguments = false;
int end_expr = start_expr - 1;