Fix missing Q_OBJECT macros

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1245170 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 03df9d8aeb
commit 093de0db4f

@ -43,7 +43,7 @@ CppImplementationWidget::CppImplementationWidget( KDevLanguageSupport *part,
TQStringList CppImplementationWidget::createClassFiles()
{
TQString template_h = "#ifndef $DEFTEXT$_H\n#define $DEFTEXT$_H\n\n#include \"$BASEINCLUDE$\"\n\nclass $CLASSNAME$: public $BASECLASSNAME$ {\nTQ_OBJECT\npublic:\n $CLASSNAME$(TQWidget *tqparent = 0, const char *name = 0);\n};\n\n#endif\n";
TQString template_h = "#ifndef $DEFTEXT$_H\n#define $DEFTEXT$_H\n\n#include \"$BASEINCLUDE$\"\n\nclass $CLASSNAME$: public $BASECLASSNAME$ {\nQ_OBJECT\nTQ_OBJECT\npublic:\n $CLASSNAME$(TQWidget *tqparent = 0, const char *name = 0);\n};\n\n#endif\n";
TQString template_cpp = "#include \"$CLASSINCLUDE$\"\n\n$CLASSNAME$::$CLASSNAME$(TQWidget *tqparent, const char *name)\n :$BASECLASSNAME$(tqparent, name)\n{\n}\n";
if ( m_part->project() ->options() == KDevProject::UsesAutotoolsBuildSystem )
template_cpp += "\n#include \"$TQMOCINCLUDE$\"\n";

@ -2013,7 +2013,7 @@ void CppNewClassDialog::ClassGenerator::gen_interface()
TQString qobjectStr;
if ( childClass || qobject )
qobjectStr = "TQ_OBJECT";
qobjectStr = "Q_OBJECT\nTQ_OBJECT";
TQString baseclass;

@ -597,6 +597,7 @@ void Driver::setupLexer( Lexer * lexer ) {
lexer->addSkipWord( "KDE_DEPRECATED" );
// qt
lexer->addSkipWord( "Q_OBJECT" );
lexer->addSkipWord( "TQ_OBJECT" );
lexer->addSkipWord( "TQ_OVERRIDE", SkipWordAndArguments );
lexer->addSkipWord( "Q_ENUMS", SkipWordAndArguments );

@ -9,6 +9,7 @@ INSERT( "k_dcop", Token_k_dcop );
INSERT( "k_dcop_signals", Token_k_dcop_signals );
// TQt Keywords
INSERT( "Q_OBJECT", Token_Q_OBJECT );
INSERT( "TQ_OBJECT", Token_TQ_OBJECT );
INSERT( "signals", Token_signals );
INSERT( "slots", Token_slots );

@ -60,6 +60,7 @@ enum Type {
Token_k_dcop,
Token_k_dcop_signals,
Token_Q_OBJECT,
Token_TQ_OBJECT,
Token_signals,
Token_slots,

@ -2005,7 +2005,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node )
if( lex->lookAhead(0) == ';' ){
nextToken();
return true;
} else if( lex->lookAhead(0) == Token_TQ_OBJECT || lex->lookAhead(0) == Token_K_DCOP ){
} else if( lex->lookAhead(0) == Token_Q_OBJECT || lex->lookAhead(0) == Token_TQ_OBJECT || lex->lookAhead(0) == Token_K_DCOP ){
nextToken();
return true;
} else if( lex->lookAhead(0) == Token_signals || lex->lookAhead(0) == Token_k_dcop || lex->lookAhead(0) == Token_k_dcop_signals ){

Loading…
Cancel
Save