diff options
Diffstat (limited to 'lib')
60 files changed, 661 insertions, 708 deletions
diff --git a/lib/antlr/antlr/CharScanner.h b/lib/antlr/antlr/CharScanner.h index 9ad6fc7b..4a0816a8 100644 --- a/lib/antlr/antlr/CharScanner.h +++ b/lib/antlr/antlr/CharScanner.h @@ -10,6 +10,7 @@ #include <antlr/config.h> +#include <functional> #include <map> #ifdef HAS_NOT_CCTYPE_H @@ -40,8 +41,6 @@ namespace antlr { class ANTLR_API CharScanner; -ANTLR_C_USING(tolower) - #ifdef ANTLR_REALLY_NO_STRCASECMP // Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior // on the mac has neither... @@ -56,17 +55,11 @@ inline int strcasecmp(const char *s1, const char *s2) if (c1 == 0) return 0; } } -#else -#ifdef NO_STRCASECMP -ANTLR_C_USING(stricmp) -#else -ANTLR_C_USING(strcasecmp) -#endif #endif /** Functor for the literals map */ -class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)binary_function<ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string,bool> { +class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)function<bool(ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string)> { private: const CharScanner* scanner; public: diff --git a/lib/antlr/antlr/config.h b/lib/antlr/antlr/config.h index 4d3456ec..2e4c6e2f 100644 --- a/lib/antlr/antlr/config.h +++ b/lib/antlr/antlr/config.h @@ -18,7 +18,6 @@ #define ANTLR_USE_NAMESPACE(_x_) _x_:: #define ANTLR_USING_NAMESPACE(_x_) using namespace _x_; #define ANTLR_CXX_SUPPORTS_NAMESPACE 1 -#define ANTLR_C_USING(_x_) #define ANTLR_API #ifndef CUSTOM_API # define CUSTOM_API @@ -194,25 +193,6 @@ #endif // end IBM VisualAge C++ /*}}}*/ /*****************************************************************************/ -/*{{{ Metrowerks Codewarrior - *****************************************************************************/ -#ifdef __MWERKS__ -# if (__MWERKS__ <= 0x2201) -# define NO_TEMPLATE_PARTS -# endif - -// CW 6.0 and 7.0 still do not have it. -# define ANTLR_REALLY_NO_STRCASECMP - -# undef ANTLR_C_USING -# define ANTLR_C_USING(_x_) using std:: ## _x_; - -# define ANTLR_CCTYPE_NEEDS_STD -# undef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION - -#endif // End of Metrowerks Codewarrior -/*}}}*/ -/*****************************************************************************/ /*{{{ SGI Irix 6.5.10 MIPSPro compiler *****************************************************************************/ // (contributed by Anna Winkler) @@ -258,22 +238,6 @@ #endif // ! __GNUC__ /*}}}*/ /*****************************************************************************/ -/*{{{ Digital CXX (Tru64) - *****************************************************************************/ -#ifdef __DECCXX -#define __USE_STD_IOSTREAM -#endif -/*}}}*/ -/*****************************************************************************/ -#ifdef __BORLANDC__ -# if __BORLANDC__ >= 560 -# include <ctype> -# include <stdlib> -# define ANTLR_CCTYPE_NEEDS_STD -# else -# error "sorry, compiler is too old - consider an update." -# endif -#endif // Redefine these for backwards compatability.. #undef ANTLR_BEGIN_NAMESPACE diff --git a/lib/antlr/src/CharScanner.cpp b/lib/antlr/src/CharScanner.cpp index 63545468..ba217983 100644 --- a/lib/antlr/src/CharScanner.cpp +++ b/lib/antlr/src/CharScanner.cpp @@ -13,7 +13,6 @@ #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif -ANTLR_C_USING(exit) CharScanner::CharScanner(InputBuffer& cb, bool case_sensitive ) : saveConsumedInput(true) //, caseSensitiveLiterals(true) diff --git a/lib/antlr/src/String.cpp b/lib/antlr/src/String.cpp index 6d8b43cf..4de93c8a 100644 --- a/lib/antlr/src/String.cpp +++ b/lib/antlr/src/String.cpp @@ -19,15 +19,6 @@ namespace antlr { #endif -// wh: hack for Borland C++ 5.6 -#if __BORLANDC__ - using std::sprintf; -#endif - - -// RK: should be using snprintf actually... (or stringstream) -ANTLR_C_USING(sprintf) - ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, const int rhs ) { char tmp[100]; diff --git a/lib/astyle/ASFormatter.cpp b/lib/astyle/ASFormatter.cpp index eb418760..6e7a70f0 100644 --- a/lib/astyle/ASFormatter.cpp +++ b/lib/astyle/ASFormatter.cpp @@ -388,7 +388,7 @@ string ASFormatter::nextLine() isAppendPostBlockEmptyLineRequested = false; isInLineComment = true; // do not indent if in column 1 or 2 - if (lineCommentNoIndent == false) + if (!lineCommentNoIndent) { if (charNum == 0) lineCommentNoIndent = true; @@ -396,7 +396,7 @@ string ASFormatter::nextLine() lineCommentNoIndent = true; } // move comment if spaces were added or deleted - if (lineCommentNoIndent == false && spacePadNum != 0) + if (!lineCommentNoIndent && spacePadNum != 0) adjustComments(); formattedLineCommentNum = formattedLine.length(); appendSequence(AS_OPEN_LINE_COMMENT); @@ -1652,7 +1652,7 @@ void ASFormatter::adjustComments(void) if (formattedLine.find_last_not_of(' ') < len - adjust - 1 && formattedLine[len-1] != '\t') // don't adjust a tab formattedLine.resize(len - adjust); - // the following are commented out to avoid a Borland compiler warning + // the following are commented out to avoid compiler warning //else // adjust = 0; TRcomment(-adjust); // trace macro diff --git a/lib/cppparser/ast.cpp b/lib/cppparser/ast.cpp index f0cc848c..21c7f375 100644 --- a/lib/cppparser/ast.cpp +++ b/lib/cppparser/ast.cpp @@ -219,13 +219,13 @@ void NameAST::setGlobal( bool b ) void NameAST::setUnqualifiedName( ClassOrNamespaceNameAST::Node& unqualifiedName ) { - m_unqualifiedName = unqualifiedName; - if( m_unqualifiedName.get() ) m_unqualifiedName->setParent( this ); + m_unqualifiedName = std::move(unqualifiedName); + if( m_unqualifiedName ) m_unqualifiedName->setParent( this ); } void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNamespaceName ) { - if( !classOrNamespaceName.get() ) + if( !classOrNamespaceName ) return; classOrNamespaceName->setParent( this ); @@ -234,7 +234,7 @@ void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNam TQString NameAST::text() const { - if( !m_unqualifiedName.get() ) + if( !m_unqualifiedName ) return TQString(); TQString str; @@ -249,7 +249,7 @@ TQString NameAST::text() const ++it; } - if( m_unqualifiedName.get() ) + if( m_unqualifiedName ) str += m_unqualifiedName->text(); return str; @@ -268,7 +268,7 @@ LinkageBodyAST::LinkageBodyAST() void LinkageBodyAST::addDeclaration( DeclarationAST::Node& ast ) { - if( !ast.get() ) + if( !ast ) return; ast->setParent( this ); @@ -282,32 +282,32 @@ LinkageSpecificationAST::LinkageSpecificationAST() void LinkageSpecificationAST::setExternType( AST::Node& externType ) { - m_externType = externType; - if( m_externType.get() ) m_externType->setParent( this ); + m_externType = std::move(externType); + if( m_externType ) m_externType->setParent( this ); } void LinkageSpecificationAST::setLinkageBody( LinkageBodyAST::Node& linkageBody ) { - m_linkageBody = linkageBody; - if( m_linkageBody.get() ) m_linkageBody->setParent( this ); + m_linkageBody = std::move(linkageBody); + if( m_linkageBody ) m_linkageBody->setParent( this ); } void LinkageSpecificationAST::setDeclaration( DeclarationAST::Node& decl ) { - m_declaration = decl; - if( m_declaration.get() ) m_declaration->setParent( this ); + m_declaration = std::move(decl); + if( m_declaration ) m_declaration->setParent( this ); } // ------------------------------------------------------------------------ TranslationUnitAST::TranslationUnitAST() { - ////kdDebug(9007) << "++ TranslationUnitAST::TranslationUnitAST()" << endl; + //kdDebug(9007) << "++ TranslationUnitAST::TranslationUnitAST()" << endl; m_declarationList.setAutoDelete( true ); } void TranslationUnitAST::addDeclaration( DeclarationAST::Node& ast ) { - if( !ast.get() ) + if( !ast ) return; ast->setParent( this ); @@ -321,14 +321,14 @@ NamespaceAST::NamespaceAST() void NamespaceAST::setNamespaceName( AST::Node& namespaceName ) { - m_namespaceName = namespaceName; - if( m_namespaceName.get() ) m_namespaceName->setParent( this ); + m_namespaceName = std::move(namespaceName); + if( m_namespaceName ) m_namespaceName->setParent( this ); } void NamespaceAST::setLinkageBody( LinkageBodyAST::Node& linkageBody ) { - m_linkageBody = linkageBody; - if( m_linkageBody.get() ) m_linkageBody->setParent( this ); + m_linkageBody = std::move(linkageBody); + if( m_linkageBody ) m_linkageBody->setParent( this ); } @@ -339,14 +339,14 @@ NamespaceAliasAST::NamespaceAliasAST() void NamespaceAliasAST::setNamespaceName( AST::Node& namespaceName ) { - m_namespaceName = namespaceName; - if( m_namespaceName.get() ) m_namespaceName->setParent( this ); + m_namespaceName = std::move(namespaceName); + if( m_namespaceName ) m_namespaceName->setParent( this ); } void NamespaceAliasAST::setAliasName( NameAST::Node& name ) { - m_aliasName = name; - if( m_aliasName.get() ) m_aliasName->setParent( this ); + m_aliasName = std::move(name); + if( m_aliasName ) m_aliasName->setParent( this ); } // ------------------------------------------------------------------------ @@ -356,14 +356,14 @@ UsingAST::UsingAST() void UsingAST::setTypeName( AST::Node& typeName ) { - m_typeName = typeName; - if( m_typeName.get() ) m_typeName->setParent( this ); + m_typeName = std::move(typeName); + if( m_typeName ) m_typeName->setParent( this ); } void UsingAST::setName( NameAST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } // ------------------------------------------------------------------------ @@ -373,8 +373,8 @@ UsingDirectiveAST::UsingDirectiveAST() void UsingDirectiveAST::setName( NameAST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } TypedefAST::TypedefAST() @@ -383,20 +383,20 @@ TypedefAST::TypedefAST() void TypeSpecifierAST::setName( NameAST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } void TypedefAST::setTypeSpec( TypeSpecifierAST::Node& typeSpec ) { - m_typeSpec = typeSpec; - if( m_typeSpec.get() ) m_typeSpec->setParent( this ); + m_typeSpec = std::move(typeSpec); + if( m_typeSpec ) m_typeSpec->setParent( this ); } void TypedefAST::setInitDeclaratorList( InitDeclaratorListAST::Node& initDeclaratorList ) { - m_initDeclaratorList = initDeclaratorList; - if( m_initDeclaratorList.get() ) m_initDeclaratorList->setParent( this ); + m_initDeclaratorList = std::move(initDeclaratorList); + if( m_initDeclaratorList ) m_initDeclaratorList->setParent( this ); } // ------------------------------------------------------------------------ @@ -407,7 +407,7 @@ TemplateArgumentListAST::TemplateArgumentListAST() void TemplateArgumentListAST::addArgument( AST::Node& arg ) { - if( !arg.get() ) + if( !arg ) return; arg->setParent( this ); @@ -434,20 +434,20 @@ TemplateDeclarationAST::TemplateDeclarationAST() void TemplateDeclarationAST::setExported( AST::Node& exported ) { - m_exported = exported; - if( m_exported.get() ) m_exported->setParent( this ); + m_exported = std::move(exported); + if( m_exported ) m_exported->setParent( this ); } void TemplateDeclarationAST::setTemplateParameterList( TemplateParameterListAST::Node& templateParameterList ) { - m_templateParameterList = templateParameterList; - if( m_templateParameterList.get() ) m_templateParameterList->setParent( this ); + m_templateParameterList = std::move(templateParameterList); + if( m_templateParameterList ) m_templateParameterList->setParent( this ); } void TemplateDeclarationAST::setDeclaration( DeclarationAST::Node& declaration ) { - m_declaration = declaration; - if( m_declaration.get() ) m_declaration->setParent( this ); + m_declaration = std::move(declaration); + if( m_declaration ) m_declaration->setParent( this ); } // ------------------------------------------------------------------------ @@ -457,23 +457,23 @@ ClassOrNamespaceNameAST::ClassOrNamespaceNameAST() void ClassOrNamespaceNameAST::setName( AST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } void ClassOrNamespaceNameAST::setTemplateArgumentList( TemplateArgumentListAST::Node& templateArgumentList ) { - m_templateArgumentList = templateArgumentList; - if( m_templateArgumentList.get() ) m_templateArgumentList->setParent( this ); + m_templateArgumentList = std::move(templateArgumentList); + if( m_templateArgumentList ) m_templateArgumentList->setParent( this ); } TQString ClassOrNamespaceNameAST::text() const { - if( !m_name.get() ) + if( !m_name ) return TQString(); TQString str = m_name->text(); - if( m_templateArgumentList.get() ) + if( m_templateArgumentList ) str += TQString::fromLatin1("< ") + m_templateArgumentList->text() + TQString::fromLatin1(" >"); return str; @@ -486,27 +486,27 @@ TypeSpecifierAST::TypeSpecifierAST() void TypeSpecifierAST::setCvQualify( GroupAST::Node& cvQualify ) { - m_cvQualify = cvQualify; - if( m_cvQualify.get() ) m_cvQualify->setParent( this ); + m_cvQualify = std::move(cvQualify); + if( m_cvQualify ) m_cvQualify->setParent( this ); } void TypeSpecifierAST::setCv2Qualify( GroupAST::Node& cv2Qualify ) { - m_cv2Qualify = cv2Qualify; - if( m_cv2Qualify.get() ) m_cv2Qualify->setParent( this ); + m_cv2Qualify = std::move(cv2Qualify); + if( m_cv2Qualify ) m_cv2Qualify->setParent( this ); } TQString TypeSpecifierAST::text() const { TQString str; - if( m_cvQualify.get() ) + if( m_cvQualify ) str += m_cvQualify->text() + " "; - if( m_name.get() ) + if( m_name ) str += m_name->text(); - if( m_cv2Qualify.get() ) + if( m_cv2Qualify ) str += TQString(" ") + m_cv2Qualify->text(); return str; @@ -520,13 +520,13 @@ ClassSpecifierAST::ClassSpecifierAST() void ClassSpecifierAST::setClassKey( AST::Node& classKey ) { - m_classKey = classKey; - if( m_classKey.get() ) m_classKey->setParent( this ); + m_classKey = std::move(classKey); + if( m_classKey ) m_classKey->setParent( this ); } void ClassSpecifierAST::addDeclaration( DeclarationAST::Node& declaration ) { - if( !declaration.get() ) + if( !declaration ) return; declaration->setParent( this ); @@ -535,8 +535,8 @@ void ClassSpecifierAST::addDeclaration( DeclarationAST::Node& declaration ) void ClassSpecifierAST::setBaseClause( BaseClauseAST::Node& baseClause ) { - m_baseClause = baseClause; - if( m_baseClause.get() ) m_baseClause->setParent( this ); + m_baseClause = std::move(baseClause); + if( m_baseClause ) m_baseClause->setParent( this ); } // ------------------------------------------------------------------------ @@ -547,7 +547,7 @@ EnumSpecifierAST::EnumSpecifierAST() void EnumSpecifierAST::addEnumerator( EnumeratorAST::Node& enumerator ) { - if( !enumerator.get() ) + if( !enumerator ) return; enumerator->setParent( this ); @@ -562,13 +562,13 @@ ElaboratedTypeSpecifierAST::ElaboratedTypeSpecifierAST() void ElaboratedTypeSpecifierAST::setKind( AST::Node& kind ) { - m_kind = kind; - if( m_kind.get() ) m_kind->setParent( this ); + m_kind = std::move(kind); + if( m_kind ) m_kind->setParent( this ); } TQString ElaboratedTypeSpecifierAST::text() const { - if( m_kind.get() ) + if( m_kind ) return m_kind->text() + " " + TypeSpecifierAST::text(); return TypeSpecifierAST::text(); @@ -586,14 +586,14 @@ EnumeratorAST::EnumeratorAST() void EnumeratorAST::setId( AST::Node& id ) { - m_id = id; - if( m_id.get() ) m_id->setParent( this ); + m_id = std::move(id); + if( m_id ) m_id->setParent( this ); } void EnumeratorAST::setExpr( AST::Node& expr ) { - m_expr = expr; - if( m_expr.get() ) m_expr->setParent( this ); + m_expr = std::move(expr); + if( m_expr ) m_expr->setParent( this ); } // ------------------------------------------------------------------------ @@ -604,7 +604,7 @@ BaseClauseAST::BaseClauseAST() void BaseClauseAST::addBaseSpecifier( BaseSpecifierAST::Node& baseSpecifier ) { - if( !baseSpecifier.get() ) + if( !baseSpecifier ) return; baseSpecifier->setParent( this ); @@ -618,20 +618,20 @@ BaseSpecifierAST::BaseSpecifierAST() void BaseSpecifierAST::setIsVirtual( AST::Node& isVirtual ) { - m_isVirtual = isVirtual; - if( m_isVirtual.get() ) m_isVirtual->setParent( this ); + m_isVirtual = std::move(isVirtual); + if( m_isVirtual ) m_isVirtual->setParent( this ); } void BaseSpecifierAST::setAccess( AST::Node& access ) { - m_access = access; - if( m_access.get() ) m_access->setParent( this ); + m_access = std::move(access); + if( m_access ) m_access->setParent( this ); } void BaseSpecifierAST::setName( NameAST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } // ------------------------------------------------------------------------ @@ -641,32 +641,32 @@ SimpleDeclarationAST::SimpleDeclarationAST() void SimpleDeclarationAST::setFunctionSpecifier( GroupAST::Node& functionSpecifier ) { - m_functionSpecifier = functionSpecifier; - if( m_functionSpecifier.get() ) m_functionSpecifier->setParent( this ); + m_functionSpecifier = std::move(functionSpecifier); + if( m_functionSpecifier ) m_functionSpecifier->setParent( this ); } void SimpleDeclarationAST::setStorageSpecifier( GroupAST::Node& storageSpecifier ) { - m_storageSpecifier = storageSpecifier; - if( m_storageSpecifier.get() ) m_storageSpecifier->setParent( this ); + m_storageSpecifier = std::move(storageSpecifier); + if( m_storageSpecifier ) m_storageSpecifier->setParent( this ); } void SimpleDeclarationAST::setTypeSpec( TypeSpecifierAST::Node& typeSpec ) { - m_typeSpec = typeSpec; - if( m_typeSpec.get() ) m_typeSpec->setParent( this ); + m_typeSpec = std::move(typeSpec); + if( m_typeSpec ) m_typeSpec->setParent( this ); } void SimpleDeclarationAST::setInitDeclaratorList( InitDeclaratorListAST::Node& initDeclaratorList ) { - m_initDeclaratorList = initDeclaratorList; - if( m_initDeclaratorList.get() ) m_initDeclaratorList->setParent( this ); + m_initDeclaratorList = std::move(initDeclaratorList); + if( m_initDeclaratorList ) m_initDeclaratorList->setParent( this ); } void SimpleDeclarationAST::setWinDeclSpec( GroupAST::Node& winDeclSpec ) { - m_winDeclSpec = winDeclSpec; - if( m_winDeclSpec.get() ) m_winDeclSpec->setParent( this ); + m_winDeclSpec = std::move(winDeclSpec); + if( m_winDeclSpec ) m_winDeclSpec->setParent( this ); } @@ -678,7 +678,7 @@ InitDeclaratorListAST::InitDeclaratorListAST() void InitDeclaratorListAST::addInitDeclarator( InitDeclaratorAST::Node& decl ) { - if( !decl.get() ) + if( !decl ) return; decl->setParent( this ); @@ -694,52 +694,52 @@ DeclaratorAST::DeclaratorAST() void DeclaratorAST::setSubDeclarator( DeclaratorAST::Node& subDeclarator ) { - m_subDeclarator = subDeclarator; - if( m_subDeclarator.get() ) m_subDeclarator->setParent( this ); + m_subDeclarator = std::move(subDeclarator); + if( m_subDeclarator ) m_subDeclarator->setParent( this ); } void DeclaratorAST::setDeclaratorId( NameAST::Node& declaratorId ) { - m_declaratorId = declaratorId; - if( m_declaratorId.get() ) m_declaratorId->setParent( this ); + m_declaratorId = std::move(declaratorId); + if( m_declaratorId ) m_declaratorId->setParent( this ); } void DeclaratorAST::setBitfieldInitialization( AST::Node& bitfieldInitialization ) { - m_bitfieldInitialization = bitfieldInitialization; - if( m_bitfieldInitialization.get() ) m_bitfieldInitialization->setParent( this ); + m_bitfieldInitialization = std::move(bitfieldInitialization); + if( m_bitfieldInitialization ) m_bitfieldInitialization->setParent( this ); } void DeclaratorAST::addArrayDimension( AST::Node& arrayDimension ) { - if( !arrayDimension.get() ) + if( !arrayDimension ) return; arrayDimension->setParent( this ); m_arrayDimensionList.append( arrayDimension.release() ); } -void DeclaratorAST::setParameterDeclarationClause( ParameterDeclarationClauseAST::Node& parameterDeclarationClause ) +void DeclaratorAST::setParameterDeclarationClause( std::unique_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause ) { - m_parameterDeclarationClause = parameterDeclarationClause; - if( m_parameterDeclarationClause.get() ) m_parameterDeclarationClause->setParent( this ); + m_parameterDeclarationClause = std::move(parameterDeclarationClause); + if( m_parameterDeclarationClause ) m_parameterDeclarationClause->setParent( this ); } void DeclaratorAST::setConstant( AST::Node& constant ) { - m_constant = constant; - if( m_constant.get() ) m_constant->setParent( this ); + m_constant = std::move(constant); + if( m_constant ) m_constant->setParent( this ); } void DeclaratorAST::setExceptionSpecification( GroupAST::Node& exceptionSpecification ) { - m_exceptionSpecification = exceptionSpecification; - if( m_exceptionSpecification.get() ) m_exceptionSpecification->setParent( this ); + m_exceptionSpecification = std::move(exceptionSpecification); + if( m_exceptionSpecification ) m_exceptionSpecification->setParent( this ); } void DeclaratorAST::addPtrOp( AST::Node& ptrOp ) { - if( !ptrOp.get() ) + if( !ptrOp ) return; ptrOp->setParent( this ); @@ -753,14 +753,14 @@ InitDeclaratorAST::InitDeclaratorAST() void InitDeclaratorAST::setDeclarator( DeclaratorAST::Node& declarator ) { - m_declarator = declarator; - if( m_declarator.get() ) m_declarator->setParent( this ); + m_declarator = std::move(declarator); + if( m_declarator ) m_declarator->setParent( this ); } void InitDeclaratorAST::setInitializer( AST::Node& initializer ) { - m_initializer = initializer; - if( m_initializer.get() ) m_initializer->setParent( this ); + m_initializer = std::move(initializer); + if( m_initializer ) m_initializer->setParent( this ); } // -------------------------------------------------------------------------- @@ -770,38 +770,38 @@ FunctionDefinitionAST::FunctionDefinitionAST() void FunctionDefinitionAST::setFunctionSpecifier( GroupAST::Node& functionSpecifier ) { - m_functionSpecifier = functionSpecifier; - if( m_functionSpecifier.get() ) m_functionSpecifier->setParent( this ); + m_functionSpecifier = std::move(functionSpecifier); + if( m_functionSpecifier ) m_functionSpecifier->setParent( this ); } void FunctionDefinitionAST::setStorageSpecifier( GroupAST::Node& storageSpecifier ) { - m_storageSpecifier = storageSpecifier; - if( m_storageSpecifier.get() ) m_storageSpecifier->setParent( this ); + m_storageSpecifier = std::move(storageSpecifier); + if( m_storageSpecifier ) m_storageSpecifier->setParent( this ); } void FunctionDefinitionAST::setTypeSpec( TypeSpecifierAST::Node& typeSpec ) { - m_typeSpec = typeSpec; - if( m_typeSpec.get() ) m_typeSpec->setParent( this ); + m_typeSpec = std::move(typeSpec); + if( m_typeSpec ) m_typeSpec->setParent( this ); } void FunctionDefinitionAST::setInitDeclarator( InitDeclaratorAST::Node& initDeclarator ) { - m_initDeclarator = initDeclarator; - if( m_initDeclarator.get() ) m_initDeclarator->setParent( this ); + m_initDeclarator = std::move(initDeclarator); + if( m_initDeclarator ) m_initDeclarator->setParent( this ); } void FunctionDefinitionAST::setFunctionBody( StatementListAST::Node& functionBody ) { - m_functionBody = functionBody; - if( m_functionBody.get() ) m_functionBody->setParent( this ); + m_functionBody = std::move(functionBody); + if( m_functionBody ) m_functionBody->setParent( this ); } void FunctionDefinitionAST::setWinDeclSpec( GroupAST::Node& winDeclSpec ) { - m_winDeclSpec = winDeclSpec; - if( m_winDeclSpec.get() ) m_winDeclSpec->setParent( this ); + m_winDeclSpec = std::move(winDeclSpec); + if( m_winDeclSpec ) m_winDeclSpec->setParent( this ); } // -------------------------------------------------------------------------- @@ -812,7 +812,7 @@ StatementListAST::StatementListAST() void StatementListAST::addStatement( StatementAST::Node& statement ) { - if( !statement.get() ) + if( !statement ) return; statement->setParent( this ); @@ -826,20 +826,20 @@ IfStatementAST::IfStatementAST() void IfStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void IfStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } void IfStatementAST::setElseStatement( StatementAST::Node& elseStatement ) { - m_elseStatement = elseStatement; - if( m_elseStatement.get() ) m_elseStatement->setParent( this ); + m_elseStatement = std::move(elseStatement); + if( m_elseStatement ) m_elseStatement->setParent( this ); } // -------------------------------------------------------------------------- @@ -849,14 +849,14 @@ WhileStatementAST::WhileStatementAST() void WhileStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void WhileStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } // -------------------------------------------------------------------------- @@ -866,14 +866,14 @@ DoStatementAST::DoStatementAST() void DoStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void DoStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } // -------------------------------------------------------------------------- @@ -883,26 +883,26 @@ ForStatementAST::ForStatementAST() void ForStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void ForStatementAST::setExpression( AST::Node& expression ) { - m_expression = expression; - if( m_expression.get() ) m_expression->setParent( this ); + m_expression = std::move(expression); + if( m_expression ) m_expression->setParent( this ); } void ForStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } void ForStatementAST::setInitStatement( StatementAST::Node& initStatement ) { - m_initStatement = initStatement; - if( m_initStatement.get() ) m_initStatement->setParent( this ); + m_initStatement = std::move(initStatement); + if( m_initStatement ) m_initStatement->setParent( this ); } // -------------------------------------------------------------------------- @@ -912,20 +912,20 @@ ForEachStatementAST::ForEachStatementAST() void ForEachStatementAST::setExpression( AST::Node& expression ) { - m_expression = expression; - if( m_expression.get() ) m_expression->setParent( this ); + m_expression = std::move(expression); + if( m_expression ) m_expression->setParent( this ); } void ForEachStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } void ForEachStatementAST::setInitStatement( StatementAST::Node& initStatement ) { - m_initStatement = initStatement; - if( m_initStatement.get() ) m_initStatement->setParent( this ); + m_initStatement = std::move(initStatement); + if( m_initStatement ) m_initStatement->setParent( this ); } // -------------------------------------------------------------------------- @@ -935,14 +935,14 @@ SwitchStatementAST::SwitchStatementAST() void SwitchStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void SwitchStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } // -------------------------------------------------------------------------- @@ -953,7 +953,7 @@ CatchStatementListAST::CatchStatementListAST() void CatchStatementListAST::addStatement( CatchStatementAST::Node& statement ) { - if( !statement.get() ) + if( !statement ) return; statement->setParent( this ); @@ -967,14 +967,14 @@ CatchStatementAST::CatchStatementAST() void CatchStatementAST::setCondition( ConditionAST::Node& condition ) { - m_condition = condition; - if( m_condition.get() ) m_condition->setParent( this ); + m_condition = std::move(condition); + if( m_condition ) m_condition->setParent( this ); } void CatchStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } // -------------------------------------------------------------------------- @@ -984,14 +984,14 @@ TryBlockStatementAST::TryBlockStatementAST() void TryBlockStatementAST::setStatement( StatementAST::Node& statement ) { - m_statement = statement; - if( m_statement.get() ) m_statement->setParent( this ); + m_statement = std::move(statement); + if( m_statement ) m_statement->setParent( this ); } void TryBlockStatementAST::setCatchStatementList( CatchStatementListAST::Node& statementList ) { - m_catchStatementList = statementList; - if( m_catchStatementList.get() ) m_catchStatementList->setParent( this ); + m_catchStatementList = std::move(statementList); + if( m_catchStatementList ) m_catchStatementList->setParent( this ); } // -------------------------------------------------------------------------- @@ -1001,8 +1001,8 @@ DeclarationStatementAST::DeclarationStatementAST() void DeclarationStatementAST::setDeclaration( DeclarationAST::Node& declaration ) { - m_declaration = declaration; - if( m_declaration.get() ) m_declaration->setParent( this ); + m_declaration = std::move(declaration); + if( m_declaration ) m_declaration->setParent( this ); } // -------------------------------------------------------------------------- @@ -1012,8 +1012,8 @@ ExpressionStatementAST::ExpressionStatementAST() void ExpressionStatementAST::setExpression( AST::Node& expression ) { - m_expression = expression; - if( m_expression.get() ) m_expression->setParent( this ); + m_expression = std::move(expression); + if( m_expression ) m_expression->setParent( this ); } @@ -1024,32 +1024,32 @@ ParameterDeclarationAST::ParameterDeclarationAST() void ParameterDeclarationAST::setTypeSpec( TypeSpecifierAST::Node& typeSpec ) { - m_typeSpec = typeSpec; - if( m_typeSpec.get() ) m_typeSpec->setParent( this ); + m_typeSpec = std::move(typeSpec); + if( m_typeSpec ) m_typeSpec->setParent( this ); } void ParameterDeclarationAST::setDeclarator( DeclaratorAST::Node& declarator ) { - m_declarator = declarator; - if( m_declarator.get() ) m_declarator->setParent( this ); + m_declarator = std::move(declarator); + if( m_declarator ) m_declarator->setParent( this ); } void ParameterDeclarationAST::setExpression( AST::Node& expression ) { - m_expression = expression; - if( m_expression.get() ) m_expression->setParent( this ); + m_expression = std::move(expression); + if( m_expression ) m_expression->setParent( this ); } TQString ParameterDeclarationAST::text() const { TQString str; - if( m_typeSpec.get() ) + if( m_typeSpec ) str += m_typeSpec->text() + " "; - if( m_declarator.get() ) + if( m_declarator ) str += m_declarator->text(); - if( m_expression.get() ) + if( m_expression ) str += TQString( " = " ) + m_expression->text(); return str; @@ -1063,7 +1063,7 @@ ParameterDeclarationListAST::ParameterDeclarationListAST() void ParameterDeclarationListAST::addParameter( ParameterDeclarationAST::Node& parameter ) { - if( !parameter.get() ) + if( !parameter ) return; parameter->setParent( this ); @@ -1091,24 +1091,24 @@ ParameterDeclarationClauseAST::ParameterDeclarationClauseAST() void ParameterDeclarationClauseAST::setParameterDeclarationList( ParameterDeclarationListAST::Node& parameterDeclarationList ) { - m_parameterDeclarationList = parameterDeclarationList; - if( m_parameterDeclarationList.get() ) m_parameterDeclarationList->setParent( this ); + m_parameterDeclarationList = std::move(parameterDeclarationList); + if( m_parameterDeclarationList ) m_parameterDeclarationList->setParent( this ); } void ParameterDeclarationClauseAST::setEllipsis( AST::Node& ellipsis ) { - m_ellipsis = ellipsis; - if( m_ellipsis.get() ) m_ellipsis->setParent( this ); + m_ellipsis = std::move(ellipsis); + if( m_ellipsis ) m_ellipsis->setParent( this ); } TQString ParameterDeclarationClauseAST::text() const { TQString str; - if( m_parameterDeclarationList.get() ) + if( m_parameterDeclarationList ) str += m_parameterDeclarationList->text(); - if( m_ellipsis.get() ) + if( m_ellipsis ) str += " ..."; return str; @@ -1123,7 +1123,7 @@ GroupAST::GroupAST() void GroupAST::addNode( AST::Node& node ) { - if( !node.get() ) + if( !node ) return; node->setParent( this ); @@ -1151,7 +1151,7 @@ AccessDeclarationAST::AccessDeclarationAST() void AccessDeclarationAST::addAccess( AST::Node& access ) { - if( !access.get() ) + if( !access ) return; access->setParent( this ); @@ -1178,26 +1178,26 @@ TypeParameterAST::TypeParameterAST() void TypeParameterAST::setKind( AST::Node& kind ) { - m_kind = kind; - if( m_kind.get() ) m_kind->setParent( this ); + m_kind = std::move(kind); + if( m_kind ) m_kind->setParent( this ); } -void TypeParameterAST::setTemplateParameterList( TemplateParameterListAST::Node& templateParameterList ) +void TypeParameterAST::setTemplateParameterList( std::unique_ptr<class TemplateParameterListAST>& templateParameterList ) { - m_templateParameterList = templateParameterList; - if( m_templateParameterList.get() ) m_templateParameterList->setParent( this ); + m_templateParameterList = std::move(templateParameterList); + if( m_templateParameterList ) m_templateParameterList->setParent( this ); } void TypeParameterAST::setName( NameAST::Node& name ) { - m_name = name; - if( m_name.get() ) m_name->setParent( this ); + m_name = std::move(name); + if( m_name ) m_name->setParent( this ); } void TypeParameterAST::setTypeId( AST::Node& typeId ) { - m_typeId = typeId; - if( m_typeId.get() ) m_typeId->setParent( this ); + m_typeId = std::move(typeId); + if( m_typeId ) m_typeId->setParent( this ); } // -------------------------------------------------------------------------- @@ -1207,14 +1207,14 @@ TemplateParameterAST::TemplateParameterAST() void TemplateParameterAST::setTypeParameter( TypeParameterAST::Node& typeParameter ) { - m_typeParameter = typeParameter; - if( m_typeParameter.get() ) m_typeParameter->setParent( this ); + m_typeParameter = std::move(typeParameter); + if( m_typeParameter ) m_typeParameter->setParent( this ); } void TemplateParameterAST::setTypeValueParameter( ParameterDeclarationAST::Node& typeValueParameter ) { - m_typeValueParameter = typeValueParameter; - if( m_typeValueParameter.get() ) m_typeValueParameter->setParent( this ); + m_typeValueParameter = std::move(typeValueParameter); + if( m_typeValueParameter ) m_typeValueParameter->setParent( this ); } // -------------------------------------------------------------------------- @@ -1225,7 +1225,7 @@ TemplateParameterListAST::TemplateParameterListAST() void TemplateParameterListAST::addTemplateParameter( TemplateParameterAST::Node& templateParameter ) { - if( !templateParameter.get() ) + if( !templateParameter ) return; templateParameter->setParent( this ); @@ -1239,24 +1239,24 @@ ConditionAST::ConditionAST() void ConditionAST::setTypeSpec( TypeSpecifierAST::Node& typeSpec ) { - m_typeSpec = typeSpec; - if( m_typeSpec.get() ) m_typeSpec->setParent( this ); + m_typeSpec = std::move(typeSpec); + if( m_typeSpec ) m_typeSpec->setParent( this ); } void ConditionAST::setDeclarator( DeclaratorAST::Node& declarator ) { - m_declarator = declarator; - if( m_declarator.get() ) m_declarator->setParent( this ); + m_declarator = std::move(declarator); + if( m_declarator ) m_declarator->setParent( this ); } void ConditionAST::setExpression( AST::Node& expression ) { - m_expression = expression; - if( m_expression.get() ) m_expression->setParent( this ); + m_expression = std::move(expression); + if( m_expression ) m_expression->setParent( this ); } void ClassSpecifierAST::setWinDeclSpec( GroupAST::Node & winDeclSpec ) { - m_winDeclSpec = winDeclSpec; - if( m_winDeclSpec.get() ) m_winDeclSpec->setParent( this ); + m_winDeclSpec = std::move(winDeclSpec); + if( m_winDeclSpec ) m_winDeclSpec->setParent( this ); } diff --git a/lib/cppparser/ast.h b/lib/cppparser/ast.h index c53cce20..b6c2d64b 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -155,7 +155,7 @@ class CommentAST { class AST : public CommentAST { public: - typedef std::auto_ptr<AST> Node; + typedef std::unique_ptr<AST> Node; enum { Type=NodeType_Generic }; DECLARE_ALLOC( AST ) @@ -217,7 +217,7 @@ private: class GroupAST: public AST { public: - typedef std::auto_ptr<GroupAST> Node; + typedef std::unique_ptr<GroupAST> Node; enum { Type = NodeType_Group }; DECLARE_ALLOC( GroupAST ) @@ -242,7 +242,7 @@ private: class TemplateArgumentListAST: public AST { public: - typedef std::auto_ptr<TemplateArgumentListAST> Node; + typedef std::unique_ptr<TemplateArgumentListAST> Node; enum { Type = NodeType_TemplateArgumentList }; DECLARE_ALLOC( TemplateArgumentListAST ) @@ -266,7 +266,7 @@ private: class ClassOrNamespaceNameAST: public AST { public: - typedef std::auto_ptr<ClassOrNamespaceNameAST> Node; + typedef std::unique_ptr<ClassOrNamespaceNameAST> Node; enum { Type = NodeType_ClassOrNamespaceName }; DECLARE_ALLOC( ClassOrNamespaceNameAST ) @@ -294,7 +294,7 @@ private: class NameAST: public AST { public: - typedef std::auto_ptr<NameAST> Node; + typedef std::unique_ptr<NameAST> Node; enum { Type = NodeType_Name }; DECLARE_ALLOC( NameAST ) @@ -326,7 +326,7 @@ private: class TypeParameterAST: public AST { public: - typedef std::auto_ptr<TypeParameterAST> Node; + typedef std::unique_ptr<TypeParameterAST> Node; enum { Type = NodeType_TypeParameter }; DECLARE_ALLOC( TypeParameterAST ) @@ -338,7 +338,7 @@ public: void setKind( AST::Node& kind ); class TemplateParameterListAST* templateParameterList() { return m_templateParameterList.get(); } - void setTemplateParameterList( std::auto_ptr<class TemplateParameterListAST>& templateParameterList ); + void setTemplateParameterList( std::unique_ptr<class TemplateParameterListAST>& templateParameterList ); NameAST* name() { return m_name.get(); } void setName( NameAST::Node& name ); @@ -348,7 +348,7 @@ public: private: AST::Node m_kind; - std::auto_ptr<class TemplateParameterListAST> m_templateParameterList; + std::unique_ptr<class TemplateParameterListAST> m_templateParameterList; NameAST::Node m_name; AST::Node m_typeId; @@ -360,7 +360,7 @@ private: class DeclarationAST: public AST { public: - typedef std::auto_ptr<DeclarationAST> Node; + typedef std::unique_ptr<DeclarationAST> Node; enum { Type = NodeType_Declaration }; DECLARE_ALLOC( DeclarationAST ) @@ -376,7 +376,7 @@ private: class AccessDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<AccessDeclarationAST> Node; + typedef std::unique_ptr<AccessDeclarationAST> Node; enum { Type = NodeType_AccessDeclaration }; DECLARE_ALLOC( AccessDeclarationAST ) @@ -400,7 +400,7 @@ private: class TypeSpecifierAST: public AST { public: - typedef std::auto_ptr<TypeSpecifierAST> Node; + typedef std::unique_ptr<TypeSpecifierAST> Node; enum { Type = NodeType_TypeSpecifier }; DECLARE_ALLOC( TypeSpecifierAST ) @@ -432,7 +432,7 @@ private: class BaseSpecifierAST: public AST { public: - typedef std::auto_ptr<BaseSpecifierAST> Node; + typedef std::unique_ptr<BaseSpecifierAST> Node; enum { Type = NodeType_BaseSpecifier }; DECLARE_ALLOC( BaseSpecifierAST ) @@ -462,7 +462,7 @@ private: class BaseClauseAST: public AST { public: - typedef std::auto_ptr<BaseClauseAST> Node; + typedef std::unique_ptr<BaseClauseAST> Node; enum { Type = NodeType_BaseClause }; DECLARE_ALLOC( BaseClauseAST ) @@ -484,7 +484,7 @@ private: class ClassSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<ClassSpecifierAST> Node; + typedef std::unique_ptr<ClassSpecifierAST> Node; enum { Type = NodeType_ClassSpecifier }; DECLARE_ALLOC( ClassSpecifierAST ) @@ -517,7 +517,7 @@ private: class EnumeratorAST: public AST { public: - typedef std::auto_ptr<EnumeratorAST> Node; + typedef std::unique_ptr<EnumeratorAST> Node; enum { Type = NodeType_Enumerator }; DECLARE_ALLOC( EnumeratorAST ) @@ -543,7 +543,7 @@ private: class EnumSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<EnumSpecifierAST> Node; + typedef std::unique_ptr<EnumSpecifierAST> Node; enum { Type = NodeType_EnumSpecifier }; DECLARE_ALLOC( EnumSpecifierAST ) @@ -565,7 +565,7 @@ private: class ElaboratedTypeSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<ElaboratedTypeSpecifierAST> Node; + typedef std::unique_ptr<ElaboratedTypeSpecifierAST> Node; enum { Type = NodeType_ElaboratedTypeSpecifier }; DECLARE_ALLOC( ElaboratedTypeSpecifierAST ) @@ -590,7 +590,7 @@ private: class LinkageBodyAST: public AST { public: - typedef std::auto_ptr<LinkageBodyAST> Node; + typedef std::unique_ptr<LinkageBodyAST> Node; enum { Type = NodeType_LinkageBody }; DECLARE_ALLOC( LinkageBodyAST ) @@ -612,7 +612,7 @@ private: class LinkageSpecificationAST: public DeclarationAST { public: - typedef std::auto_ptr<LinkageSpecificationAST> Node; + typedef std::unique_ptr<LinkageSpecificationAST> Node; enum { Type = NodeType_LinkageSpecification }; DECLARE_ALLOC( LinkageSpecificationAST ) @@ -642,7 +642,7 @@ private: class NamespaceAST: public DeclarationAST { public: - typedef std::auto_ptr<NamespaceAST> Node; + typedef std::unique_ptr<NamespaceAST> Node; enum { Type = NodeType_Namespace }; DECLARE_ALLOC( NamespaceAST ) @@ -668,7 +668,7 @@ private: class NamespaceAliasAST: public DeclarationAST { public: - typedef std::auto_ptr<NamespaceAliasAST> Node; + typedef std::unique_ptr<NamespaceAliasAST> Node; enum { Type = NodeType_NamespaceAlias }; DECLARE_ALLOC( NamespaceAliasAST ) @@ -694,7 +694,7 @@ private: class UsingAST: public DeclarationAST { public: - typedef std::auto_ptr<UsingAST> Node; + typedef std::unique_ptr<UsingAST> Node; enum { Type = NodeType_Using }; DECLARE_ALLOC( UsingAST ) @@ -720,7 +720,7 @@ private: class UsingDirectiveAST: public DeclarationAST { public: - typedef std::auto_ptr<UsingDirectiveAST> Node; + typedef std::unique_ptr<UsingDirectiveAST> Node; enum { Type = NodeType_UsingDirective }; DECLARE_ALLOC( UsingDirectiveAST ) @@ -742,7 +742,7 @@ private: class DeclaratorAST: public AST { public: - typedef std::auto_ptr<DeclaratorAST> Node; + typedef std::unique_ptr<DeclaratorAST> Node; enum { Type = NodeType_Declarator }; DECLARE_ALLOC( DeclaratorAST ) @@ -754,7 +754,7 @@ public: void addPtrOp( AST::Node& ptrOp ); DeclaratorAST* subDeclarator() { return m_subDeclarator.get(); } - void setSubDeclarator( std::auto_ptr<DeclaratorAST>& subDeclarator ); + void setSubDeclarator( Node& subDeclarator ); NameAST* declaratorId() { return m_declaratorId.get(); } void setDeclaratorId( NameAST::Node& declaratorId ); @@ -766,7 +766,7 @@ public: void addArrayDimension( AST::Node& arrayDimension ); class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } - void setParameterDeclarationClause( std::auto_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); + void setParameterDeclarationClause( std::unique_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); // ### replace 'constant' with cvQualify AST* constant() { return m_constant.get(); } @@ -777,11 +777,11 @@ public: private: TQPtrList<AST> m_ptrOpList; - std::auto_ptr<DeclaratorAST> m_subDeclarator; + Node m_subDeclarator; NameAST::Node m_declaratorId; AST::Node m_bitfieldInitialization; TQPtrList<AST> m_arrayDimensionList; - std::auto_ptr<class ParameterDeclarationClauseAST> m_parameterDeclarationClause; + std::unique_ptr<class ParameterDeclarationClauseAST> m_parameterDeclarationClause; AST::Node m_constant; GroupAST::Node m_exceptionSpecification; @@ -793,7 +793,7 @@ private: class ParameterDeclarationAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationAST> Node; + typedef std::unique_ptr<ParameterDeclarationAST> Node; enum { Type = NodeType_ParameterDeclaration }; DECLARE_ALLOC( ParameterDeclarationAST ) @@ -825,7 +825,7 @@ private: class ParameterDeclarationListAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationListAST> Node; + typedef std::unique_ptr<ParameterDeclarationListAST> Node; enum { Type = NodeType_ParameterDeclarationList }; DECLARE_ALLOC( ParameterDeclarationListAST ) @@ -849,7 +849,7 @@ private: class ParameterDeclarationClauseAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationClauseAST> Node; + typedef std::unique_ptr<ParameterDeclarationClauseAST> Node; enum { Type = NodeType_ParameterDeclarationClause }; DECLARE_ALLOC( ParameterDeclarationClauseAST ) @@ -878,7 +878,7 @@ private: class InitDeclaratorAST: public AST { public: - typedef std::auto_ptr<InitDeclaratorAST> Node; + typedef std::unique_ptr<InitDeclaratorAST> Node; enum { Type = NodeType_InitDeclarator }; DECLARE_ALLOC( InitDeclaratorAST ) @@ -904,7 +904,7 @@ private: class InitDeclaratorListAST: public AST { public: - typedef std::auto_ptr<InitDeclaratorListAST> Node; + typedef std::unique_ptr<InitDeclaratorListAST> Node; enum { Type = NodeType_InitDeclaratorList }; DECLARE_ALLOC( InitDeclaratorListAST ) @@ -926,7 +926,7 @@ private: class TypedefAST: public DeclarationAST { public: - typedef std::auto_ptr<TypedefAST> Node; + typedef std::unique_ptr<TypedefAST> Node; enum { Type = NodeType_Typedef }; DECLARE_ALLOC( TypedefAST ) @@ -952,7 +952,7 @@ private: class TemplateParameterAST: public AST { public: - typedef std::auto_ptr<TemplateParameterAST> Node; + typedef std::unique_ptr<TemplateParameterAST> Node; enum { Type = NodeType_TemplateParameter }; DECLARE_ALLOC( TemplateParameterAST ) @@ -978,7 +978,7 @@ private: class TemplateParameterListAST: public AST { public: - typedef std::auto_ptr<TemplateParameterListAST> Node; + typedef std::unique_ptr<TemplateParameterListAST> Node; enum { Type = NodeType_TemplateParameterList }; DECLARE_ALLOC( TemplateParameterListAST ) @@ -1000,7 +1000,7 @@ private: class TemplateDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<TemplateDeclarationAST> Node; + typedef std::unique_ptr<TemplateDeclarationAST> Node; enum { Type = NodeType_TemplateDeclaration }; DECLARE_ALLOC( TemplateDeclarationAST ) @@ -1030,7 +1030,7 @@ private: class SimpleDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<SimpleDeclarationAST> Node; + typedef std::unique_ptr<SimpleDeclarationAST> Node; enum { Type = NodeType_SimpleDeclaration }; DECLARE_ALLOC( SimpleDeclarationAST ) @@ -1068,7 +1068,7 @@ private: class StatementAST: public AST { public: - typedef std::auto_ptr<StatementAST> Node; + typedef std::unique_ptr<StatementAST> Node; enum { Type = NodeType_Statement }; DECLARE_ALLOC( StatementAST ) @@ -1084,7 +1084,7 @@ private: class ExpressionStatementAST: public StatementAST { public: - typedef std::auto_ptr<ExpressionStatementAST> Node; + typedef std::unique_ptr<ExpressionStatementAST> Node; enum { Type = NodeType_ExpressionStatement }; DECLARE_ALLOC( ExpressionStatementAST ) @@ -1106,7 +1106,7 @@ private: class ConditionAST: public AST { public: - typedef std::auto_ptr<ConditionAST> Node; + typedef std::unique_ptr<ConditionAST> Node; enum { Type = NodeType_Condition }; DECLARE_ALLOC( ConditionAST ) @@ -1136,7 +1136,7 @@ private: class IfStatementAST: public StatementAST { public: - typedef std::auto_ptr<IfStatementAST> Node; + typedef std::unique_ptr<IfStatementAST> Node; enum { Type = NodeType_IfStatement }; DECLARE_ALLOC( IfStatementAST ) @@ -1166,7 +1166,7 @@ private: class WhileStatementAST: public StatementAST { public: - typedef std::auto_ptr<WhileStatementAST> Node; + typedef std::unique_ptr<WhileStatementAST> Node; enum { Type = NodeType_WhileStatement }; DECLARE_ALLOC( WhileStatementAST ) @@ -1192,7 +1192,7 @@ private: class DoStatementAST: public StatementAST { public: - typedef std::auto_ptr<DoStatementAST> Node; + typedef std::unique_ptr<DoStatementAST> Node; enum { Type = NodeType_DoStatement }; DECLARE_ALLOC( DoStatementAST ) @@ -1218,7 +1218,7 @@ private: class ForStatementAST: public StatementAST { public: - typedef std::auto_ptr<ForStatementAST> Node; + typedef std::unique_ptr<ForStatementAST> Node; enum { Type = NodeType_ForStatement }; DECLARE_ALLOC( ForStatementAST ) @@ -1252,7 +1252,7 @@ private: class ForEachStatementAST: public StatementAST { public: - typedef std::auto_ptr<ForEachStatementAST> Node; + typedef std::unique_ptr<ForEachStatementAST> Node; enum { Type = NodeType_ForEachStatement }; DECLARE_ALLOC( ForEachStatementAST ) @@ -1282,7 +1282,7 @@ private: class SwitchStatementAST: public StatementAST { public: - typedef std::auto_ptr<SwitchStatementAST> Node; + typedef std::unique_ptr<SwitchStatementAST> Node; enum { Type = NodeType_SwitchStatement }; DECLARE_ALLOC( SwitchStatementAST ) @@ -1308,7 +1308,7 @@ private: class StatementListAST: public StatementAST { public: - typedef std::auto_ptr<StatementListAST> Node; + typedef std::unique_ptr<StatementListAST> Node; enum { Type = NodeType_StatementList }; DECLARE_ALLOC( StatementListAST ) @@ -1330,7 +1330,7 @@ private: class CatchStatementAST: public StatementAST { public: - typedef std::auto_ptr<CatchStatementAST> Node; + typedef std::unique_ptr<CatchStatementAST> Node; enum { Type = NodeType_CatchStatement }; DECLARE_ALLOC( CatchStatementAST ) @@ -1356,7 +1356,7 @@ private: class CatchStatementListAST: public StatementAST { public: - typedef std::auto_ptr<CatchStatementListAST> Node; + typedef std::unique_ptr<CatchStatementListAST> Node; enum { Type = NodeType_CatchStatementList }; DECLARE_ALLOC( CatchStatementListAST ) @@ -1378,7 +1378,7 @@ private: class TryBlockStatementAST: public StatementAST { public: - typedef std::auto_ptr<TryBlockStatementAST> Node; + typedef std::unique_ptr<TryBlockStatementAST> Node; enum { Type = NodeType_TryBlockStatement }; DECLARE_ALLOC( TryBlockStatementAST ) @@ -1404,7 +1404,7 @@ private: class DeclarationStatementAST: public StatementAST { public: - typedef std::auto_ptr<DeclarationStatementAST> Node; + typedef std::unique_ptr<DeclarationStatementAST> Node; enum { Type = NodeType_DeclarationStatement }; DECLARE_ALLOC( DeclarationStatementAST ) @@ -1426,7 +1426,7 @@ private: class FunctionDefinitionAST: public DeclarationAST { public: - typedef std::auto_ptr<FunctionDefinitionAST> Node; + typedef std::unique_ptr<FunctionDefinitionAST> Node; enum { Type = NodeType_FunctionDefinition }; DECLARE_ALLOC( FunctionDefinitionAST ) diff --git a/lib/cppparser/driver.cpp b/lib/cppparser/driver.cpp index 3dc8569c..dbda4aca 100644 --- a/lib/cppparser/driver.cpp +++ b/lib/cppparser/driver.cpp @@ -101,7 +101,7 @@ class DefaultSourceProvider: public SourceProvider { Driver::Driver() - : depresolv( FALSE ), lexer( 0 ), m_lexerCache( this ), m_dependenceDepth( 0 ), m_maxDependenceDepth( 20 ) { + : depresolv( false ), lexer( 0 ), m_lexerCache( this ), m_dependenceDepth( 0 ), m_maxDependenceDepth( 20 ) { m_sourceProvider = new DefaultSourceProvider(); } @@ -552,7 +552,6 @@ void Driver::setupLexer( Lexer * lexer ) { lexer->addSkipWord( "ANTLR_USE_NAMESPACE", SkipWordAndArguments ); lexer->addSkipWord( "ANTLR_USING_NAMESPACE", SkipWordAndArguments ); lexer->addSkipWord( "ANTLR_END_NAMESPACE" ); - lexer->addSkipWord( "ANTLR_C_USING", SkipWordAndArguments ); lexer->addSkipWord( "ANTLR_API" ); // gnu @@ -594,7 +593,7 @@ void Driver::setupLexer( Lexer * lexer ) { lexer->addSkipWord( "EXPORT_DOCKCLASS" ); lexer->addSkipWord( "K_EXPORT_COMPONENT_FACTORY", SkipWordAndArguments ); lexer->addSkipWord( "K_SYCOCAFACTORY", SkipWordAndArguments ); - lexer->addSkipWord( "KDE_DEPRECATED" ); + lexer->addSkipWord( "TDE_DEPRECATED" ); // qt lexer->addSkipWord( "TQ_OBJECT" ); @@ -614,8 +613,6 @@ void Driver::setupLexer( Lexer * lexer ) { lexer->addSkipWord( "TQ_REFCOUNT" ); lexer->addSkipWord( "TQ_EXPLICIT" ); lexer->addSkipWord( "QMAC_PASCAL" ); - lexer->addSkipWord( "QT_STATIC_CONST" ); - lexer->addSkipWord( "QT_STATIC_CONST_IMPL" ); lexer->addSkipWord( "TQT_WIN_PAINTER_MEMBERS" ); lexer->addSkipWord( "TQT_NC_MSGBOX" ); lexer->addSkipWord( "TQ_VARIANT_AS", SkipWordAndArguments ); diff --git a/lib/cppparser/errors.cpp b/lib/cppparser/errors.cpp index 5ce5058d..2622e7de 100644 --- a/lib/cppparser/errors.cpp +++ b/lib/cppparser/errors.cpp @@ -20,6 +20,6 @@ #include "errors.h" #include <tdelocale.h> -QT_STATIC_CONST_IMPL Error& Errors::InternalError = Error( 1, -1, i18n("Internal Error") ); -QT_STATIC_CONST_IMPL Error& Errors::SyntaxError = Error( 2, -1, i18n("Syntax Error before '%1'") ); -QT_STATIC_CONST_IMPL Error& Errors::ParseError = Error( 3, -1, i18n("Parse Error before '%1'") ); +const Error& Errors::InternalError = Error( 1, -1, i18n("Internal Error") ); +const Error& Errors::SyntaxError = Error( 2, -1, i18n("Syntax Error before '%1'") ); +const Error& Errors::ParseError = Error( 3, -1, i18n("Parse Error before '%1'") ); diff --git a/lib/cppparser/errors.h b/lib/cppparser/errors.h index 26b63f2c..d4e65e0b 100644 --- a/lib/cppparser/errors.h +++ b/lib/cppparser/errors.h @@ -35,9 +35,9 @@ struct Error{ class Errors{ public: - QT_STATIC_CONST Error& InternalError; - QT_STATIC_CONST Error& SyntaxError; - QT_STATIC_CONST Error& ParseError; + static const Error& InternalError; + static const Error& SyntaxError; + static const Error& ParseError; }; diff --git a/lib/cppparser/parser.cpp b/lib/cppparser/parser.cpp index c4eccfd3..9701b944 100644 --- a/lib/cppparser/parser.cpp +++ b/lib/cppparser/parser.cpp @@ -325,7 +325,7 @@ bool Parser::skipCommaExpression( AST::Node& node ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -377,7 +377,7 @@ bool Parser::skipExpression( AST::Node& node ) { AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); } return true; @@ -428,7 +428,7 @@ bool Parser::parseName( NameAST::Node& node ) return false; UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -441,7 +441,7 @@ bool Parser::parseTranslationUnit( TranslationUnitAST::Node& node ) m_problems = 0; TranslationUnitAST::Node tun = CreateNode<TranslationUnitAST>(); - node = tun; + node = std::move(tun); if( lex->lookAhead(0) == Token_comment ) { node->setComment( lex->lookAhead(0).text() ); nextToken(); @@ -539,7 +539,7 @@ bool Parser::parseDeclaration( DeclarationAST::Node& node ) ast->setTypeSpec( spec ); ast->setInitDeclaratorList( declarators ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -587,7 +587,7 @@ bool Parser::parseLinkageSpecification( DeclarationAST::Node& node ) UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -604,7 +604,7 @@ bool Parser::parseLinkageBody( LinkageBodyAST::Node& node ) nextToken(); LinkageBodyAST::Node lba = CreateNode<LinkageBodyAST>(); - node = lba; + node = std::move(lba); while( !lex->lookAhead(0).isNull() ){ int tk = lex->lookAhead( 0 ); @@ -665,7 +665,7 @@ bool Parser::parseNamespace( DeclarationAST::Node& node ) ast->setNamespaceName( namespaceName ); ast->setAliasName( name ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } else { reportError( i18n("namespace expected") ); @@ -684,7 +684,7 @@ bool Parser::parseNamespace( DeclarationAST::Node& node ) ast->setLinkageBody( linkageBody ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -727,7 +727,7 @@ bool Parser::parseUsing( DeclarationAST::Node& node ) ADVANCE( ';', ";" ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -754,7 +754,7 @@ bool Parser::parseUsingDirective( DeclarationAST::Node& node ) UsingDirectiveAST::Node ast = CreateNode<UsingDirectiveAST>(); ast->setName( name ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -774,7 +774,7 @@ bool Parser::parseOperatorFunctionId( AST::Node& node ) AST::Node op; if( parseOperator(op) ){ AST::Node asn = CreateNode<AST>(); - node = asn; + node = std::move(asn); UPDATE_POS( node, start, lex->index() ); return true; } else { @@ -798,7 +798,7 @@ bool Parser::parseOperatorFunctionId( AST::Node& node ) ; AST::Node asn = CreateNode<AST>(); - node = asn; + node = std::move(asn); UPDATE_POS( node, start, lex->index() ); return true; } @@ -831,7 +831,7 @@ bool Parser::parseTemplateArgumentList( TemplateArgumentListAST::Node& node, boo } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -879,7 +879,7 @@ bool Parser::parseTypedef( DeclarationAST::Node& node ) ast->setTypeSpec( spec ); ast->setInitDeclaratorList( declarators ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -913,7 +913,7 @@ bool Parser::parseTemplateDeclaration( DeclarationAST::Node& node ) nextToken(); AST::Node n = CreateNode<AST>(); UPDATE_POS( n, startExport, lex->index() ); - exp = n; + exp = std::move(n); } if( lex->lookAhead(0) != Token_template ){ @@ -939,7 +939,7 @@ bool Parser::parseTemplateDeclaration( DeclarationAST::Node& node ) ast->setTemplateParameterList( params ); ast->setDeclaration( def ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1033,7 +1033,7 @@ bool Parser::parseCvQualify( GroupAST::Node& node ) ////kdDebug(9007)<< "-----------------> token = " << lex->lookAhead(0).text() << endl; UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1090,7 +1090,7 @@ bool Parser::parseSimpleTypeSpecifier( TypeSpecifierAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1118,7 +1118,7 @@ bool Parser::parsePtrOperator( AST::Node& node ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1283,7 +1283,7 @@ bool Parser::parseDeclarator( DeclaratorAST::Node& node ) update_pos: UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1380,7 +1380,7 @@ bool Parser::parseAbstractDeclarator( DeclaratorAST::Node& node ) UPDATE_POS: UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1439,7 +1439,7 @@ bool Parser::parseEnumSpecifier( TypeSpecifierAST::Node& node ) UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1470,7 +1470,7 @@ bool Parser::parseTemplateParameterList( TemplateParameterListAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1498,7 +1498,7 @@ bool Parser::parseTemplateParameter( TemplateParameterAST::Node& node ) ok: UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1586,7 +1586,7 @@ bool Parser::parseTypeParameter( TypeParameterAST::Node& node ) UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1615,7 +1615,7 @@ bool Parser::parseStorageClassSpecifier( GroupAST::Node& node ) return false; UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1644,7 +1644,7 @@ bool Parser::parseFunctionSpecifier( GroupAST::Node& node ) return false; UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1665,7 +1665,7 @@ bool Parser::parseTypeId( AST::Node& node ) parseAbstractDeclarator( decl ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1696,7 +1696,7 @@ bool Parser::parseInitDeclaratorList( InitDeclaratorListAST::Node& node ) ////kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseInitDeclaratorList() -- end" << endl; UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1735,7 +1735,7 @@ good: /// @todo add ellipsis UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1844,7 +1844,7 @@ bool Parser::parseParameterDeclarationList( ParameterDeclarationListAST::Node& n } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1887,7 +1887,7 @@ bool Parser::parseParameterDeclaration( ParameterDeclarationAST::Node& node ) ast->setExpression( expr ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1905,7 +1905,7 @@ bool Parser::parseClassSpecifier( TypeSpecifierAST::Node& node ) int kind = lex->lookAhead( 0 ); if( kind == Token_class || kind == Token_struct || kind == Token_union ){ AST::Node asn = CreateNode<AST>(); - classKey = asn; + classKey = std::move(asn); nextToken(); UPDATE_POS( classKey, classKeyStart, lex->index() ); } else { @@ -1968,7 +1968,7 @@ bool Parser::parseClassSpecifier( TypeSpecifierAST::Node& node ) nextToken(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -1984,7 +1984,7 @@ bool Parser::parseAccessSpecifier( AST::Node& node ) case Token_protected: case Token_private: { AST::Node asn = CreateNode<AST>(); - node = asn; + node = std::move(asn); nextToken(); UPDATE_POS( node, start, lex->index() ); return true; @@ -2016,7 +2016,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node ) ast->addAccess( n ); ADVANCE( ':', ":" ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } else if( parseTypedef(node) ){ return true; @@ -2037,7 +2037,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node ) } ADVANCE( ':', ":" ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2065,7 +2065,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node ) ast->setTypeSpec( spec ); ast->setInitDeclaratorList( declarators ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2115,7 +2115,7 @@ bool Parser::parseElaboratedTypeSpecifier( TypeSpecifierAST::Node& node ) ast->setKind( kind ); ast->setName( name ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2149,7 +2149,7 @@ bool Parser::parseExceptionSpecification( GroupAST::Node& node ) ast->addNode( ellipsis ); nextToken(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); } else if( lex->lookAhead(0) == ')' ) { node = CreateNode<GroupAST>(); } else { @@ -2174,7 +2174,7 @@ bool Parser::parseEnumerator( EnumeratorAST::Node& node ) EnumeratorAST::Node ena = CreateNode<EnumeratorAST>(); - node = ena; + node = std::move(ena); AST::Node id = CreateNode<AST>(); UPDATE_POS( id, start, lex->index() ); @@ -2219,7 +2219,7 @@ bool Parser::parseInitDeclarator( InitDeclaratorAST::Node& node ) ast->setDeclarator( decl ); ast->setInitializer( init ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2255,7 +2255,7 @@ bool Parser::parseBaseClause( BaseClauseAST::Node& node ) return false; UPDATE_POS( bca, start, lex->index() ); - node = bca; + node = std::move(bca); return true; } @@ -2346,7 +2346,7 @@ bool Parser::parseTypeIdList( GroupAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2383,7 +2383,7 @@ bool Parser::parseBaseSpecifier( BaseSpecifierAST::Node& node ) ast->setAccess( access ); ast->setName( name ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2491,7 +2491,7 @@ bool Parser::parseUnqualifiedName( ClassOrNamespaceNameAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2526,7 +2526,7 @@ bool Parser::skipExpressionStatement( StatementAST::Node& node ) ExpressionStatementAST::Node ast = CreateNode<ExpressionStatementAST>(); ast->setExpression( expr ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2620,7 +2620,7 @@ bool Parser::parseCondition( ConditionAST::Node& node ) ast->setExpression( expr ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2629,7 +2629,7 @@ bool Parser::parseCondition( ConditionAST::Node& node ) ast->setDeclarator( decl ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2644,7 +2644,7 @@ bool Parser::parseCondition( ConditionAST::Node& node ) ast->setExpression( expr ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2673,7 +2673,7 @@ bool Parser::parseWhileStatement( StatementAST::Node& node ) ast->setCondition( cond ); ast->setStatement( body ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2707,7 +2707,7 @@ bool Parser::parseDoStatement( StatementAST::Node& node ) ast->setStatement( body ); //ast->setCondition( condition ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2743,7 +2743,7 @@ bool Parser::parseForStatement( StatementAST::Node& node ) // ast->setExpression( expression ); ast->setStatement( body ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2768,7 +2768,7 @@ bool Parser::parseForEachStatement( StatementAST::Node& node ) // add here the parser results ast->setStatement( body ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2819,7 +2819,7 @@ bool Parser::parseCompoundStatement( StatementAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2861,7 +2861,7 @@ bool Parser::parseIfStatement( StatementAST::Node& node ) } UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2891,7 +2891,7 @@ bool Parser::parseSwitchStatement( StatementAST::Node& node ) ast->setCondition( cond ); ast->setStatement( stmt ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -2908,7 +2908,7 @@ bool Parser::parseLabeledStatement( StatementAST::Node& node ) StatementAST::Node stmt; if( parseStatement(stmt) ){ - node = stmt; + node = std::move(stmt); return true; } } @@ -2932,7 +2932,7 @@ bool Parser::parseLabeledStatement( StatementAST::Node& node ) StatementAST::Node stmt; if( parseStatement(stmt) ){ - node = stmt; + node = std::move(stmt); return true; } } @@ -2989,7 +2989,7 @@ bool Parser::parseBlockDeclaration( DeclarationAST::Node& node ) ast->setTypeSpec( spec ); ast->setInitDeclaratorList( declarators ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -3029,7 +3029,7 @@ bool Parser::parseDeclarationStatement( StatementAST::Node& node ) DeclarationStatementAST::Node ast = CreateNode<DeclarationStatementAST>(); ast->setDeclaration( decl ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); ////kdDebug(9007)<< "---------------------> found a block declaration" << endl; return true; @@ -3093,7 +3093,7 @@ bool Parser::parseDeclarationInternal( DeclarationAST::Node& node ) SimpleDeclarationAST::Node ast = CreateNode<SimpleDeclarationAST>(); ast->setInitDeclaratorList( declarators ); ast->setText( toString(start, endSignature) ); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; @@ -3111,7 +3111,7 @@ bool Parser::parseDeclarationInternal( DeclarationAST::Node& node ) ast->setInitDeclarator( declarator ); ast->setFunctionBody( funBody ); ast->setText( toString(start, endSignature) ); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; } @@ -3128,7 +3128,7 @@ bool Parser::parseDeclarationInternal( DeclarationAST::Node& node ) ast->setInitDeclarator( declarator ); ast->setText( toString(start, endSignature) ); ast->setFunctionBody( funBody ); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; } @@ -3158,7 +3158,7 @@ start_decl: if( parseInitDeclaratorList(declarators) ){ ADVANCE( ';', ";" ); DeclarationAST::Node ast = CreateNode<DeclarationAST>(); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; } @@ -3219,7 +3219,7 @@ start_decl: ast->setWinDeclSpec( winDeclSpec ); ast->setInitDeclaratorList( declarators ); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); } return true; @@ -3243,7 +3243,7 @@ start_decl: ast->setTypeSpec( spec ); ast->setFunctionBody( funBody ); ast->setInitDeclarator( decl ); - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; } @@ -3291,7 +3291,7 @@ bool Parser::parseFunctionBody( StatementListAST::Node& node ) nextToken(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -3379,7 +3379,7 @@ bool Parser::parseTryBlockStatement( StatementAST::Node& node ) ast->setStatement( stmt ); ast->setCatchStatementList( list ); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -3905,7 +3905,7 @@ bool Parser::parseLogicalOrExpression( AST::Node& node, bool templArgs ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -3950,7 +3950,7 @@ bool Parser::parseAssignmentExpression( AST::Node& node ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -3961,7 +3961,7 @@ bool Parser::parseConstantExpression( AST::Node& node ) if( parseConditionalExpression(node) ){ AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } return false; @@ -3978,7 +3978,7 @@ bool Parser::parseExpression( AST::Node& node ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -4000,7 +4000,7 @@ bool Parser::parseCommaExpression( AST::Node& node ) AST::Node ast = CreateNode<AST>(); UPDATE_POS( ast, start, lex->index() ); - node = ast; + node = std::move(ast); return true; } @@ -4203,7 +4203,7 @@ bool Parser::parseIdentifierList( GroupAST::Node & node ) ADVANCE( Token_identifier, "identifier" ); } - node = ast; + node = std::move(ast); UPDATE_POS( node, start, lex->index() ); return true; } diff --git a/lib/interfaces/KDevCoreIface.cpp b/lib/interfaces/KDevCoreIface.cpp index aa70e01b..c86e3562 100644 --- a/lib/interfaces/KDevCoreIface.cpp +++ b/lib/interfaces/KDevCoreIface.cpp @@ -29,8 +29,8 @@ KDevCoreIface::KDevCoreIface(KDevCore *core) : TQObject(core), DCOPObject("KDevCore"), m_core(core) { - connect( m_core, TQT_SIGNAL(projectOpened()), this, TQT_SLOT(forwardProjectOpened()) ); - connect( m_core, TQT_SIGNAL(projectClosed()), this, TQT_SLOT(forwardProjectClosed()) ); + connect( m_core, TQ_SIGNAL(projectOpened()), this, TQ_SLOT(forwardProjectOpened()) ); + connect( m_core, TQ_SIGNAL(projectClosed()), this, TQ_SLOT(forwardProjectClosed()) ); } diff --git a/lib/interfaces/KDevPartControllerIface.cpp b/lib/interfaces/KDevPartControllerIface.cpp index 1b184453..60c9ef97 100644 --- a/lib/interfaces/KDevPartControllerIface.cpp +++ b/lib/interfaces/KDevPartControllerIface.cpp @@ -28,9 +28,9 @@ KDevPartControllerIface::KDevPartControllerIface(KDevPartController *pc) : TQObject(pc), DCOPObject("KDevPartController"), m_controller(pc) { - connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &))); - connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &))); - connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &))); + connect(pc, TQ_SIGNAL(loadedFile(const KURL &)), this, TQ_SLOT(forwardLoadedFile(const KURL &))); + connect(pc, TQ_SIGNAL(savedFile(const KURL &)), this, TQ_SLOT(forwardSavedFile(const KURL &))); + connect(pc, TQ_SIGNAL(closedFile(const KURL &)), this, TQ_SLOT(forwardClosedFile(const KURL &))); } diff --git a/lib/interfaces/extensions/CMakeLists.txt b/lib/interfaces/extensions/CMakeLists.txt index 6a07c77c..73708856 100644 --- a/lib/interfaces/extensions/CMakeLists.txt +++ b/lib/interfaces/extensions/CMakeLists.txt @@ -42,12 +42,12 @@ tde_create_translated_desktop( add_custom_command( OUTPUT codebrowserfrontend.moc.cpp COMMAND - ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h -o codebrowserfrontend.moc.cpp + ${TQMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h -o codebrowserfrontend.moc.cpp DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h ) add_custom_command( OUTPUT kdevversioncontrol.moc.cpp COMMAND - ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h -o kdevversioncontrol.moc.cpp + ${TQMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h -o kdevversioncontrol.moc.cpp DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h ) tde_add_library( kdevextensions STATIC_PIC AUTOMOC diff --git a/lib/interfaces/external/Mainpage.dox b/lib/interfaces/external/Mainpage.dox index 0febd41d..7c97cf16 100644 --- a/lib/interfaces/external/Mainpage.dox +++ b/lib/interfaces/external/Mainpage.dox @@ -10,14 +10,14 @@ GUI Designer integration framework. \section designerintegration Overview of GUI designer integration process Each KPart that wants to act as a GUI Designer must implement @ref KInterfaceDesigner::Designer -interface. It defines necessary Q_SIGNALS to communicate with an IDE and abstract virtual +interface. It defines necessary signals to communicate with an IDE and abstract virtual functions to determine designer type. If a part which can "design" user interface files of a certain mimetype implements this interface and sets itself as a default handler for that mimetype then it becomes automatically integrated into TDevelop IDE. -When a part is embedded into TDevelop shell, its Q_SIGNALS (defined in @ref +When a part is embedded into TDevelop shell, its signals (defined in @ref KInterfaceDesigner::Designer interface): @code void addedFunction(DesignerType type, const TQString &formName, Function function) @@ -26,7 +26,7 @@ KInterfaceDesigner::Designer interface): void editFunction(DesignerType type, const TQString &formName, const TQString &functionName) void editSource(DesignerType type, const TQString &formName); @endcode -are connected to corresponding Q_SLOTS of TDevelop designer integration engine which can be implemented in TDevelop language support plugin. +are connected to corresponding slots of TDevelop designer integration engine which can be implemented in TDevelop language support plugin. Each language support which wants to use integrated designer, must reimplement @code diff --git a/lib/interfaces/katedocumentmanagerinterface.cpp b/lib/interfaces/katedocumentmanagerinterface.cpp index 0afbcc81..e190ed04 100644 --- a/lib/interfaces/katedocumentmanagerinterface.cpp +++ b/lib/interfaces/katedocumentmanagerinterface.cpp @@ -50,7 +50,7 @@ DCOPRef KateDocumentManagerInterface::document( uint n ) DCOPRef KateDocumentManagerInterface::documentWithID( uint id ) { TQString dcopobj = "KateDocument#" + TQString::number(id); - return DCOPRef(kapp->dcopClient()->appId(), dcopobj.latin1() ); + return DCOPRef(tdeApp->dcopClient()->appId(), dcopobj.latin1() ); } DCOPRef KateDocumentManagerInterface::openURL( const KURL &url, const TQString &encoding ) diff --git a/lib/interfaces/kdevcore.h b/lib/interfaces/kdevcore.h index 282906db..e496576f 100644 --- a/lib/interfaces/kdevcore.h +++ b/lib/interfaces/kdevcore.h @@ -78,15 +78,15 @@ to if you reimplement TQWidget::contextMenuEvent method. -# Connect KDevCore::contextMenu(TQPopupMenu *, const Context *) signal to that slot in the constructor of your plugin:\n @code -connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); +connect(core(), TQ_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQ_SLOT(contextMenu(TQPopupMenu *, const Context *))); @endcode -# Fill the menu in the slot you created, for example:\n @code if (context->hasType(Context::EditorContext)) { const EditorContext *econtext = static_cast<const EditorContext*>(context); - int id = popup->insertItem(i18n("My Menu Item 1"), this, TQT_SLOT(myMenuAction1())); + int id = popup->insertItem(i18n("My Menu Item 1"), this, TQ_SLOT(myMenuAction1())); popup->setWhatsThis(id, i18n("What's this for my menu item 1")); } else if context->hasType(MyContext)) diff --git a/lib/interfaces/kdevplugincontroller.cpp b/lib/interfaces/kdevplugincontroller.cpp index 1cc6caa3..2a1b0770 100644 --- a/lib/interfaces/kdevplugincontroller.cpp +++ b/lib/interfaces/kdevplugincontroller.cpp @@ -27,8 +27,17 @@ KDevPluginController::KDevPluginController() TDETrader::OfferList KDevPluginController::query(const TQString &serviceType, const TQString &constraint) { - return TDETrader::self()->query(serviceType, - TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); + TQString versionConstraint = + TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION); + + TQString newConstraint; + if (!constraint.isEmpty()) { + newConstraint = TQString("( %1 ) and %2").arg(constraint).arg(versionConstraint); + } else { + newConstraint = versionConstraint; + } + + return TDETrader::self()->query(serviceType, newConstraint); } TDETrader::OfferList KDevPluginController::queryPlugins(const TQString &constraint) diff --git a/lib/interfaces/kdevproject.cpp b/lib/interfaces/kdevproject.cpp index e8616df1..3a49a8c6 100644 --- a/lib/interfaces/kdevproject.cpp +++ b/lib/interfaces/kdevproject.cpp @@ -40,14 +40,14 @@ struct KDevProject::Private { KDevProject::KDevProject(const KDevPluginInfo *info, TQObject *parent, const char *name) : KDevPlugin(info, parent, name), d(new KDevProject::Private()) { - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); + connect( this, TQ_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQ_SLOT(buildFileMap()) ); + connect( this, TQ_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQ_SLOT(buildFileMap()) ); - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); + connect( this, TQ_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQ_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); + connect( this, TQ_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQ_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); d->m_timer = new TQTimer(this); - connect(d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBuildFileMap())); + connect(d->m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotBuildFileMap())); d->m_iface = new KDevProjectIface(this); } diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt index 1eb17f35..121f85c2 100644 --- a/lib/util/CMakeLists.txt +++ b/lib/util/CMakeLists.txt @@ -30,7 +30,7 @@ install( FILES tde_add_library( kdevutil STATIC_PIC AUTOMOC SOURCES - blockingkprocess.cpp configwidgetproxy.cpp + blockingtdeprocess.cpp configwidgetproxy.cpp domutil.cpp execcommand.cpp filetemplate.cpp kdeveditorutil.cpp kdevjobtimer.cpp kdevshellwidget.cpp tdescriptactionmanager.cpp diff --git a/lib/util/Makefile.am b/lib/util/Makefile.am index 8bf28091..1f457040 100644 --- a/lib/util/Makefile.am +++ b/lib/util/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces -I$(top_s noinst_LTLIBRARIES = libkdevutil.la -libkdevutil_la_SOURCES = blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp \ +libkdevutil_la_SOURCES = blockingtdeprocess.cpp configwidgetproxy.cpp domutil.cpp \ execcommand.cpp filetemplate.cpp kdeveditorutil.cpp kdevjobtimer.cpp \ kdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp @@ -17,5 +17,5 @@ DOXYGEN_PROJECTNAME = KDevelop Utility Library DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am -noinst_HEADERS = blockingkprocess.h kdeveditorutil.h kdevjobtimer.h \ +noinst_HEADERS = blockingtdeprocess.h kdeveditorutil.h kdevjobtimer.h \ kdevshellwidget.h settings.h diff --git a/lib/util/blockingkprocess.cpp b/lib/util/blockingtdeprocess.cpp index a937c744..f57ae77d 100644 --- a/lib/util/blockingkprocess.cpp +++ b/lib/util/blockingtdeprocess.cpp @@ -9,7 +9,7 @@ * * ***************************************************************************/ -#include "blockingkprocess.h" +#include "blockingtdeprocess.h" #include <tqapplication.h> #include <tqtimer.h> @@ -22,12 +22,12 @@ BlockingTDEProcess::BlockingTDEProcess(TQObject *parent, const char *name) m_timeoutValue = 60; m_timer = 0L; - connect(this, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); - connect(this, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); - connect(this, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(slotProcessExited(TDEProcess *))); + connect(this, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + this, TQ_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); + connect(this, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQ_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); + connect(this, TQ_SIGNAL(processExited(TDEProcess *)), + this, TQ_SLOT(slotProcessExited(TDEProcess *))); } BlockingTDEProcess::BlockingTDEProcess() @@ -37,12 +37,12 @@ BlockingTDEProcess::BlockingTDEProcess() m_stdErr = ""; m_timeoutValue = 60; m_timer = 0L; - connect(this, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); - connect(this, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - this, TQT_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); - connect(this, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(slotProcessExited(TDEProcess *))); + connect(this, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + this, TQ_SLOT(slotReceivedStdOut(TDEProcess *, char *, int))); + connect(this, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQ_SLOT(slotReceivedStdErr(TDEProcess *, char *, int))); + connect(this, TQ_SIGNAL(processExited(TDEProcess *)), + this, TQ_SLOT(slotProcessExited(TDEProcess *))); } @@ -55,7 +55,7 @@ bool BlockingTDEProcess::start(RunMode runmode, Communication comm) { m_timeout = false; m_timer = new TQTimer(); - connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeOut())); + connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimeOut())); m_timer->start(m_timeoutValue*1000, true); enter_loop(); delete m_timer; @@ -102,4 +102,4 @@ void BlockingTDEProcess::enter_loop() } -#include "blockingkprocess.moc" +#include "blockingtdeprocess.moc" diff --git a/lib/util/blockingkprocess.h b/lib/util/blockingtdeprocess.h index b5a7e71e..2252f59f 100644 --- a/lib/util/blockingkprocess.h +++ b/lib/util/blockingtdeprocess.h @@ -11,10 +11,10 @@ ***************************************************************************/ -#ifndef BLOCKINGKPROCESS_H -#define BLOCKINGKPROCESS_H +#ifndef BLOCKINGTDEPROCESS_H +#define BLOCKINGTDEPROCESS_H -#include <kprocess.h> +#include <tdeprocess.h> /** * Blocking version of TDEProcess, which stores the stdout. diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index 3335ce9f..16f578f0 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -34,8 +34,8 @@ ConfigWidgetProxy::ConfigWidgetProxy( KDevCore * core ) { - connect( core, TQT_SIGNAL(configWidget(KDialogBase*)), this, TQT_SLOT(slotConfigWidget( KDialogBase*)) ); - connect( core, TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(slotProjectConfigWidget( KDialogBase*)) ); + connect( core, TQ_SIGNAL(configWidget(KDialogBase*)), this, TQ_SLOT(slotConfigWidget( KDialogBase*)) ); + connect( core, TQ_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQ_SLOT(slotProjectConfigWidget( KDialogBase*)) ); } ConfigWidgetProxy::~ConfigWidgetProxy() @@ -66,8 +66,8 @@ void ConfigWidgetProxy::slotConfigWidget( KDialogBase * dlg ) ++it; } - connect( dlg, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT( slotAboutToShowPage(TQWidget*)) ); - connect( dlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotConfigWidgetDestroyed()) ); + connect( dlg, TQ_SIGNAL(aboutToShowPage(TQWidget*)), this, TQ_SLOT( slotAboutToShowPage(TQWidget*)) ); + connect( dlg, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotConfigWidgetDestroyed()) ); } void ConfigWidgetProxy::slotProjectConfigWidget( KDialogBase * dlg ) @@ -79,8 +79,8 @@ void ConfigWidgetProxy::slotProjectConfigWidget( KDialogBase * dlg ) ++it; } - connect( dlg, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT( slotAboutToShowPage(TQWidget*)) ); - connect( dlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotConfigWidgetDestroyed()) ); + connect( dlg, TQ_SIGNAL(aboutToShowPage(TQWidget*)), this, TQ_SLOT( slotAboutToShowPage(TQWidget*)) ); + connect( dlg, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotConfigWidgetDestroyed()) ); } void ConfigWidgetProxy::slotConfigWidgetDestroyed( ) diff --git a/lib/util/configwidgetproxy.h b/lib/util/configwidgetproxy.h index 34cadce9..ee9a3fb0 100644 --- a/lib/util/configwidgetproxy.h +++ b/lib/util/configwidgetproxy.h @@ -47,8 +47,8 @@ A typical case looks like this: _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createGlobalConfigPage( i18n("My Part"), GLOBALDOC_OPTIONS, info()->icon() ); _configProxy->createProjectConfigPage( i18n("My Part"), PROJECTDOC_OPTIONS, info()->icon() ); -connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const TQObject*, TQWidget*, unsigned int )), - this, TQT_SLOT(insertConfigWidget(const TQObject*, TQWidget*, unsigned int )) ); +connect( _configProxy, TQ_SIGNAL(insertConfigWidget(const TQObject*, TQWidget*, unsigned int )), + this, TQ_SLOT(insertConfigWidget(const TQObject*, TQWidget*, unsigned int )) ); ... ... @@ -57,10 +57,10 @@ void MyPart::insertConfigWidget( TQObject const * dlg, TQWidget * page, unsigned { if ( pagenumber == PROJECTDOC_OPTIONS ) { MyPartGlobalSettings * w = new MyPartGlobalSettings( this, page ); - connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(slotAccept()) ); + connect( dlg, TQ_SIGNAL(okClicked()), w, TQ_SLOT(slotAccept()) ); } else if ( pagenumber == PROJECTDOC_OPTIONS ) { MyPartProjectSettings * w = new MyPartProjectSettings( this, page ); - connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(slotAccept()) ); + connect( dlg, TQ_SIGNAL(okClicked()), w, TQ_SLOT(slotAccept()) ); } } @endcode diff --git a/lib/util/domutil.cpp b/lib/util/domutil.cpp index 43f8d95a..7027bcfd 100644 --- a/lib/util/domutil.cpp +++ b/lib/util/domutil.cpp @@ -226,7 +226,7 @@ DomPath DomUtil::resolvPathStringExt(const TQString pathstring) DomPath dompath; for (i=0; i<pathParts.count(); i++) { - TQStringList pathElemParts = TQStringList::split('|',pathParts[i],TRUE); + TQStringList pathElemParts = TQStringList::split('|',pathParts[i],true); DomPathElement dompathelem; dompathelem.tagName = pathElemParts[0].simplifyWhiteSpace(); if (pathElemParts.count()>1) diff --git a/lib/util/execcommand.cpp b/lib/util/execcommand.cpp index 0e617762..0f6c7387 100644 --- a/lib/util/execcommand.cpp +++ b/lib/util/execcommand.cpp @@ -19,7 +19,7 @@ #include "execcommand.h" -#include <kprocess.h> +#include <tdeprocess.h> #include <kprogress.h> #include <tdelocale.h> #include <tdemessagebox.h> @@ -39,12 +39,12 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, *proc << executable; *proc << args; - connect( proc, TQT_SIGNAL(processExited(TDEProcess*)), - this, TQT_SLOT(processExited()) ); - connect( proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), - this, TQT_SLOT(receivedStdout(TDEProcess*,char*,int)) ); - connect( proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), - this, TQT_SLOT(receivedStderr(TDEProcess*,char*,int)) ); + connect( proc, TQ_SIGNAL(processExited(TDEProcess*)), + this, TQ_SLOT(processExited()) ); + connect( proc, TQ_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + this, TQ_SLOT(receivedStdout(TDEProcess*,char*,int)) ); + connect( proc, TQ_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + this, TQ_SLOT(receivedStderr(TDEProcess*,char*,int)) ); bool ok = proc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ); @@ -58,8 +58,8 @@ ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args, } else { progressDlg = new KProgressDialog( 0, 0, i18n("Command running..."), i18n("Please wait until the \"%1\" command finishes.").arg( executable ), false ); - connect( progressDlg, TQT_SIGNAL(cancelClicked()), - this, TQT_SLOT(cancelClicked()) ); + connect( progressDlg, TQ_SIGNAL(cancelClicked()), + this, TQ_SLOT(cancelClicked()) ); } } diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index bb2cb7c6..f5c0e556 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -25,7 +25,7 @@ #include <tqregexp.h> #include <tqtextstream.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include "kdevplugin.h" #include "kdevproject.h" diff --git a/lib/util/kdevjobtimer.cpp b/lib/util/kdevjobtimer.cpp index b0b78250..db095e55 100644 --- a/lib/util/kdevjobtimer.cpp +++ b/lib/util/kdevjobtimer.cpp @@ -15,7 +15,7 @@ KDevJobTimer::KDevJobTimer( void * payload, TQObject *parent, const char *name) : TQTimer(parent, name) { m_payload = payload; - connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); + connect( this, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimeout()) ); } KDevJobTimer::~KDevJobTimer() @@ -26,7 +26,7 @@ void KDevJobTimer::singleShot(int msec, TQObject * receiver, const char * member { KDevJobTimer * p = new KDevJobTimer( payload ); p->start( msec, true ); - connect( p, TQT_SIGNAL(timeout(void*)), receiver, member ); + connect( p, TQ_SIGNAL(timeout(void*)), receiver, member ); } void KDevJobTimer::slotTimeout() diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp index c7ee9139..8cf5e265 100644 --- a/lib/util/kdevshellwidget.cpp +++ b/lib/util/kdevshellwidget.cpp @@ -16,7 +16,7 @@ #include <tdeparts/part.h> #include <klibloader.h> #include <kde_terminal_interface.h> -#include <kprocess.h> +#include <tdeprocess.h> #include "kdevshellwidget.h" @@ -41,12 +41,12 @@ void KDevShellWidget::activate( ) KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); if ( !factory ) return; - m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); + m_konsolePart = (KParts::ReadOnlyPart *) factory->create( this, "libkonsolepart", "KParts::ReadOnlyPart" ); if ( !m_konsolePart ) return; - connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); - connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); - connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); + connect( m_konsolePart, TQ_SIGNAL( processExited(TDEProcess *) ), this, TQ_SLOT( processExited(TDEProcess *) ) ); + connect( m_konsolePart, TQ_SIGNAL( receivedData( const TQString& ) ), this, TQ_SIGNAL( receivedData( const TQString& ) ) ); + connect( m_konsolePart, TQ_SIGNAL(destroyed()), this, TQ_SLOT(partDestroyed()) ); m_konsolePart->widget()->setFocusPolicy( TQWidget::WheelFocus ); setFocusProxy( m_konsolePart->widget() ); @@ -109,7 +109,7 @@ void KDevShellWidget::setAutoReactivateOnClose( bool doAutoActivate ) // reactivating with a non-working setting (the partDestroyed() // slot will have ran before m_doAutoActivate is set) if ( doAutoActivate ) - TQTimer::singleShot( 3000, this, TQT_SLOT(setAutoReactivateOnCloseDelayed()) ); + TQTimer::singleShot( 3000, this, TQ_SLOT(setAutoReactivateOnCloseDelayed()) ); else m_doAutoActivate = false; } diff --git a/lib/util/settings.cpp b/lib/util/settings.cpp index 8673b58d..8206d4b5 100644 --- a/lib/util/settings.cpp +++ b/lib/util/settings.cpp @@ -11,7 +11,7 @@ #include <tdeconfig.h> #include <tdeglobal.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include "settings.h" diff --git a/lib/util/tdescriptactionmanager.cpp b/lib/util/tdescriptactionmanager.cpp index c4b44894..f67a289c 100644 --- a/lib/util/tdescriptactionmanager.cpp +++ b/lib/util/tdescriptactionmanager.cpp @@ -21,8 +21,8 @@ #include <tdeparts/part.h> #include <tdeparts/componentfactory.h> #include <tdeapplication.h> -#include <kdesktopfile.h> -#include <kstandarddirs.h> +#include <tdedesktopfile.h> +#include <tdestandarddirs.h> #include <tdelocale.h> #include <tdemessagebox.h> @@ -40,9 +40,9 @@ KScriptAction::KScriptAction( const TQString &scriptDesktopFile, TQObject *inter m_isValid = false; m_refs = 0; // Read the desktop file - if(KDesktopFile::isDesktopFile(scriptDesktopFile)) + if(TDEDesktopFile::isDesktopFile(scriptDesktopFile)) { - KDesktopFile desktop(scriptDesktopFile, true); + TDEDesktopFile desktop(scriptDesktopFile, true); TQFileInfo scriptPath(scriptDesktopFile); m_scriptFile = scriptPath.dirPath(true) + "/" + desktop.readEntry("X-TDE-ScriptName", ""); @@ -52,7 +52,7 @@ KScriptAction::KScriptAction( const TQString &scriptDesktopFile, TQObject *inter TDETrader::OfferList offers = TDETrader::self()->query( "KScriptRunner/KScriptRunner", scriptTypeQuery ); if ( !offers.isEmpty() ) { - m_action = new TDEAction(m_scriptName, TDEShortcut(), this, TQT_SLOT(activate()), ac, "script"); + m_action = new TDEAction(m_scriptName, TDEShortcut(), this, TQ_SLOT(activate()), ac, "script"); m_isValid = true; m_timeout = new TQTimer(this); TQString icon = desktop.readIcon(); @@ -60,7 +60,7 @@ KScriptAction::KScriptAction( const TQString &scriptDesktopFile, TQObject *inter if( !icon.isEmpty() ) m_action->setIcon(icon); m_action->setShortcutConfigurable(true); - connect( m_timeout, TQT_SIGNAL(timeout()), TQT_SLOT(cleanup()) ); + connect( m_timeout, TQ_SIGNAL(timeout()), TQ_SLOT(cleanup()) ); } } } @@ -91,7 +91,7 @@ void KScriptAction::activate( ) m_interface->setScript(m_scriptFile); else m_interface->setScript(m_scriptFile, m_scriptMethod); - connect(this, TQT_SIGNAL(done(KScriptClientInterface::Result, const TQVariant &)), this, TQT_SLOT(scriptFinished())); + connect(this, TQ_SIGNAL(done(KScriptClientInterface::Result, const TQVariant &)), this, TQ_SLOT(scriptFinished())); } else { @@ -101,7 +101,7 @@ void KScriptAction::activate( ) } } m_interface->run(parent(), TQVariant()); - m_timeout->start(60000,FALSE); // after 1 minute unload + m_timeout->start(60000,false); // after 1 minute unload m_refs++; } @@ -136,7 +136,7 @@ TQPtrList< TDEAction > KScriptActionManager::scripts( TQObject * interface , con TQStringList scripts; scripts += TDEGlobal::dirs()->findAllResources("data", - TQString(kapp->name())+"/scripts/*.desktop", false, true ); + TQString(tdeApp->name())+"/scripts/*.desktop", false, true ); for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { @@ -152,16 +152,16 @@ TQPtrList< TDEAction > KScriptActionManager::scripts( TQObject * interface , con { actions.append(script->action()); m_actions.append(script); - connect(script, TQT_SIGNAL(error( const TQString&)), this, - TQT_SIGNAL(scriptError( const TQString&))); - connect(script, TQT_SIGNAL(warning( const TQString&)), this, - TQT_SIGNAL(scriptWarning( const TQString&))); - connect(script, TQT_SIGNAL(output( const TQString&)), this, - TQT_SIGNAL(scriptOutput( const TQString&))); - connect(script, TQT_SIGNAL(progress( int )), this, - TQT_SIGNAL(scriptProgress(int))); - connect(script, TQT_SIGNAL(done( KScriptClientInterface::Result, const TQVariant &)),this, - TQT_SIGNAL(scriptDone( KScriptClientInterface::Result, const TQVariant &))); + connect(script, TQ_SIGNAL(error( const TQString&)), this, + TQ_SIGNAL(scriptError( const TQString&))); + connect(script, TQ_SIGNAL(warning( const TQString&)), this, + TQ_SIGNAL(scriptWarning( const TQString&))); + connect(script, TQ_SIGNAL(output( const TQString&)), this, + TQ_SIGNAL(scriptOutput( const TQString&))); + connect(script, TQ_SIGNAL(progress( int )), this, + TQ_SIGNAL(scriptProgress(int))); + connect(script, TQ_SIGNAL(done( KScriptClientInterface::Result, const TQVariant &)),this, + TQ_SIGNAL(scriptDone( KScriptClientInterface::Result, const TQVariant &))); } else delete script; diff --git a/lib/widgets/flagboxes.cpp b/lib/widgets/flagboxes.cpp index 7e643d66..87db2425 100644 --- a/lib/widgets/flagboxes.cpp +++ b/lib/widgets/flagboxes.cpp @@ -320,7 +320,7 @@ FlagPathEdit::FlagPathEdit( TQWidget * parent, TQString pathDelimiter, layout->addWidget(edit); details = new TQPushButton("...", this); details->setMaximumWidth(30); - connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPathDetails())); + connect(details, TQ_SIGNAL(clicked()), this, TQ_SLOT(showPathDetails())); layout->addWidget(details); } @@ -540,7 +540,7 @@ FlagListEdit::FlagListEdit( TQWidget * parent, TQString listDelimiter, FlagEditC { details = new TQPushButton("...", this); details->setMaximumWidth(30); - connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showListDetails())); + connect(details, TQ_SIGNAL(clicked()), this, TQ_SLOT(showListDetails())); layout->addWidget(details); } diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp index a8520e30..dca4ac56 100644 --- a/lib/widgets/kdevhtmlpart.cpp +++ b/lib/widgets/kdevhtmlpart.cpp @@ -5,7 +5,7 @@ #include <kxmlguiclient.h> #include <tdeaction.h> #include <kstdaction.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdelocale.h> #include <tdepopupmenu.h> #include <kiconloader.h> @@ -24,54 +24,54 @@ KDevHTMLPart::KDevHTMLPart() { setXMLFile(locate("data", "tdevelop/kdevhtml_partui.rc"), true); - connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), - this, TQT_SLOT(openURLRequest(const KURL &)) ); + connect(browserExtension(), TQ_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), + this, TQ_SLOT(openURLRequest(const KURL &)) ); - connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(slotStarted(TDEIO::Job* ))); - connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); - connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); + connect(this, TQ_SIGNAL(started(TDEIO::Job *)), this, TQ_SLOT(slotStarted(TDEIO::Job* ))); + connect(this, TQ_SIGNAL(completed()), this, TQ_SLOT(slotCompleted())); + connect(this, TQ_SIGNAL(canceled(const TQString &)), this, TQ_SLOT(slotCancelled(const TQString &))); TDEActionCollection * actions = actionCollection();// new TDEActionCollection( this ); reloadAction = new TDEAction( i18n( "Reload" ), "reload", 0, - this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); + this, TQ_SLOT( slotReload() ), actions, "doc_reload" ); reloadAction->setWhatsThis(i18n("<b>Reload</b><p>Reloads the current document.")); stopAction = new TDEAction( i18n( "Stop" ), "process-stop", 0, - this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); + this, TQ_SLOT( slotStop() ), actions, "doc_stop" ); stopAction->setWhatsThis(i18n("<b>Stop</b><p>Stops the loading of current document.")); duplicateAction = new TDEAction( i18n( "Duplicate Tab" ), "window-new", 0, - this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); + this, TQ_SLOT( slotDuplicate() ), actions, "doc_dup" ); duplicateAction->setWhatsThis(i18n("<b>Duplicate window</b><p>Opens current document in a new window.")); - printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); - copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); + printAction = KStdAction::print(this, TQ_SLOT(slotPrint()), actions, "print_doc"); + copyAction = KStdAction::copy(this, TQ_SLOT(slotCopy()), actions, "copy_doc_selection"); - connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); - connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect( this, TQ_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQ_SLOT(popup(const TQString &, const TQPoint &))); + connect(this, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotSelectionChanged())); //BEGIN documentation history stuff m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, - this, TQT_SLOT(slotBack()), + this, TQ_SLOT(slotBack()), actions, "browser_back"); m_backAction->setEnabled( false ); m_backAction->setToolTip(i18n("Back")); m_backAction->setWhatsThis(i18n("<b>Back</b><p>Moves backwards one step in the <b>documentation</b> browsing history.")); - connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotBackAboutToShow())); - connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); + connect(m_backAction->popupMenu(), TQ_SIGNAL(aboutToShow()), + this, TQ_SLOT(slotBackAboutToShow())); + connect(m_backAction->popupMenu(), TQ_SIGNAL(activated(int)), + this, TQ_SLOT(slotPopupActivated(int))); m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, - this, TQT_SLOT(slotForward()), + this, TQ_SLOT(slotForward()), actions, "browser_forward"); m_forwardAction->setEnabled( false ); m_forwardAction->setToolTip(i18n("Forward")); m_forwardAction->setWhatsThis(i18n("<b>Forward</b><p>Moves forward one step in the <b>documentation</b> browsing history.")); - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotForwardAboutToShow())); - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); + connect(m_forwardAction->popupMenu(), TQ_SIGNAL(aboutToShow()), + this, TQ_SLOT(slotForwardAboutToShow())); + connect(m_forwardAction->popupMenu(), TQ_SIGNAL(activated(int)), + this, TQ_SLOT(slotPopupActivated(int))); m_restoring = false; m_Current = m_history.end(); @@ -479,9 +479,9 @@ void KDevHTMLPart::slotCopy( ) TQString text = selectedText(); text.replace( TQChar( 0xa0 ), ' ' ); TQClipboard *cb = TQApplication::clipboard(); - disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); + disconnect( cb, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( slotClearSelection() ) ); cb->setText(text); - connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); + connect( cb, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( slotClearSelection() ) ); } void KDevHTMLPart::slotSelectionChanged( ) diff --git a/lib/widgets/kdevtabwidget.cpp b/lib/widgets/kdevtabwidget.cpp index 75682116..7a9ed47b 100644 --- a/lib/widgets/kdevtabwidget.cpp +++ b/lib/widgets/kdevtabwidget.cpp @@ -22,8 +22,8 @@ KDevTabWidget::KDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(p { m_pTabBar = new KTabBar(this, "tabbar"); setTabBar(m_pTabBar); - connect(m_pTabBar, TQT_SIGNAL(closeWindow(const TQWidget*)), this, TQT_SIGNAL(closeWindow(const TQWidget*))); - connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*))); + connect(m_pTabBar, TQ_SIGNAL(closeWindow(const TQWidget*)), this, TQ_SIGNAL(closeWindow(const TQWidget*))); + connect(m_pTabBar, TQ_SIGNAL(closeOthers(TQWidget*)), this, TQ_SIGNAL(closeOthers(TQWidget*))); } KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) @@ -34,8 +34,8 @@ KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) if (closePixmap.isNull()) closePixmap = SmallIcon("window-close"); - m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQT_SLOT(closeWindowSlot())); - m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQT_SLOT(closeOthersSlot())); + m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQ_SLOT(closeWindowSlot())); + m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQ_SLOT(closeOthersSlot())); } void KTabBar::closeWindowSlot() diff --git a/lib/widgets/ksavealldialog.cpp b/lib/widgets/ksavealldialog.cpp index 9690e8a4..a98ce92a 100644 --- a/lib/widgets/ksavealldialog.cpp +++ b/lib/widgets/ksavealldialog.cpp @@ -79,9 +79,9 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co ++it; } - connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(cancel()) ); - connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(save()) ); - connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(saveNone()) ); + connect( this, TQ_SIGNAL(closeClicked()), this, TQ_SLOT(cancel()) ); + connect( this, TQ_SIGNAL(okClicked()), this, TQ_SLOT(save()) ); + connect( this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(saveNone()) ); } KSaveSelectDialog::~KSaveSelectDialog() {} @@ -159,9 +159,9 @@ KSaveAllDialog::KSaveAllDialog( const TQStringList& filenames, TQWidget* parent setButtonTip( User1, i18n("Lose all modifications") ); setButtonTip( Close, i18n("Cancels the action") ); - connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(cancel()) ); - connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(saveAll()) ); - connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(revert()) ); + connect( this, TQ_SIGNAL(closeClicked()), this, TQ_SLOT(cancel()) ); + connect( this, TQ_SIGNAL(okClicked()), this, TQ_SLOT(saveAll()) ); + connect( this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(revert()) ); } KSaveAllDialog::~KSaveAllDialog() diff --git a/lib/widgets/processlinemaker.cpp b/lib/widgets/processlinemaker.cpp index 113b206b..40ddf6c1 100644 --- a/lib/widgets/processlinemaker.cpp +++ b/lib/widgets/processlinemaker.cpp @@ -20,7 +20,7 @@ #include "processlinemaker.h" #include "processlinemaker.moc" -#include <kprocess.h> +#include <tdeprocess.h> ProcessLineMaker::ProcessLineMaker() { @@ -28,11 +28,11 @@ ProcessLineMaker::ProcessLineMaker() ProcessLineMaker::ProcessLineMaker( const TDEProcess* proc ) { - connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), - this, TQT_SLOT(slotReceivedStdout(TDEProcess*,char*,int)) ); + connect(proc, TQ_SIGNAL(receivedStdout(TDEProcess*,char*,int)), + this, TQ_SLOT(slotReceivedStdout(TDEProcess*,char*,int)) ); - connect(proc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)), - this, TQT_SLOT(slotReceivedStderr(TDEProcess*,char*,int)) ); + connect(proc, TQ_SIGNAL(receivedStderr(TDEProcess*,char*,int)), + this, TQ_SLOT(slotReceivedStderr(TDEProcess*,char*,int)) ); } void ProcessLineMaker::slotReceivedStdout( const char *buffer ) diff --git a/lib/widgets/processwidget.cpp b/lib/widgets/processwidget.cpp index f3088c88..8e32c5df 100644 --- a/lib/widgets/processwidget.cpp +++ b/lib/widgets/processwidget.cpp @@ -24,7 +24,7 @@ #include <tqdir.h> #include <kdebug.h> #include <tdelocale.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tqpainter.h> #include <tqapplication.h> @@ -117,17 +117,17 @@ ProcessWidget::ProcessWidget(TQWidget *parent, const char *name) procLineMaker = new ProcessLineMaker( childproc ); - connect( procLineMaker, TQT_SIGNAL(receivedStdoutLine(const TQCString&)), - this, TQT_SLOT(insertStdoutLine(const TQCString&) )); - connect( procLineMaker, TQT_SIGNAL(receivedStderrLine(const TQCString&)), - this, TQT_SLOT(insertStderrLine(const TQCString&) )); - connect( procLineMaker, TQT_SIGNAL(receivedPartialStdoutLine(const TQCString&)), - this, TQT_SLOT(addPartialStdoutLine(const TQCString&) )); - connect( procLineMaker, TQT_SIGNAL(receivedPartialStderrLine(const TQCString&)), - this, TQT_SLOT(addPartialStderrLine(const TQCString&) )); - - connect(childproc, TQT_SIGNAL(processExited(TDEProcess*)), - this, TQT_SLOT(slotProcessExited(TDEProcess*) )) ; + connect( procLineMaker, TQ_SIGNAL(receivedStdoutLine(const TQCString&)), + this, TQ_SLOT(insertStdoutLine(const TQCString&) )); + connect( procLineMaker, TQ_SIGNAL(receivedStderrLine(const TQCString&)), + this, TQ_SLOT(insertStderrLine(const TQCString&) )); + connect( procLineMaker, TQ_SIGNAL(receivedPartialStdoutLine(const TQCString&)), + this, TQ_SLOT(addPartialStdoutLine(const TQCString&) )); + connect( procLineMaker, TQ_SIGNAL(receivedPartialStderrLine(const TQCString&)), + this, TQ_SLOT(addPartialStderrLine(const TQCString&) )); + + connect(childproc, TQ_SIGNAL(processExited(TDEProcess*)), + this, TQ_SLOT(slotProcessExited(TDEProcess*) )) ; } diff --git a/lib/widgets/processwidget.h b/lib/widgets/processwidget.h index a80f3deb..d1c7676a 100644 --- a/lib/widgets/processwidget.h +++ b/lib/widgets/processwidget.h @@ -21,7 +21,7 @@ #define _PROCESSWIDGET_H_ #include <tdelistbox.h> -#include <kprocess.h> +#include <tdeprocess.h> /** @file processwidget.h diff --git a/lib/widgets/propeditor/pcheckbox.cpp b/lib/widgets/propeditor/pcheckbox.cpp index 6e9c06b7..951fad34 100644 --- a/lib/widgets/propeditor/pcheckbox.cpp +++ b/lib/widgets/propeditor/pcheckbox.cpp @@ -39,7 +39,7 @@ PCheckBox::PCheckBox(MultiProperty *property, TQWidget *parent, const char *name m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + connect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); } TQVariant PCheckBox::value() const @@ -49,9 +49,9 @@ TQVariant PCheckBox::value() const void PCheckBox::setValue(const TQVariant &value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + disconnect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); m_edit->setChecked(value.toBool()); - connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + connect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pcolorbutton.cpp b/lib/widgets/propeditor/pcolorbutton.cpp index 4b6ae5c4..9c42f4a6 100644 --- a/lib/widgets/propeditor/pcolorbutton.cpp +++ b/lib/widgets/propeditor/pcolorbutton.cpp @@ -39,10 +39,10 @@ PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); #ifndef PURE_QT m_edit = new KColorButton(this); - connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); + connect(m_edit, TQ_SIGNAL(changed(const TQColor&)), this, TQ_SLOT(updateProperty(const TQColor&))); #else m_edit = new TQPushButton(this); - connect(m_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeColor())); + connect(m_edit, TQ_SIGNAL(clicked()), this, TQ_SLOT(changeColor())); #endif m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); @@ -78,9 +78,9 @@ void PColorButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect void PColorButton::setValue(const TQVariant& value, bool emitChange) { #ifndef PURE_QT - disconnect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); + disconnect(m_edit, TQ_SIGNAL(changed(const TQColor&)), this, TQ_SLOT(updateProperty(const TQColor&))); m_edit->setColor(value.toColor()); - connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); + connect(m_edit, TQ_SIGNAL(changed(const TQColor&)), this, TQ_SLOT(updateProperty(const TQColor&))); #else m_color = value.toColor(); m_edit->setText(m_color.name()); diff --git a/lib/widgets/propeditor/pcolorcombo.cpp b/lib/widgets/propeditor/pcolorcombo.cpp index 23c61f46..78fd9dc3 100644 --- a/lib/widgets/propeditor/pcolorcombo.cpp +++ b/lib/widgets/propeditor/pcolorcombo.cpp @@ -34,7 +34,7 @@ PColorCombo::PColorCombo(MultiProperty *property, TQWidget *parent, const char * m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); } TQVariant PColorCombo::value() const @@ -44,9 +44,9 @@ TQVariant PColorCombo::value() const void PColorCombo::setValue(const TQVariant &value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + disconnect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); m_edit->setColor(value.toColor()); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp index a0749744..ca42cda6 100644 --- a/lib/widgets/propeditor/pcombobox.cpp +++ b/lib/widgets/propeditor/pcombobox.cpp @@ -45,7 +45,7 @@ void PComboBox::init(bool rw) fillBox(); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); } void PComboBox::fillBox() @@ -68,9 +68,9 @@ void PComboBox::setValue(const TQVariant &value, bool emitChange) { if (!value.isNull()) { - disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + disconnect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); m_edit->setCurrentText(findDescription(value)); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pdateedit.cpp b/lib/widgets/propeditor/pdateedit.cpp index 113ec325..563552c3 100644 --- a/lib/widgets/propeditor/pdateedit.cpp +++ b/lib/widgets/propeditor/pdateedit.cpp @@ -33,7 +33,7 @@ PDateEdit::PDateEdit(MultiProperty* property, TQWidget* parent, const char* name m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&))); + connect(m_edit, TQ_SIGNAL(valueChanged(const TQDate&)), this, TQ_SLOT(updateProperty(const TQDate&))); } TQVariant PDateEdit::value() const @@ -51,9 +51,9 @@ void PDateEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r void PDateEdit::setValue(const TQVariant& value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&))); + disconnect(m_edit, TQ_SIGNAL(valueChanged(const TQDate&)), this, TQ_SLOT(updateProperty(const TQDate&))); m_edit->setDate(value.toDate()); - connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&))); + connect(m_edit, TQ_SIGNAL(valueChanged(const TQDate&)), this, TQ_SLOT(updateProperty(const TQDate&))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pdatetimeedit.cpp b/lib/widgets/propeditor/pdatetimeedit.cpp index 55a0bdcc..8f4c03d3 100644 --- a/lib/widgets/propeditor/pdatetimeedit.cpp +++ b/lib/widgets/propeditor/pdatetimeedit.cpp @@ -32,7 +32,7 @@ PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* parent, const ch m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&))); + connect(m_edit, TQ_SIGNAL(valueChanged(const TQDateTime&)), this, TQ_SLOT(updateProperty(const TQDateTime&))); } TQVariant PDateTimeEdit::value() const @@ -50,9 +50,9 @@ void PDateTimeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRec void PDateTimeEdit::setValue(const TQVariant& value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&))); + disconnect(m_edit, TQ_SIGNAL(valueChanged(const TQDateTime&)), this, TQ_SLOT(updateProperty(const TQDateTime&))); m_edit->setDateTime(value.toDateTime()); - connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&))); + connect(m_edit, TQ_SIGNAL(valueChanged(const TQDateTime&)), this, TQ_SLOT(updateProperty(const TQDateTime&))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pdoublenuminput.cpp b/lib/widgets/propeditor/pdoublenuminput.cpp index 99b0151e..b244935f 100644 --- a/lib/widgets/propeditor/pdoublenuminput.cpp +++ b/lib/widgets/propeditor/pdoublenuminput.cpp @@ -38,10 +38,10 @@ PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *parent, cons #ifndef PURE_QT m_edit = new KDoubleNumInput(-999999.0, 999999.0, 0.0, 0.01, 2, this); m_edit->setLabel(TQString()); - connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double))); + connect(m_edit, TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(updateProperty(double))); #else m_edit = new TQFloatInput(-999999, 999999, 0.01, 2, this ); - connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); #endif m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); /* m_edit->setMinValue(-999999999); @@ -59,13 +59,13 @@ TQVariant PDoubleNumInput::value() const void PDoubleNumInput::setValue(const TQVariant &value, bool emitChange) { #ifndef PURE_QT - disconnect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double))); + disconnect(m_edit, TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(updateProperty(double))); m_edit->setValue(value.toDouble()); - connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double))); + connect(m_edit, TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(updateProperty(double))); #else - disconnect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + disconnect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); m_edit->setValue(int(value.toDouble()*pow(m_edit->digits(),10))); - connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); #endif if (emitChange) emit propertyChanged(m_property, value); diff --git a/lib/widgets/propeditor/pfontbutton.cpp b/lib/widgets/propeditor/pfontbutton.cpp index 8932c4ae..7044e6c1 100644 --- a/lib/widgets/propeditor/pfontbutton.cpp +++ b/lib/widgets/propeditor/pfontbutton.cpp @@ -44,7 +44,7 @@ PFontButton::PFontButton(MultiProperty* property, TQWidget* parent, const char* #endif l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(updateProperty(const TQFont& ))); + connect(m_edit, TQ_SIGNAL(fontSelected(const TQFont& )), this, TQ_SLOT(updateProperty(const TQFont& ))); } TQVariant PFontButton::value() const @@ -66,9 +66,9 @@ void PFontButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& void PFontButton::setValue(const TQVariant& value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(fontSelected(const TQFont&)), this, TQT_SLOT(updateProperty(const TQFont&))); + disconnect(m_edit, TQ_SIGNAL(fontSelected(const TQFont&)), this, TQ_SLOT(updateProperty(const TQFont&))); m_edit->setFont(value.toFont()); - connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(updateProperty(const TQFont& ))); + connect(m_edit, TQ_SIGNAL(fontSelected(const TQFont& )), this, TQ_SLOT(updateProperty(const TQFont& ))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pfontcombo.cpp b/lib/widgets/propeditor/pfontcombo.cpp index cb8a80b2..224e4bd0 100644 --- a/lib/widgets/propeditor/pfontcombo.cpp +++ b/lib/widgets/propeditor/pfontcombo.cpp @@ -46,9 +46,9 @@ PFontCombo::PFontCombo(MultiProperty *property, TQWidget *parent, const char *na #ifdef PURE_QT TQFontDatabase fonts; m_edit->insertStringList(fonts.families()); - connect(m_edit, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(activated(const TQString &)), this, TQ_SLOT(updateProperty(const TQString&))); #else - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); #endif } @@ -63,13 +63,13 @@ TQVariant PFontCombo::value() const void PFontCombo::setValue(const TQVariant &value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + disconnect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); #ifndef PURE_QT m_edit->setCurrentFont(value.toString()); #else m_edit->setCurrentText(value.toString()); #endif - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/plineedit.cpp b/lib/widgets/propeditor/plineedit.cpp index f5e1ecb0..c27a6b74 100644 --- a/lib/widgets/propeditor/plineedit.cpp +++ b/lib/widgets/propeditor/plineedit.cpp @@ -32,7 +32,7 @@ PLineEdit::PLineEdit(MultiProperty *property, TQWidget *parent, const char *name m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); } TQVariant PLineEdit::value() const @@ -42,9 +42,9 @@ TQVariant PLineEdit::value() const void PLineEdit::setValue(const TQVariant &value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + disconnect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); m_edit->setText(value.toString()); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/plinestyleedit.cpp b/lib/widgets/propeditor/plinestyleedit.cpp index 996b1d0e..baa6224b 100644 --- a/lib/widgets/propeditor/plinestyleedit.cpp +++ b/lib/widgets/propeditor/plinestyleedit.cpp @@ -140,7 +140,7 @@ PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* parent, const m_edit->insertItem(TQPixmap(dashdot)); m_edit->insertItem(TQPixmap(dashdotdot)); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); } TQVariant PLineStyleEdit::value() const @@ -186,9 +186,9 @@ void PLineStyleEdit::setValue(const TQVariant& value, bool emitChange) return; if ((value.toInt() > 5) || (value.toInt() < 0)) return; - disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + disconnect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); m_edit->setCurrentItem(value.toInt()); - connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateProperty(int))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp index 3241f892..0026ec31 100644 --- a/lib/widgets/propeditor/ppixmapedit.cpp +++ b/lib/widgets/propeditor/ppixmapedit.cpp @@ -61,7 +61,7 @@ PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* m_popup->hide(); - connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateProperty())); + connect(m_button, TQ_SIGNAL(clicked()), this, TQ_SLOT(updateProperty())); } TQVariant PPixmapEdit::value() const diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp index 987bb31b..0185b2e4 100644 --- a/lib/widgets/propeditor/propertyeditor.cpp +++ b/lib/widgets/propeditor/propertyeditor.cpp @@ -177,10 +177,10 @@ PropertyEditor::PropertyEditor(TQWidget *parent, const char *name) header()->setClickEnabled(false); - connect(header(), TQT_SIGNAL(sizeChange(int, int, int)), - this, TQT_SLOT(updateEditorSize())); - connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), - this, TQT_SLOT(slotClicked(TQListViewItem*))); + connect(header(), TQ_SIGNAL(sizeChange(int, int, int)), + this, TQ_SLOT(updateEditorSize())); + connect(this, TQ_SIGNAL(currentChanged(TQListViewItem*)), + this, TQ_SLOT(slotClicked(TQListViewItem*))); m_currentEditItem = 0; m_doubleClickForEdit = true; @@ -199,7 +199,7 @@ PropertyEditor::PropertyEditor(TQWidget *parent, const char *name) m_undoButton->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); m_undoButton->resize(m_undoButton->height(), m_undoButton->height()); m_undoButton->hide(); - connect(m_undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo())); + connect(m_undoButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(undo())); m_currentEditLayout = new TQGridLayout(m_currentEditArea, 1, 2, 0, 0); // m_currentEditLayout->addWidget(m_undoButton, 0, 1); } @@ -214,7 +214,7 @@ void PropertyEditor::populateProperties(PropertyList *list) if (list == 0) return; m_list = list; - connect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*))); + connect(m_list, TQ_SIGNAL(propertyValueChanged(Property*)), this, TQ_SLOT(propertyValueChanged(Property*))); const TQValueList<TQPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup(); for (TQValueList<TQPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin(); it != groups.end(); ++it) @@ -288,7 +288,7 @@ void PropertyEditor::clearProperties() hideEditor(); - disconnect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*))); + disconnect(m_list, TQ_SIGNAL(propertyValueChanged(Property*)), this, TQ_SLOT(propertyValueChanged(Property*))); clear(); delete m_list; m_list = 0; @@ -445,8 +445,8 @@ Machine *PropertyEditor::machine(MultiProperty *property) if (m_registeredForType[name] == 0) { m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property); - connect(m_registeredForType[name]->propertyEditor, TQT_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)), - this, TQT_SLOT(propertyChanged(MultiProperty*, const TQVariant&))); + connect(m_registeredForType[name]->propertyEditor, TQ_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)), + this, TQ_SLOT(propertyChanged(MultiProperty*, const TQVariant&))); m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->childrenRect().topLeft()); m_registeredForType[name]->propertyEditor->hide(); } diff --git a/lib/widgets/propeditor/propertylist.cpp b/lib/widgets/propeditor/propertylist.cpp index a5b43a3f..6ef367c2 100644 --- a/lib/widgets/propeditor/propertylist.cpp +++ b/lib/widgets/propeditor/propertylist.cpp @@ -327,7 +327,7 @@ void PropertyBuffer::intersect(const PropertyList *list) // tqWarning("intersect:: removing %s from intersection", it.key().ascii()); removeProperty(it.key()); } - connect(list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(intersectedValueChanged(Property*))); + connect(list, TQ_SIGNAL(propertyValueChanged(Property*)), this, TQ_SLOT(intersectedValueChanged(Property*))); } void PropertyBuffer::intersectedValueChanged(Property *property) @@ -359,7 +359,7 @@ PropertyBuffer::PropertyBuffer(PropertyList *list) addToGroup(list->m_groupOfProperty[it.data()], mp); m_list[it.key()] = mp; } - connect(list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(intersectedValueChanged(Property*))); + connect(list, TQ_SIGNAL(propertyValueChanged(Property*)), this, TQ_SLOT(intersectedValueChanged(Property*))); } } diff --git a/lib/widgets/propeditor/pspinbox.cpp b/lib/widgets/propeditor/pspinbox.cpp index 755041c1..cb15bebb 100644 --- a/lib/widgets/propeditor/pspinbox.cpp +++ b/lib/widgets/propeditor/pspinbox.cpp @@ -34,7 +34,7 @@ PSpinBox::PSpinBox(MultiProperty *property, TQWidget *parent, const char *name) m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); } PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *parent, const char *name) @@ -44,7 +44,7 @@ PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step m_edit = new TQSpinBox(minValue, maxValue, step, this); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); } TQVariant PSpinBox::value() const @@ -54,9 +54,9 @@ TQVariant PSpinBox::value() const void PSpinBox::setValue(const TQVariant &value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + disconnect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); m_edit->setValue(value.toInt()); - connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int))); + connect(m_edit, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(updateProperty(int))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/pstringlistedit.cpp b/lib/widgets/propeditor/pstringlistedit.cpp index b6f4b74e..9f2e1364 100644 --- a/lib/widgets/propeditor/pstringlistedit.cpp +++ b/lib/widgets/propeditor/pstringlistedit.cpp @@ -49,7 +49,7 @@ PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *parent, cons pbSelect->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); l->addWidget(pbSelect); - connect(pbSelect, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor())); + connect(pbSelect, TQ_SIGNAL(clicked()), this, TQ_SLOT(showEditor())); } TQVariant PStringListEdit::value() const @@ -87,8 +87,8 @@ void PStringListEdit::showEditor() #endif TQSpacerItem *si = new TQSpacerItem(30, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding); - connect(pbOk, TQT_SIGNAL(clicked()), dia, TQT_SLOT(accept())); - connect(pbCancel, TQT_SIGNAL(clicked()), dia, TQT_SLOT(reject())); + connect(pbOk, TQ_SIGNAL(clicked()), dia, TQ_SLOT(accept())); + connect(pbCancel, TQ_SIGNAL(clicked()), dia, TQ_SLOT(reject())); dh->addItem(si); dh->addWidget(pbOk); diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp index ee91ea48..7b7afec1 100644 --- a/lib/widgets/propeditor/psymbolcombo.cpp +++ b/lib/widgets/propeditor/psymbolcombo.cpp @@ -51,8 +51,8 @@ PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char m_select->hide(); #endif - connect(m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectChar())); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_select, TQ_SIGNAL(clicked()), this, TQ_SLOT(selectChar())); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); } TQVariant PSymbolCombo::value() const @@ -67,9 +67,9 @@ void PSymbolCombo::setValue(const TQVariant &value, bool emitChange) { if (!(value.isNull())) { - disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + disconnect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); m_edit->setText(TQChar(value.toInt())); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); if (emitChange) emit propertyChanged(m_property, value); } @@ -89,8 +89,8 @@ void PSymbolCombo::selectChar() KPushButton *pbCancel = new KPushButton(KStdGuiItem::cancel(), dia); TQSpacerItem *si = new TQSpacerItem(30, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding); - connect(pbOk, TQT_SIGNAL(clicked()), dia, TQT_SLOT(accept())); - connect(pbCancel, TQT_SIGNAL(clicked()), dia, TQT_SLOT(reject())); + connect(pbOk, TQ_SIGNAL(clicked()), dia, TQ_SLOT(accept())); + connect(pbCancel, TQ_SIGNAL(clicked()), dia, TQ_SLOT(reject())); dh->addItem(si); dh->addWidget(pbOk); diff --git a/lib/widgets/propeditor/purledit.cpp b/lib/widgets/propeditor/purledit.cpp index 047c9997..d2df31e0 100644 --- a/lib/widgets/propeditor/purledit.cpp +++ b/lib/widgets/propeditor/purledit.cpp @@ -38,14 +38,14 @@ PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const c m_edit = new KURLRequester(this); l->addWidget(m_edit); m_edit->setMode((KFile::Mode)mode); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); #else m_edit = new KLineEdit(this); m_select = new TQPushButton("...",this); l->addWidget(m_edit); l->addWidget(m_select); m_mode = mode; - connect( m_select, TQT_SIGNAL(clicked()),this,TQT_SLOT(select())); + connect( m_select, TQ_SIGNAL(clicked()),this,TQ_SLOT(select())); #endif m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } @@ -62,9 +62,9 @@ TQVariant PUrlEdit::value() const void PUrlEdit::setValue(const TQVariant& value, bool emitChange) { #ifndef PURE_QT - disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + disconnect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); m_edit->setURL(value.toString()); - connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); + connect(m_edit, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(updateProperty(const TQString&))); #else m_edit->setText(value.toString()); #endif diff --git a/lib/widgets/propeditor/pyesnobutton.cpp b/lib/widgets/propeditor/pyesnobutton.cpp index dae82868..2d4bfb57 100644 --- a/lib/widgets/propeditor/pyesnobutton.cpp +++ b/lib/widgets/propeditor/pyesnobutton.cpp @@ -40,7 +40,7 @@ PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* parent, const char m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + connect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); } TQVariant PYesNoButton::value() const @@ -55,10 +55,10 @@ void PYesNoButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect void PYesNoButton::setValue(const TQVariant& value, bool emitChange) { - disconnect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + disconnect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); m_edit->setDown(value.toBool()); value.toBool() ? m_edit->setText(i18n("Yes")) : m_edit->setText(i18n("No")); - connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool))); + connect(m_edit, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(updateProperty(bool))); if (emitChange) emit propertyChanged(m_property, value); } diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp index 683a0931..862de024 100644 --- a/lib/widgets/propeditor/qeditlistbox.cpp +++ b/lib/widgets/propeditor/qeditlistbox.cpp @@ -120,7 +120,7 @@ void QEditListBox::init( bool checkAtEntering, int buttons, if ( buttons & Add ) { servNewButton = new TQPushButton(i18n("&Add"), gb); servNewButton->setEnabled(false); - connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem())); + connect(servNewButton, TQ_SIGNAL(clicked()), TQ_SLOT(addItem())); grid->addWidget(servNewButton, row++, 1); } @@ -128,7 +128,7 @@ void QEditListBox::init( bool checkAtEntering, int buttons, if ( buttons & Remove ) { servRemoveButton = new TQPushButton(i18n("&Remove"), gb); servRemoveButton->setEnabled(false); - connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem())); + connect(servRemoveButton, TQ_SIGNAL(clicked()), TQ_SLOT(removeItem())); grid->addWidget(servRemoveButton, row++, 1); } @@ -136,20 +136,20 @@ void QEditListBox::init( bool checkAtEntering, int buttons, if ( buttons & UpDown ) { servUpButton = new TQPushButton(i18n("Move &Up"), gb); servUpButton->setEnabled(false); - connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp())); + connect(servUpButton, TQ_SIGNAL(clicked()), TQ_SLOT(moveItemUp())); servDownButton = new TQPushButton(i18n("Move &Down"), gb); servDownButton->setEnabled(false); - connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown())); + connect(servDownButton, TQ_SIGNAL(clicked()), TQ_SLOT(moveItemDown())); grid->addWidget(servUpButton, row++, 1); grid->addWidget(servDownButton, row++, 1); } - connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&))); + connect(m_lineEdit,TQ_SIGNAL(textChanged(const TQString&)),this,TQ_SLOT(typedSomething(const TQString&))); - connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem())); - connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int))); + connect(m_lineEdit,TQ_SIGNAL(returnPressed()),this,TQ_SLOT(addItem())); + connect(m_listBox, TQ_SIGNAL(highlighted(int)), TQ_SLOT(enableMoveButtons(int))); // maybe supplied lineedit has some text already typedSomething( m_lineEdit->text() ); diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp index c54f425c..1f5c6aa3 100644 --- a/lib/widgets/qcomboview.cpp +++ b/lib/widgets/qcomboview.cpp @@ -26,7 +26,7 @@ #include "tqapplication.h" #include "tqlineedit.h" #include "tqbitmap.h" -#include "tqeffects_p.h" +#include "private/tqeffects_p.h" #include "tqstringlist.h" #include "tqcombobox.h" #include "tqstyle.h" @@ -38,7 +38,7 @@ class QComboViewData public: QComboViewData( QComboView *cb ): current(0), lView( 0 ), combo( cb ) { - duplicatesEnabled = TRUE; + duplicatesEnabled = true; cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); } @@ -46,7 +46,7 @@ public: void updateLinedGeometry(); void setListView( TQListView *l ) { lView = l ; - l->setMouseTracking( TRUE );} + l->setMouseTracking( true );} TQListViewItem *current; int maxCount; @@ -130,7 +130,7 @@ static inline bool checkIndex( const char *method, const char * name, Constructs a combobox with a maximum size and either Motif 2.0 or Windows look and feel. - The input field can be edited if \a rw is TRUE, otherwise the user + The input field can be edited if \a rw is true, otherwise the user may only choose one of the items in the combobox. The \a parent and \a name arguments are passed on to the TQWidget @@ -148,14 +148,14 @@ QComboView::QComboView( bool rw, TQWidget *parent, const char *name ) d->maxCount = INT_MAX; setSizeLimit(10); d->p = AtBottom; - d->autoresize = FALSE; - d->poppedUp = FALSE; - d->arrowDown = FALSE; - d->discardNextMousePress = FALSE; - d->shortClick = FALSE; - d->useCompletion = FALSE; + d->autoresize = false; + d->poppedUp = false; + d->arrowDown = false; + d->discardNextMousePress = false; + d->shortClick = false; + d->useCompletion = false; d->completeAt = 0; - d->completeNow = FALSE; + d->completeNow = false; d->completionTimer = new TQTimer( this ); setFocusPolicy( TQWidget::StrongFocus ); @@ -315,7 +315,7 @@ void QComboView::internalActivate( TQListViewItem * item ) return; } popDownListView(); - d->poppedUp = FALSE; + d->poppedUp = false; d->current = item; @@ -361,7 +361,7 @@ void QComboView::internalHighlight( TQListViewItem * item ) */ void QComboView::internalClickTimeout() { - d->shortClick = FALSE; + d->shortClick = false; } /*! @@ -422,7 +422,7 @@ void QComboView::paintEvent( TQPaintEvent * ) flags |= TQStyle::Style_HasFocus; if ( width() < 5 || height() < 5 ) { - qDrawShadePanel( &p, rect(), g, FALSE, 2, + qDrawShadePanel( &p, rect(), g, false, 2, &g.brush( TQColorGroup::Button ) ); return; } @@ -457,7 +457,7 @@ void QComboView::paintEvent( TQPaintEvent * ) ( re.height() - pix->height() ) / 2, *pix ); } } - p.setClipping( FALSE ); + p.setClipping( false ); } @@ -469,7 +469,7 @@ void QComboView::mousePressEvent( TQMouseEvent *e ) if ( e->button() != TQt::LeftButton ) return; if ( d->discardNextMousePress ) { - d->discardNextMousePress = FALSE; + d->discardNextMousePress = false; return; } TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, @@ -481,18 +481,18 @@ void QComboView::mousePressEvent( TQMouseEvent *e ) arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); if ( childCount() && ( !editable() || arrowRect.contains( e->pos() ) ) ) { - d->arrowPressed = FALSE; - listView()->blockSignals( TRUE ); + d->arrowPressed = false; + listView()->blockSignals( true ); tqApp->sendEvent( listView(), e ); // trigger the listbox's autoscroll - listView()->blockSignals( FALSE ); + listView()->blockSignals( false ); popup(); if ( arrowRect.contains( e->pos() ) ) { - d->arrowPressed = TRUE; - d->arrowDown = TRUE; - repaint( FALSE ); + d->arrowPressed = true; + d->arrowDown = true; + repaint( false ); } - TQTimer::singleShot( 200, this, TQT_SLOT(internalClickTimeout())); - d->shortClick = TRUE; + TQTimer::singleShot( 200, this, TQ_SLOT(internalClickTimeout())); + d->shortClick = true; } } @@ -585,7 +585,7 @@ void QComboView::keyPressEvent( TQKeyEvent *e ) else return; } - d->completionTimer->start( 400, TRUE ); + d->completionTimer->start( 400, true ); } else { e->ignore(); return; @@ -613,7 +613,7 @@ TQString QComboView::currentText() const void QComboView::focusInEvent( TQFocusEvent * e ) { TQWidget::focusInEvent( e ); - d->completeNow = FALSE; + d->completeNow = false; d->completeAt = 0; emit focusGranted(); @@ -625,7 +625,7 @@ void QComboView::focusInEvent( TQFocusEvent * e ) void QComboView::focusOutEvent( TQFocusEvent * e ) { TQWidget::focusOutEvent( e ); - d->completeNow = FALSE; + d->completeNow = false; d->completeAt = 0; emit focusLost(); @@ -726,7 +726,7 @@ void QComboView::popup() lb->triggerUpdate( ); lb->installEventFilter( this ); lb->viewport()->installEventFilter( this ); - d->mouseWasInsidePopup = FALSE; + d->mouseWasInsidePopup = false; // int w = lb->variableWidth() ? lb->sizeHint().width() : width(); int w = width(); int h = listHeight( lb, d->sizeLimit ); @@ -758,12 +758,12 @@ void QComboView::popup() lb->raise(); bool block = lb->signalsBlocked(); - lb->blockSignals( TRUE ); + lb->blockSignals( true ); TQListViewItem *currentLBItem = d->current ; lb->setCurrentItem( currentLBItem ); // set the current item to also be the selected item if it isn't already if ( currentLBItem && currentLBItem->isSelectable() && !currentLBItem->isSelected() ) - lb->setSelected( currentLBItem, TRUE ); + lb->setSelected( currentLBItem, true ); lb->blockSignals( block ); lb->setVScrollBarMode(TQScrollView::Auto); @@ -776,7 +776,7 @@ void QComboView::popup() } else*/ //#endif lb->show(); - d->poppedUp = TRUE; + d->poppedUp = true; } @@ -807,10 +807,10 @@ void QComboView::popDownListView() d->listView()->hide(); d->listView()->setCurrentItem( d->current ); if ( d->arrowDown ) { - d->arrowDown = FALSE; - repaint( FALSE ); + d->arrowDown = false; + repaint( false ); } - d->poppedUp = FALSE; + d->poppedUp = false; } @@ -849,16 +849,16 @@ void QComboView::currentChanged() bool QComboView::eventFilter( TQObject *object, TQEvent *event ) { if ( !event ) - return TRUE; + return true; else if ( object == d->ed ) { if ( event->type() == TQEvent::KeyPress ) { bool isAccepted = ( (TQKeyEvent*)event )->isAccepted(); keyPressEvent( (TQKeyEvent *)event ); if ( ((TQKeyEvent *)event)->isAccepted() ) { - d->completeNow = FALSE; - return TRUE; + d->completeNow = false; + return true; } else if ( ((TQKeyEvent *)event)->key() != Key_End ) { - d->completeNow = TRUE; + d->completeNow = true; d->completeAt = d->ed->cursorPosition(); } if ( isAccepted ) @@ -866,7 +866,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) else ( (TQKeyEvent*)event )->ignore(); } else if ( event->type() == TQEvent::KeyRelease ) { - d->completeNow = FALSE; + d->completeNow = false; keyReleaseEvent( (TQKeyEvent *)event ); return ((TQKeyEvent *)event)->isAccepted(); } else if ( event->type() == TQEvent::FocusIn ) { @@ -877,7 +877,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) if ( !d->ed->text().isNull() && d->ed->cursorPosition() > d->completeAt && d->ed->cursorPosition() == (int)d->ed->text().length() ) { - d->completeNow = FALSE; + d->completeNow = false; TQString ct( d->ed->text() ); TQListViewItem *i = completionIndex( ct, currentItem() ); if ( i ) { @@ -896,7 +896,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) // tqWarning("!d->mouseWasInsidePopup"); TQPoint pos = e->pos(); if ( d->listView()->rect().contains( pos ) ) - d->mouseWasInsidePopup = TRUE; + d->mouseWasInsidePopup = true; // Check if arrow button should toggle if ( d->arrowPressed ) { TQPoint comboPos; @@ -907,20 +907,20 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) arrowRect = TQStyle::visualRect(arrowRect, this); if ( arrowRect.contains( comboPos ) ) { if ( !d->arrowDown ) { - d->arrowDown = TRUE; - repaint( FALSE ); + d->arrowDown = true; + repaint( false ); } } else { if ( d->arrowDown ) { - d->arrowDown = FALSE; - repaint( FALSE ); + d->arrowDown = false; + repaint( false ); } } } } else if ((e->state() & ( TQt::RightButton | TQt::LeftButton | TQt::MidButton ) ) == 0 && style().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) { // tqWarning("event filter:: emu"); - TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE ); + TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), true ); // if ( mouseW == d->listView()->viewport() ) { //### if ( mouseW == d->listView()->viewport() ) { TQListViewItem *sel = d->listView()->itemAt(e->pos()); @@ -929,7 +929,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) d->listView()->setCurrentItem(sel); d->listView()->setSelected(sel, true); } - return TRUE; + return true; } } @@ -940,15 +940,15 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) e->pos(), e->button(), e->state() ) ; // will hide popup TQApplication::sendEvent( object, &tmp ); - return TRUE; + return true; } else { if ( d->mouseWasInsidePopup ) { popDownListView(); } else { - d->arrowPressed = FALSE; + d->arrowPressed = false; if ( d->arrowDown ) { - d->arrowDown = FALSE; - repaint( FALSE ); + d->arrowDown = false; + repaint( false ); } } } @@ -957,12 +957,12 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) case TQEvent::MouseButtonPress: if ( !d->listView()->rect().contains( e->pos() ) ) { TQPoint globalPos = d->listView()->mapToGlobal(e->pos()); - if ( TQApplication::widgetAt( globalPos, TRUE ) == this ) { - d->discardNextMousePress = TRUE; + if ( TQApplication::widgetAt( globalPos, true ) == this ) { + d->discardNextMousePress = true; // avoid popping up again } popDownListView(); - return TRUE; + return true; } break; case TQEvent::KeyPress: @@ -975,13 +975,13 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event ) case Key_Escape: if ( d->poppedUp ) { popDownListView(); - return TRUE; + return true; } break; case Key_Enter: case Key_Return: // work around TQDialog's enter handling - return FALSE; + return false; default: break; } @@ -1083,11 +1083,11 @@ void QComboView::returnPressed() return; TQListViewItem *c = 0; - bool doInsert = TRUE; + bool doInsert = true; if ( !d->duplicatesEnabled ) { c = listView()->findItem(s, 0); if ( c ) - doInsert = FALSE; + doInsert = false; } if ( doInsert ) { @@ -1211,7 +1211,7 @@ void QComboView::setListView( TQListView * newListView ) delete d->listView(); - newListView->reparent( this, WType_Popup, TQPoint(0,0), FALSE ); + newListView->reparent( this, WType_Popup, TQPoint(0,0), false ); d->setListView( newListView ); d->listView()->setFont( font() ); d->listView()->setPalette( palette() ); @@ -1241,16 +1241,16 @@ void QComboView::setListView( TQListView * newListView ) d->listView()->resize( 100, 10 ); */ - connect( d->listView(), TQT_SIGNAL(returnPressed(TQListViewItem*)), - TQT_SLOT(internalActivate(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(doubleClicked(TQListViewItem*)), - TQT_SLOT(internalActivate(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(doubleClicked(TQListViewItem*)), - TQT_SLOT(checkState(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(currentChanged(TQListViewItem*)), - TQT_SLOT(internalHighlight(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(selectionChanged(TQListViewItem*)), - TQT_SLOT(internalHighlight(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(returnPressed(TQListViewItem*)), + TQ_SLOT(internalActivate(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(doubleClicked(TQListViewItem*)), + TQ_SLOT(internalActivate(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(doubleClicked(TQListViewItem*)), + TQ_SLOT(checkState(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(currentChanged(TQListViewItem*)), + TQ_SLOT(internalHighlight(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(selectionChanged(TQListViewItem*)), + TQ_SLOT(internalHighlight(TQListViewItem*))); } @@ -1320,7 +1320,7 @@ void QComboView::setEditText( const TQString &newText ) void QComboView::setAutoCompletion( bool enable ) { d->useCompletion = enable; - d->completeNow = FALSE; + d->completeNow = false; } @@ -1386,16 +1386,16 @@ void QComboView::setUpListView() d->listView()->header()->hide(); - connect( d->listView(), TQT_SIGNAL(returnPressed(TQListViewItem*)), - TQT_SLOT(internalActivate(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(doubleClicked(TQListViewItem*)), - TQT_SLOT(internalActivate(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(doubleClicked(TQListViewItem*)), - TQT_SLOT(checkState(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(currentChanged(TQListViewItem*)), - TQT_SLOT(internalHighlight(TQListViewItem*))); - connect( d->listView(), TQT_SIGNAL(selectionChanged(TQListViewItem*)), - TQT_SLOT(internalHighlight(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(returnPressed(TQListViewItem*)), + TQ_SLOT(internalActivate(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(doubleClicked(TQListViewItem*)), + TQ_SLOT(internalActivate(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(doubleClicked(TQListViewItem*)), + TQ_SLOT(checkState(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(currentChanged(TQListViewItem*)), + TQ_SLOT(internalHighlight(TQListViewItem*))); + connect( d->listView(), TQ_SIGNAL(selectionChanged(TQListViewItem*)), + TQ_SLOT(internalHighlight(TQListViewItem*))); } @@ -1431,15 +1431,15 @@ void QComboView::setLineEdit( TQLineEdit *edit ) d->ed = edit; if ( edit->parent() != this ) { - edit->reparent( this, TQPoint(0,0), FALSE ); + edit->reparent( this, TQPoint(0,0), false ); edit->setFont( font() ); } - connect (edit, TQT_SIGNAL( textChanged( const TQString& ) ), - this, TQT_SIGNAL( textChanged( const TQString& ) ) ); - connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(returnPressed()) ); + connect (edit, TQ_SIGNAL( textChanged( const TQString& ) ), + this, TQ_SIGNAL( textChanged( const TQString& ) ) ); + connect( edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(returnPressed()) ); - edit->setFrame( FALSE ); + edit->setFrame( false ); d->updateLinedGeometry(); edit->installEventFilter( this ); setFocusProxy( edit ); |