summaryrefslogtreecommitdiffstats
path: root/tools/porting
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:18:55 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:18:55 (GMT)
commite5fcad302d86d316390c6b0f62759a067313e8a9 (patch)
treec2afbf6f1066b6ce261f14341cf6d310e5595bc1 /tools/porting
downloadQt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2
Long live Qt 4.5!
Diffstat (limited to 'tools/porting')
-rw-r--r--tools/porting/porting.pro2
-rw-r--r--tools/porting/src/ast.cpp1215
-rw-r--r--tools/porting/src/ast.h1598
-rw-r--r--tools/porting/src/codemodel.cpp91
-rw-r--r--tools/porting/src/codemodel.h777
-rw-r--r--tools/porting/src/codemodelattributes.cpp195
-rw-r--r--tools/porting/src/codemodelattributes.h72
-rw-r--r--tools/porting/src/codemodelwalker.cpp125
-rw-r--r--tools/porting/src/codemodelwalker.h80
-rw-r--r--tools/porting/src/cpplexer.cpp1297
-rw-r--r--tools/porting/src/cpplexer.h107
-rw-r--r--tools/porting/src/errors.cpp51
-rw-r--r--tools/porting/src/errors.h71
-rw-r--r--tools/porting/src/fileporter.cpp369
-rw-r--r--tools/porting/src/fileporter.h116
-rw-r--r--tools/porting/src/filewriter.cpp151
-rw-r--r--tools/porting/src/filewriter.h75
-rw-r--r--tools/porting/src/list.h374
-rw-r--r--tools/porting/src/logger.cpp148
-rw-r--r--tools/porting/src/logger.h124
-rw-r--r--tools/porting/src/parser.cpp4526
-rw-r--r--tools/porting/src/parser.h247
-rw-r--r--tools/porting/src/port.cpp297
-rw-r--r--tools/porting/src/portingrules.cpp296
-rw-r--r--tools/porting/src/portingrules.h114
-rw-r--r--tools/porting/src/preprocessorcontrol.cpp430
-rw-r--r--tools/porting/src/preprocessorcontrol.h139
-rw-r--r--tools/porting/src/projectporter.cpp414
-rw-r--r--tools/porting/src/projectporter.h82
-rw-r--r--tools/porting/src/proparser.cpp193
-rw-r--r--tools/porting/src/proparser.h55
-rw-r--r--tools/porting/src/q3porting.xml10567
-rw-r--r--tools/porting/src/qt3headers0.qrc6
-rw-r--r--tools/porting/src/qt3headers0.resourcebin0 -> 547809 bytes
-rw-r--r--tools/porting/src/qt3headers1.qrc6
-rw-r--r--tools/porting/src/qt3headers1.resourcebin0 -> 512251 bytes
-rw-r--r--tools/porting/src/qt3headers2.qrc6
-rw-r--r--tools/porting/src/qt3headers2.resourcebin0 -> 392439 bytes
-rw-r--r--tools/porting/src/qt3headers3.qrc6
-rw-r--r--tools/porting/src/qt3headers3.resourcebin0 -> 553089 bytes
-rw-r--r--tools/porting/src/qt3to4.pri68
-rw-r--r--tools/porting/src/qtsimplexml.cpp278
-rw-r--r--tools/porting/src/qtsimplexml.h97
-rw-r--r--tools/porting/src/replacetoken.cpp105
-rw-r--r--tools/porting/src/replacetoken.h67
-rw-r--r--tools/porting/src/rpp.cpp728
-rw-r--r--tools/porting/src/rpp.h1072
-rw-r--r--tools/porting/src/rppexpressionbuilder.cpp330
-rw-r--r--tools/porting/src/rppexpressionbuilder.h107
-rw-r--r--tools/porting/src/rpplexer.cpp381
-rw-r--r--tools/porting/src/rpplexer.h100
-rw-r--r--tools/porting/src/rpptreeevaluator.cpp554
-rw-r--r--tools/porting/src/rpptreeevaluator.h117
-rw-r--r--tools/porting/src/rpptreewalker.cpp166
-rw-r--r--tools/porting/src/rpptreewalker.h85
-rw-r--r--tools/porting/src/semantic.cpp1227
-rw-r--r--tools/porting/src/semantic.h131
-rw-r--r--tools/porting/src/smallobject.cpp59
-rw-r--r--tools/porting/src/smallobject.h182
-rw-r--r--tools/porting/src/src.pro93
-rw-r--r--tools/porting/src/textreplacement.cpp100
-rw-r--r--tools/porting/src/textreplacement.h91
-rw-r--r--tools/porting/src/tokenengine.cpp402
-rw-r--r--tools/porting/src/tokenengine.h391
-rw-r--r--tools/porting/src/tokenizer.cpp491
-rw-r--r--tools/porting/src/tokenizer.h88
-rw-r--r--tools/porting/src/tokenreplacements.cpp371
-rw-r--r--tools/porting/src/tokenreplacements.h154
-rw-r--r--tools/porting/src/tokens.h186
-rw-r--r--tools/porting/src/tokenstreamadapter.h152
-rw-r--r--tools/porting/src/translationunit.cpp102
-rw-r--r--tools/porting/src/translationunit.h93
-rw-r--r--tools/porting/src/treewalker.cpp457
-rw-r--r--tools/porting/src/treewalker.h235
74 files changed, 33682 insertions, 0 deletions
diff --git a/tools/porting/porting.pro b/tools/porting/porting.pro
new file mode 100644
index 0000000..65d9262
--- /dev/null
+++ b/tools/porting/porting.pro
@@ -0,0 +1,2 @@
+TEMPLATE = subdirs
+SUBDIRS = src
diff --git a/tools/porting/src/ast.cpp b/tools/porting/src/ast.cpp
new file mode 100644
index 0000000..9e8ce94
--- /dev/null
+++ b/tools/porting/src/ast.cpp
@@ -0,0 +1,1215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "ast.h"
+#include <QStringList>
+#include <stdio.h>
+
+QT_BEGIN_NAMESPACE
+
+int AST::N = 0;
+
+// ------------------------------------------------------------------------
+AST::AST(int startToken, int count)
+ : m_scope(0),
+ m_startToken(startToken),
+ m_endToken(startToken + count),
+ m_parent(0),
+ m_children(0)
+{
+ ++N;
+}
+
+void AST::setParent(AST *parent)
+{
+ if (m_parent)
+ m_parent->removeChild(this);
+
+ m_parent = parent;
+
+ if (m_parent)
+ m_parent->appendChild(this);
+}
+
+void AST::appendChild(AST *child)
+{
+ m_children = snoc(m_children, child, _pool);
+}
+
+void AST::removeChild(AST *child)
+{
+ fprintf(stderr, "AST::removeChild child: %p not implemented yet\n", child);
+}
+
+// ------------------------------------------------------------------------
+NameAST::NameAST()
+ : m_global(false), m_unqualifiedName(0), m_classOrNamespaceNameList(0)
+{
+}
+
+void NameAST::setGlobal(bool b)
+{
+ m_global = b;
+}
+
+void NameAST::setUnqualifiedName(ClassOrNamespaceNameAST *unqualifiedName)
+{
+ m_unqualifiedName = unqualifiedName;
+ if (m_unqualifiedName) m_unqualifiedName->setParent(this);
+}
+
+void NameAST::addClassOrNamespaceName(ClassOrNamespaceNameAST *classOrNamespaceName)
+{
+ if(!classOrNamespaceName)
+ return;
+
+ classOrNamespaceName->setParent(this);
+ m_classOrNamespaceNameList = snoc(m_classOrNamespaceNameList, classOrNamespaceName, _pool);
+}
+
+// ------------------------------------------------------------------------
+DeclarationAST::DeclarationAST()
+{
+}
+
+// ------------------------------------------------------------------------
+LinkageBodyAST::LinkageBodyAST()
+ : m_declarationList(0)
+{
+}
+
+void LinkageBodyAST::addDeclaration(DeclarationAST *ast)
+{
+ if(!ast)
+ return;
+
+ ast->setParent(this);
+ m_declarationList = snoc(m_declarationList, ast, _pool);
+}
+
+// ------------------------------------------------------------------------
+LinkageSpecificationAST::LinkageSpecificationAST()
+ : m_externType(0),
+ m_linkageBody(0),
+ m_declaration(0)
+{
+}
+
+void LinkageSpecificationAST::setExternType(AST *externType)
+{
+ m_externType = externType;
+ if (m_externType) m_externType->setParent(this);
+}
+
+void LinkageSpecificationAST::setLinkageBody(LinkageBodyAST *linkageBody)
+{
+ m_linkageBody = linkageBody;
+ if (m_linkageBody) m_linkageBody->setParent(this);
+}
+
+void LinkageSpecificationAST::setDeclaration(DeclarationAST *decl)
+{
+ m_declaration = decl;
+ if (m_declaration) m_declaration->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+TranslationUnitAST::TranslationUnitAST()
+ : m_declarationList(0)
+{
+ //kdDebug(9007) << "++ TranslationUnitAST::TranslationUnitAST()" << endl;
+}
+
+void TranslationUnitAST::addDeclaration(DeclarationAST *ast)
+{
+ if(!ast)
+ return;
+
+ ast->setParent(this);
+ m_declarationList = snoc(m_declarationList, ast, _pool);
+}
+
+// ------------------------------------------------------------------------
+NamespaceAST::NamespaceAST()
+ : m_namespaceName(0),
+ m_linkageBody(0)
+{
+}
+
+void NamespaceAST::setNamespaceName(AST *namespaceName)
+{
+ m_namespaceName = namespaceName;
+ if (m_namespaceName) m_namespaceName->setParent(this);
+}
+
+void NamespaceAST::setLinkageBody(LinkageBodyAST *linkageBody)
+{
+ m_linkageBody = linkageBody;
+ if (m_linkageBody) m_linkageBody->setParent(this);
+}
+
+
+// ------------------------------------------------------------------------
+NamespaceAliasAST::NamespaceAliasAST()
+ : m_namespaceName(0),
+ m_aliasName(0)
+{
+}
+
+void NamespaceAliasAST::setNamespaceName(AST *namespaceName)
+{
+ m_namespaceName = namespaceName;
+ if (m_namespaceName) m_namespaceName->setParent(this);
+}
+
+void NamespaceAliasAST::setAliasName(NameAST *name)
+{
+ m_aliasName = name;
+ if (m_aliasName) m_aliasName->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+UsingAST::UsingAST()
+ : m_typeName(0),
+ m_name(0)
+{
+}
+
+void UsingAST::setTypeName(AST *typeName)
+{
+ m_typeName = typeName;
+ if (m_typeName) m_typeName->setParent(this);
+}
+
+void UsingAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+UsingDirectiveAST::UsingDirectiveAST()
+ : m_name(0)
+{
+}
+
+void UsingDirectiveAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+TypedefAST::TypedefAST()
+ : m_typeSpec(0),
+ m_initDeclaratorList(0)
+{
+}
+
+void TypeSpecifierAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+void TypedefAST::setTypeSpec(TypeSpecifierAST *typeSpec)
+{
+ m_typeSpec = typeSpec;
+ if (m_typeSpec) m_typeSpec->setParent(this);
+}
+
+void TypedefAST::setInitDeclaratorList(InitDeclaratorListAST *initDeclaratorList)
+{
+ m_initDeclaratorList = initDeclaratorList;
+ if (m_initDeclaratorList) m_initDeclaratorList->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+TemplateArgumentListAST::TemplateArgumentListAST()
+ : m_argumentList(0)
+{
+}
+
+void TemplateArgumentListAST::addArgument(AST *arg)
+{
+ if(!arg)
+ return;
+
+ arg->setParent(this);
+ m_argumentList = snoc(m_argumentList, arg, _pool);
+}
+
+// ------------------------------------------------------------------------
+TemplateDeclarationAST::TemplateDeclarationAST()
+ : m_exported(0),
+ m_templateParameterList(0),
+ m_declaration(0)
+{
+}
+
+void TemplateDeclarationAST::setExported(AST *exported)
+{
+ m_exported = exported;
+ if (m_exported) m_exported->setParent(this);
+}
+
+void TemplateDeclarationAST::setTemplateParameterList(TemplateParameterListAST *templateParameterList)
+{
+ m_templateParameterList = templateParameterList;
+ if (m_templateParameterList) m_templateParameterList->setParent(this);
+}
+
+void TemplateDeclarationAST::setDeclaration(DeclarationAST *declaration)
+{
+ m_declaration = declaration;
+ if (m_declaration) m_declaration->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+ClassOrNamespaceNameAST::ClassOrNamespaceNameAST()
+ : m_name(0), m_templateArgumentList(0)
+{
+}
+
+void ClassOrNamespaceNameAST::setName(AST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+void ClassOrNamespaceNameAST::setTemplateArgumentList(TemplateArgumentListAST *templateArgumentList)
+{
+ m_templateArgumentList = templateArgumentList;
+ if (m_templateArgumentList) m_templateArgumentList->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+TypeSpecifierAST::TypeSpecifierAST()
+ : m_name(0), m_cvQualify(0), m_cv2Qualify(0)
+
+{
+}
+
+void TypeSpecifierAST::setCvQualify(AST *cvQualify)
+{
+ m_cvQualify = cvQualify;
+ if (m_cvQualify) m_cvQualify->setParent(this);
+}
+
+void TypeSpecifierAST::setCv2Qualify(AST *cv2Qualify)
+{
+ m_cv2Qualify = cv2Qualify;
+ if (m_cv2Qualify) m_cv2Qualify->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+ClassSpecifierAST::ClassSpecifierAST()
+ : m_winDeclSpec(0),
+ m_classKey(0),
+ m_baseClause(0),
+ m_declarationList(0)
+{
+}
+
+void ClassSpecifierAST::setClassKey(AST *classKey)
+{
+ m_classKey = classKey;
+ if (m_classKey) m_classKey->setParent(this);
+}
+
+void ClassSpecifierAST::addDeclaration(DeclarationAST *declaration)
+{
+ if(!declaration)
+ return;
+
+ declaration->setParent(this);
+ m_declarationList = snoc(m_declarationList, declaration, _pool);
+}
+
+void ClassSpecifierAST::setBaseClause(BaseClauseAST *baseClause)
+{
+ m_baseClause = baseClause;
+ if (m_baseClause) m_baseClause->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+EnumSpecifierAST::EnumSpecifierAST()
+ : m_enumeratorList(0)
+{
+}
+
+void EnumSpecifierAST::addEnumerator(EnumeratorAST *enumerator)
+{
+ if(!enumerator)
+ return;
+
+ enumerator->setParent(this);
+ m_enumeratorList = snoc(m_enumeratorList, enumerator, _pool);
+}
+
+
+// ------------------------------------------------------------------------
+ElaboratedTypeSpecifierAST::ElaboratedTypeSpecifierAST()
+ : m_kind(0)
+{
+}
+
+void ElaboratedTypeSpecifierAST::setKind(AST *kind)
+{
+ m_kind = kind;
+ if (m_kind) m_kind->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+EnumeratorAST::EnumeratorAST()
+ : m_id(0),
+ m_expression(0)
+{
+}
+
+void EnumeratorAST::setId(AST *id)
+{
+ m_id = id;
+ if (m_id) m_id->setParent(this);
+}
+
+void EnumeratorAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+BaseClauseAST::BaseClauseAST()
+ : m_baseSpecifierList(0)
+{
+}
+
+void BaseClauseAST::addBaseSpecifier(BaseSpecifierAST *baseSpecifier)
+{
+ if(!baseSpecifier)
+ return;
+
+ baseSpecifier->setParent(this);
+ m_baseSpecifierList = snoc(m_baseSpecifierList, baseSpecifier, _pool);
+}
+
+// ------------------------------------------------------------------------
+BaseSpecifierAST::BaseSpecifierAST()
+ : m_isVirtual(0), m_access(0), m_name(0)
+
+{
+}
+
+void BaseSpecifierAST::setIsVirtual(AST *isVirtual)
+{
+ m_isVirtual = isVirtual;
+ if (m_isVirtual) m_isVirtual->setParent(this);
+}
+
+void BaseSpecifierAST::setAccess(AST *access)
+{
+ m_access = access;
+ if (m_access) m_access->setParent(this);
+}
+
+void BaseSpecifierAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+SimpleDeclarationAST::SimpleDeclarationAST()
+ : m_functionSpecifier(0),
+ m_storageSpecifier(0),
+ m_typeSpec(0),
+ m_initDeclaratorList(0),
+ m_winDeclSpec(0)
+{
+}
+
+void SimpleDeclarationAST::setFunctionSpecifier(AST *functionSpecifier)
+{
+ m_functionSpecifier = functionSpecifier;
+ if (m_functionSpecifier) m_functionSpecifier->setParent(this);
+}
+
+void SimpleDeclarationAST::setStorageSpecifier(AST *storageSpecifier)
+{
+ m_storageSpecifier = storageSpecifier;
+ if (m_storageSpecifier) m_storageSpecifier->setParent(this);
+}
+
+void SimpleDeclarationAST::setTypeSpec(TypeSpecifierAST *typeSpec)
+{
+ m_typeSpec = typeSpec;
+ if (m_typeSpec) m_typeSpec->setParent(this);
+}
+
+void SimpleDeclarationAST::setInitDeclaratorList(InitDeclaratorListAST *initDeclaratorList)
+{
+ m_initDeclaratorList = initDeclaratorList;
+ if (m_initDeclaratorList) m_initDeclaratorList->setParent(this);
+}
+
+void SimpleDeclarationAST::setWinDeclSpec(AST *winDeclSpec)
+{
+ m_winDeclSpec = winDeclSpec;
+ if (m_winDeclSpec) m_winDeclSpec->setParent(this);
+}
+
+// ------------------------------------------------------------------------
+InitDeclaratorListAST::InitDeclaratorListAST()
+ : m_initDeclaratorList(0)
+{
+}
+
+void InitDeclaratorListAST::addInitDeclarator(InitDeclaratorAST *decl)
+{
+ if(!decl)
+ return;
+
+ decl->setParent(this);
+ m_initDeclaratorList = snoc(m_initDeclaratorList, decl, _pool);
+}
+
+// ------------------------------------------------------------------------
+DeclaratorAST::DeclaratorAST()
+ : m_ptrOpList(0),
+ m_subDeclarator(0),
+ m_declaratorId(0),
+ m_bitfieldInitialization(0),
+ m_arrayDimensionList(0),
+ m_parameterDeclarationClause(0),
+ m_constant(0),
+ m_exceptionSpecification(0)
+{
+}
+
+void DeclaratorAST::setSubDeclarator(DeclaratorAST *subDeclarator)
+{
+ m_subDeclarator = subDeclarator;
+ if (m_subDeclarator) m_subDeclarator->setParent(this);
+}
+
+void DeclaratorAST::setDeclaratorId(NameAST *declaratorId)
+{
+ m_declaratorId = declaratorId;
+ if (m_declaratorId) m_declaratorId->setParent(this);
+}
+
+void DeclaratorAST::setBitfieldInitialization(AST *bitfieldInitialization)
+{
+ m_bitfieldInitialization = bitfieldInitialization;
+ if (m_bitfieldInitialization) m_bitfieldInitialization->setParent(this);
+}
+
+void DeclaratorAST::addArrayDimension(AST *arrayDimension)
+{
+ if(!arrayDimension)
+ return;
+
+ arrayDimension->setParent(this);
+ m_arrayDimensionList = snoc(m_arrayDimensionList, arrayDimension, _pool);
+}
+
+void DeclaratorAST::setParameterDeclarationClause(ParameterDeclarationClauseAST *parameterDeclarationClause)
+{
+ m_parameterDeclarationClause = parameterDeclarationClause;
+ if (m_parameterDeclarationClause) m_parameterDeclarationClause->setParent(this);
+}
+
+void DeclaratorAST::setConstant(AST *constant)
+{
+ m_constant = constant;
+ if (m_constant) m_constant->setParent(this);
+}
+
+void DeclaratorAST::setExceptionSpecification(AST *exceptionSpecification)
+{
+ m_exceptionSpecification = exceptionSpecification;
+ if (m_exceptionSpecification) m_exceptionSpecification->setParent(this);
+}
+
+void DeclaratorAST::addPtrOp(AST *ptrOp)
+{
+ if(!ptrOp)
+ return;
+
+ ptrOp->setParent(this);
+ m_ptrOpList = snoc(m_ptrOpList, ptrOp, _pool);
+}
+
+// --------------------------------------------------------------------------
+InitDeclaratorAST::InitDeclaratorAST()
+ : m_declarator(0),
+ m_initializer(0)
+{
+}
+
+void InitDeclaratorAST::setDeclarator(DeclaratorAST *declarator)
+{
+ m_declarator = declarator;
+ if (m_declarator) m_declarator->setParent(this);
+}
+
+void InitDeclaratorAST::setInitializer(AST *initializer)
+{
+ m_initializer = initializer;
+ if (m_initializer) m_initializer->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+FunctionDefinitionAST::FunctionDefinitionAST()
+ : m_functionSpecifier(0),
+ m_storageSpecifier(0),
+ m_typeSpec(0),
+ m_initDeclarator(0),
+ m_functionBody(0),
+ m_winDeclSpec(0)
+{
+}
+
+void FunctionDefinitionAST::setFunctionSpecifier(AST *functionSpecifier)
+{
+ m_functionSpecifier = functionSpecifier;
+ if (m_functionSpecifier) m_functionSpecifier->setParent(this);
+}
+
+void FunctionDefinitionAST::setStorageSpecifier(AST *storageSpecifier)
+{
+ m_storageSpecifier = storageSpecifier;
+ if (m_storageSpecifier) m_storageSpecifier->setParent(this);
+}
+
+void FunctionDefinitionAST::setTypeSpec(TypeSpecifierAST *typeSpec)
+{
+ m_typeSpec = typeSpec;
+ if (m_typeSpec) m_typeSpec->setParent(this);
+}
+
+void FunctionDefinitionAST::setInitDeclarator(InitDeclaratorAST *initDeclarator)
+{
+ m_initDeclarator = initDeclarator;
+ if (m_initDeclarator) m_initDeclarator->setParent(this);
+}
+
+void FunctionDefinitionAST::setFunctionBody(StatementListAST *functionBody)
+{
+ m_functionBody = functionBody;
+ if (m_functionBody) m_functionBody->setParent(this);
+}
+
+void FunctionDefinitionAST::setWinDeclSpec(AST *winDeclSpec)
+{
+ m_winDeclSpec = winDeclSpec;
+ if (m_winDeclSpec) m_winDeclSpec->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+StatementListAST::StatementListAST()
+ : m_statementList(0)
+{
+}
+
+void StatementListAST::addStatement(StatementAST *statement)
+{
+ if(!statement)
+ return;
+
+ statement->setParent(this);
+ m_statementList = snoc(m_statementList, statement, _pool);
+}
+
+// --------------------------------------------------------------------------
+IfStatementAST::IfStatementAST()
+ : m_condition(0),
+ m_statement(0),
+ m_elseStatement(0)
+{
+}
+
+void IfStatementAST::setCondition(ConditionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition) m_condition->setParent(this);
+}
+
+void IfStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+void IfStatementAST::setElseStatement(StatementAST *elseStatement)
+{
+ m_elseStatement = elseStatement;
+ if (m_elseStatement) m_elseStatement->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+WhileStatementAST::WhileStatementAST()
+ : m_condition(0),
+ m_statement(0)
+{
+}
+
+void WhileStatementAST::setCondition(ConditionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition) m_condition->setParent(this);
+}
+
+void WhileStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+DoStatementAST::DoStatementAST()
+ : m_condition(0),
+ m_statement(0)
+{
+}
+
+void DoStatementAST::setCondition(ConditionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition) m_condition->setParent(this);
+}
+
+void DoStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ForStatementAST::ForStatementAST()
+ : m_condition(0),
+ m_initStatement(0),
+ m_statement(0),
+ m_expression(0)
+{
+}
+
+void ForStatementAST::setCondition(ConditionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition) m_condition->setParent(this);
+}
+
+void ForStatementAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+void ForStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+void ForStatementAST::setInitStatement(StatementAST *initStatement)
+{
+ m_initStatement = initStatement;
+ if (m_initStatement) m_initStatement->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+SwitchStatementAST::SwitchStatementAST()
+ : m_condition(0),
+ m_statement(0)
+{
+}
+
+void SwitchStatementAST::setCondition(ConditionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition) m_condition->setParent(this);
+}
+
+void SwitchStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+DeclarationStatementAST::DeclarationStatementAST()
+ : m_declaration(0)
+{
+}
+
+void DeclarationStatementAST::setDeclaration(DeclarationAST *declaration)
+{
+ m_declaration = declaration;
+ if (m_declaration) m_declaration->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+LabeledStatementAST::LabeledStatementAST()
+ : m_statement(0), m_expression(0)
+{
+}
+
+void LabeledStatementAST::setStatement(StatementAST *statement)
+{
+ m_statement = statement;
+ if (m_statement) m_statement->setParent(this);
+}
+
+void LabeledStatementAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ExpressionStatementAST::ExpressionStatementAST()
+ : m_expression(0)
+{
+}
+
+void ExpressionStatementAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+
+// --------------------------------------------------------------------------
+ParameterDeclarationAST::ParameterDeclarationAST()
+ : m_typeSpec(0),
+ m_declarator(0),
+ m_expression(0)
+{
+}
+
+void ParameterDeclarationAST::setTypeSpec(TypeSpecifierAST *typeSpec)
+{
+ m_typeSpec = typeSpec;
+ if (m_typeSpec) m_typeSpec->setParent(this);
+}
+
+void ParameterDeclarationAST::setDeclarator(DeclaratorAST *declarator)
+{
+ m_declarator = declarator;
+ if (m_declarator) m_declarator->setParent(this);
+}
+
+void ParameterDeclarationAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ParameterDeclarationListAST::ParameterDeclarationListAST()
+ : m_parameterList(0)
+{
+}
+
+void ParameterDeclarationListAST::addParameter(ParameterDeclarationAST *parameter)
+{
+ if(!parameter)
+ return;
+
+ parameter->setParent(this);
+ m_parameterList = snoc(m_parameterList, parameter, _pool);
+}
+
+// --------------------------------------------------------------------------
+ParameterDeclarationClauseAST::ParameterDeclarationClauseAST()
+ : m_parameterDeclarationList(0),
+ m_ellipsis(0)
+{
+}
+
+void ParameterDeclarationClauseAST::setParameterDeclarationList(ParameterDeclarationListAST *parameterDeclarationList)
+{
+ m_parameterDeclarationList = parameterDeclarationList;
+ if (m_parameterDeclarationList) m_parameterDeclarationList->setParent(this);
+}
+
+void ParameterDeclarationClauseAST::setEllipsis(AST *ellipsis)
+{
+ m_ellipsis = ellipsis;
+ if (m_ellipsis) m_ellipsis->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+AccessDeclarationAST::AccessDeclarationAST()
+ : m_accessList(0)
+{
+}
+
+void AccessDeclarationAST::addAccess(AST *access)
+{
+ if(!access)
+ return;
+
+ access->setParent(this);
+ m_accessList = snoc(m_accessList, access, _pool);
+}
+
+// --------------------------------------------------------------------------
+TypeParameterAST::TypeParameterAST()
+ : m_kind(0), m_templateParameterList(0),
+ m_name(0), m_typeId(0)
+
+{
+}
+
+void TypeParameterAST::setKind(AST *kind)
+{
+ m_kind = kind;
+}
+
+void TypeParameterAST::setTemplateParameterList(TemplateParameterListAST *templateParameterList)
+{
+ m_templateParameterList = templateParameterList;
+ if (m_templateParameterList) m_templateParameterList->setParent(this);
+}
+
+void TypeParameterAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name) m_name->setParent(this);
+}
+
+void TypeParameterAST::setTypeId(AST *typeId)
+{
+ m_typeId = typeId;
+ if (m_typeId) m_typeId->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+TemplateParameterAST::TemplateParameterAST()
+ : m_typeParameter(0),
+ m_typeValueParameter(0)
+{
+}
+
+void TemplateParameterAST::setTypeParameter(TypeParameterAST *typeParameter)
+{
+ m_typeParameter = typeParameter;
+ if (m_typeParameter) m_typeParameter->setParent(this);
+}
+
+void TemplateParameterAST::setTypeValueParameter(ParameterDeclarationAST *typeValueParameter)
+{
+ m_typeValueParameter = typeValueParameter;
+ if (m_typeValueParameter) m_typeValueParameter->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+TemplateParameterListAST::TemplateParameterListAST()
+ : m_templateParameterList(0)
+{
+}
+
+void TemplateParameterListAST::addTemplateParameter(TemplateParameterAST *templateParameter)
+{
+ if(!templateParameter)
+ return;
+
+ templateParameter->setParent(this);
+ m_templateParameterList = snoc(m_templateParameterList, templateParameter, _pool);
+}
+
+// --------------------------------------------------------------------------
+ConditionAST::ConditionAST()
+ : m_typeSpec(0),
+ m_declarator(0),
+ m_expression(0)
+{
+}
+
+void ConditionAST::setTypeSpec(TypeSpecifierAST *typeSpec)
+{
+ m_typeSpec = typeSpec;
+ if (m_typeSpec) m_typeSpec->setParent(this);
+}
+
+void ConditionAST::setDeclarator(DeclaratorAST *declarator)
+{
+ m_declarator = declarator;
+ if (m_declarator) m_declarator->setParent(this);
+}
+
+void ConditionAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+void ClassSpecifierAST::setWinDeclSpec(AST *winDeclSpec)
+{
+ m_winDeclSpec = winDeclSpec;
+ if (m_winDeclSpec) m_winDeclSpec->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ReturnStatementAST::ReturnStatementAST()
+ : m_expression(0)
+{
+}
+
+void ReturnStatementAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression) m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+BinaryExpressionAST::BinaryExpressionAST()
+ : m_op(0), m_left(0), m_right(0)
+{
+}
+
+void BinaryExpressionAST::setOp(AST *op)
+{
+ m_op = op;
+ if (m_op)
+ m_op->setParent(this);
+}
+
+void BinaryExpressionAST::setLeftExpression(AbstractExpressionAST *left)
+{
+ m_left = left;
+ if (m_left)
+ m_left->setParent(this);
+}
+
+void BinaryExpressionAST::setRightExpression(AbstractExpressionAST *right)
+{
+ m_right = right;
+ if (m_right)
+ m_right->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ConditionalExpressionAST::ConditionalExpressionAST()
+ : m_condition(0), m_left(0), m_right(0)
+{
+}
+
+void ConditionalExpressionAST::setCondition(AbstractExpressionAST *condition)
+{
+ m_condition = condition;
+ if (m_condition)
+ m_condition->setParent(this);
+}
+
+void ConditionalExpressionAST::setLeftExpression(AbstractExpressionAST *left)
+{
+ m_left = left;
+ if (m_left)
+ m_left->setParent(this);
+}
+
+void ConditionalExpressionAST::setRightExpression(AbstractExpressionAST *right)
+{
+ m_right = right;
+ if (m_right)
+ m_right->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+CppCastExpressionAST::CppCastExpressionAST()
+ : m_castOp(0), m_typeId(0), m_expression(0)
+{
+}
+
+void CppCastExpressionAST::setCastOp(AST *castOp)
+{
+ m_castOp = castOp;
+ if (m_castOp)
+ m_castOp->setParent(this);
+}
+
+void CppCastExpressionAST::setTypeId(AST *typeId)
+{
+ m_typeId = typeId;
+ if (m_typeId)
+ m_typeId->setParent(this);
+}
+
+void CppCastExpressionAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression)
+ m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+SubscriptingAST::SubscriptingAST()
+ : m_expression(0), m_subscript(0)
+{
+}
+
+void SubscriptingAST::setSubscript(AbstractExpressionAST *subscript)
+{
+ m_subscript = subscript;
+ if (m_subscript)
+ m_subscript->setParent(this);
+}
+
+void SubscriptingAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression)
+ m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+FunctionCallAST::FunctionCallAST()
+ : m_expression(0), m_arguments(0)
+{
+}
+
+void FunctionCallAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression)
+ m_expression->setParent(this);
+}
+
+void FunctionCallAST::setArguments(AbstractExpressionAST *arguments)
+{
+ m_arguments = arguments;
+ if (m_arguments)
+ m_arguments->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+ExplicitTypeConversionAST::ExplicitTypeConversionAST()
+{
+}
+
+// --------------------------------------------------------------------------
+PseudoDestructorCallAST::PseudoDestructorCallAST()
+{
+}
+
+// --------------------------------------------------------------------------
+ClassMemberAccessAST::ClassMemberAccessAST()
+ : m_op(0), m_expression(0), m_templ(0), m_name(0)
+{
+}
+
+void ClassMemberAccessAST::setOp(AST *op)
+{
+ m_op = op;
+ if (m_op)
+ m_op->setParent(this);
+}
+
+void ClassMemberAccessAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression)
+ m_expression->setParent(this);
+}
+
+void ClassMemberAccessAST::setName(NameAST *name)
+{
+ m_name = name;
+ if (m_name)
+ m_name->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+IncrDecrAST::IncrDecrAST()
+ : m_op(0), m_expression(0)
+{
+}
+
+void IncrDecrAST::setOp(AST *op)
+{
+ m_op = op;
+ if (m_op)
+ m_op->setParent(this);
+}
+
+void IncrDecrAST::setExpression(AbstractExpressionAST *expression)
+{
+ m_expression = expression;
+ if (m_expression)
+ m_expression->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+TypeIdentificationAST::TypeIdentificationAST()
+{
+}
+
+// --------------------------------------------------------------------------
+TypeIdAST::TypeIdAST()
+ : m_typeSpecifier(0), m_declarator(0)
+{
+}
+
+void TypeIdAST::setTypeSpecifier(TypeSpecifierAST *typeSpecifier)
+{
+ m_typeSpecifier = typeSpecifier;
+ if (m_typeSpecifier)
+ m_typeSpecifier->setParent(this);
+}
+
+void TypeIdAST::setDeclarator(DeclaratorAST *declarator)
+{
+ m_declarator = declarator;
+ if (m_declarator)
+ m_declarator->setParent(this);
+}
+
+// --------------------------------------------------------------------------
+AbstractExpressionAST::AbstractExpressionAST()
+{
+ m_symbol = 0;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/ast.h b/tools/porting/src/ast.h
new file mode 100644
index 0000000..7daa680
--- /dev/null
+++ b/tools/porting/src/ast.h
@@ -0,0 +1,1598 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AST_H
+#define AST_H
+
+#include "smallobject.h"
+#include "list.h"
+
+QT_BEGIN_NAMESPACE
+
+class AST;
+class NameAST;
+class TypeIdAST;
+class TypeSpecifierAST;
+class DeclaratorAST;
+
+class Symbol;
+class Scope;
+
+enum NodeType
+{
+ NodeType_Generic = 0,
+
+ NodeType_TemplateArgumentList = 1000,
+ NodeType_ClassOrNamespaceName,
+ NodeType_Name,
+ NodeType_Declaration,
+ NodeType_TypeSpecifier,
+ NodeType_BaseSpecifier,
+ NodeType_BaseClause,
+ NodeType_ClassSpecifier,
+ NodeType_Enumerator,
+ NodeType_EnumSpecifier,
+ NodeType_ElaboratedTypeSpecifier,
+ NodeType_LinkageBody,
+ NodeType_LinkageSpecification,
+ NodeType_Namespace,
+ NodeType_NamespaceAlias,
+ NodeType_Using,
+ NodeType_UsingDirective,
+ NodeType_InitDeclaratorList,
+ NodeType_Typedef,
+ NodeType_Declarator,
+ NodeType_InitDeclarator,
+ NodeType_TemplateDeclaration,
+ NodeType_SimpleDeclaration,
+ NodeType_Statement,
+ NodeType_StatementList,
+ NodeType_IfStatement,
+ NodeType_WhileStatement,
+ NodeType_DoStatement,
+ NodeType_ForStatement,
+ NodeType_SwitchStatement,
+ NodeType_DeclarationStatement,
+ NodeType_LabeledStatement,
+ NodeType_ReturnStatement,
+ NodeType_TranslationUnit,
+ NodeType_FunctionDefinition,
+ NodeType_ExpressionStatement,
+ NodeType_ParameterDeclaration,
+ NodeType_ParameterDeclarationList,
+ NodeType_ParameterDeclarationClause,
+ NodeType_AccessDeclaration,
+ NodeType_TypeParameter,
+ NodeType_TemplateParameter,
+ NodeType_TemplateParameterList,
+ NodeType_Condition,
+
+ NodeType_TypeId,
+
+ NodeType_Expression = 2000,
+ NodeType_BinaryExpression,
+ NodeType_PrimaryExpression,
+
+//
+// postfix expression
+//
+ NodeType_PostfixExpression,
+ NodeType_Subscripting,
+ NodeType_FunctionCall,
+ NodeType_ExplicitTypeConversion,
+ NodeType_PseudoConstructorCall,
+ NodeType_ClassMemberAccess,
+ NodeType_IncrDecr,
+ NodeType_CppCastExpression,
+ NodeType_TypeIdentification,
+
+ NodeType_UnaryExpression,
+ NodeType_NewExpression,
+ NodeType_NewTypeId,
+ NodeType_NewDeclarator,
+ NodeType_NewInitializer,
+ NodeType_DeleteExpression,
+ NodeType_CastExpression,
+ NodeType_ConditionalExpression,
+ NodeType_ThrowExpression,
+
+ NodeType_Custom = 3000
+};
+
+
+template <typename T>
+inline int length(List<T> *e)
+{
+ return e ? e->size() : 0;
+}
+
+class AST
+{
+public:
+ enum { Type=NodeType_Generic };
+
+ pool *_pool;
+
+ static int N;
+
+public:
+ AST(int startToken=0, int count=1);
+ virtual ~AST() { --N; }
+
+ inline int startToken() const
+ { return m_startToken; }
+
+ inline int endToken() const
+ { return m_endToken; }
+
+ inline void setPosition(int startToken, int endToken)
+ {
+ m_startToken = startToken;
+ m_endToken = endToken;
+ }
+
+ inline int nodeType() const
+ { return m_nodeType; }
+
+ inline void setNodeType(int nodeType)
+ { m_nodeType = nodeType; }
+
+ inline AST *parent() const
+ { return m_parent; }
+
+ void setParent(AST *parent);
+
+ inline List<AST *> *children() const
+ { return m_children; }
+
+ void appendChild(AST *child);
+ void removeChild(AST *child);
+
+// ### move
+ inline Scope *scope() const
+ {
+ if (m_scope)
+ return m_scope;
+
+ return m_parent ? m_parent->scope() : 0;
+ }
+
+ inline void setScope(Scope *scope)
+ { m_scope = scope; }
+
+private:
+ Scope *m_scope;
+ int m_nodeType;
+ int m_startToken;
+ int m_endToken;
+ AST *m_parent;
+ List<AST *> *m_children;
+
+private:
+ AST(const AST &source);
+ void operator = (const AST &source);
+};
+
+class AbstractExpressionAST: public AST
+{
+public:
+ enum { Type = NodeType_Expression };
+
+ AbstractExpressionAST();
+
+ inline Symbol *symbol() const
+ { return m_symbol; }
+
+ inline void setSymbol(Symbol *symbol)
+ { m_symbol = symbol; }
+
+private:
+ Symbol *m_symbol;
+};
+
+// ### remove me
+template <int kind, class Base = AbstractExpressionAST>
+class ExpressionAST: public Base
+{
+public:
+ enum { Type = kind };
+
+public:
+ inline ExpressionAST() {}
+
+private:
+ ExpressionAST(const ExpressionAST &source);
+ void operator = (const ExpressionAST &source);
+};
+
+class BinaryExpressionAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_BinaryExpression };
+
+public:
+ BinaryExpressionAST();
+
+ inline AST *op() const
+ { return m_op; }
+
+ inline AbstractExpressionAST *leftExpression() const
+ { return m_left; }
+
+ inline AbstractExpressionAST *rightExpression() const
+ { return m_right; }
+
+ void setOp(AST *op);
+ void setLeftExpression(AbstractExpressionAST *left);
+ void setRightExpression(AbstractExpressionAST *right);
+
+private:
+ AST *m_op;
+ AbstractExpressionAST *m_left;
+ AbstractExpressionAST *m_right;
+
+private:
+ BinaryExpressionAST(const BinaryExpressionAST &source);
+ void operator = (const BinaryExpressionAST &source);
+};
+
+class ConditionalExpressionAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_ConditionalExpression };
+
+public:
+ ConditionalExpressionAST();
+
+ inline AbstractExpressionAST *condition() const
+ { return m_condition; }
+
+ inline AbstractExpressionAST *leftExpression() const
+ { return m_left; }
+
+ inline AbstractExpressionAST *rightExpression() const
+ { return m_right; }
+
+ void setCondition(AbstractExpressionAST *condition);
+ void setLeftExpression(AbstractExpressionAST *left);
+ void setRightExpression(AbstractExpressionAST *right);
+
+private:
+ AbstractExpressionAST *m_condition;
+ AbstractExpressionAST *m_left;
+ AbstractExpressionAST *m_right;
+
+private:
+ ConditionalExpressionAST(const ConditionalExpressionAST& source);
+ void operator = (const ConditionalExpressionAST &source);
+};
+
+
+//
+// postfix expression
+//
+
+class SubscriptingAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_Subscripting };
+
+public:
+ SubscriptingAST();
+
+ inline AbstractExpressionAST *expression() const
+ { return m_expression; }
+
+ inline AbstractExpressionAST *subscript() const
+ { return m_subscript; }
+
+ void setExpression(AbstractExpressionAST *expression);
+ void setSubscript(AbstractExpressionAST *subscript);
+
+private:
+ AbstractExpressionAST *m_expression;
+ AbstractExpressionAST *m_subscript;
+
+private:
+ SubscriptingAST(const SubscriptingAST &source);
+ void operator = (const SubscriptingAST &source);
+};
+
+class FunctionCallAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_FunctionCall };
+
+public:
+ FunctionCallAST();
+
+ inline AbstractExpressionAST *expression() const
+ { return m_expression; }
+
+ inline AbstractExpressionAST *arguments() const
+ { return m_arguments; }
+
+ void setExpression(AbstractExpressionAST *expression);
+ void setArguments(AbstractExpressionAST *arguments);
+
+private:
+ AbstractExpressionAST *m_expression;
+ AbstractExpressionAST *m_arguments;
+
+private:
+ FunctionCallAST(const FunctionCallAST &source);
+ void operator = (const FunctionCallAST &source);
+};
+
+class ExplicitTypeConversionAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_ExplicitTypeConversion };
+
+public:
+ ExplicitTypeConversionAST();
+
+private:
+ ExplicitTypeConversionAST(const ExplicitTypeConversionAST &source);
+ void operator = (const ExplicitTypeConversionAST &source);
+};
+
+class PseudoDestructorCallAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_PseudoConstructorCall };
+
+public:
+ PseudoDestructorCallAST();
+
+private:
+ PseudoDestructorCallAST(const PseudoDestructorCallAST &source);
+ void operator = (const PseudoDestructorCallAST &source);
+};
+
+class ClassMemberAccessAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_ClassMemberAccess };
+
+public:
+ ClassMemberAccessAST();
+
+ inline AST *op() const
+ { return m_op; }
+
+ inline AbstractExpressionAST *expression() const
+ { return m_expression; }
+
+ inline NameAST *name() const
+ { return m_name; }
+
+ void setOp(AST *op);
+ void setExpression(AbstractExpressionAST *expression);
+ void setName(NameAST *name);
+
+private:
+ AST *m_op;
+ AbstractExpressionAST *m_expression;
+ AST *m_templ;
+ NameAST *m_name;
+
+private:
+ ClassMemberAccessAST(const ClassMemberAccessAST &source);
+ void operator = (const ClassMemberAccessAST &source);
+};
+
+class IncrDecrAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_IncrDecr };
+
+public:
+ IncrDecrAST();
+
+ inline AST *op() const
+ { return m_op; }
+
+ inline AbstractExpressionAST *expression() const
+ { return m_expression; }
+
+ void setOp(AST *op);
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ AST *m_op;
+ AbstractExpressionAST *m_expression;
+
+private:
+ IncrDecrAST(const IncrDecrAST &source);
+ void operator = (const IncrDecrAST &source);
+};
+
+class CppCastExpressionAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_CppCastExpression };
+
+public:
+ CppCastExpressionAST();
+
+ inline AST *castOp() const
+ { return m_castOp; }
+
+ inline AST *typeId() const
+ { return m_typeId; }
+
+ inline AbstractExpressionAST *expression() const
+ { return m_expression; }
+
+ void setCastOp(AST *castOp);
+ void setTypeId(AST *typeId);
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ AST *m_castOp;
+ AST *m_typeId;
+ AbstractExpressionAST *m_expression;
+
+private:
+ CppCastExpressionAST(const CppCastExpressionAST &source);
+ void operator = (const CppCastExpressionAST &source);
+};
+
+class TypeIdentificationAST: public AbstractExpressionAST
+{
+public:
+ enum { Type = NodeType_TypeIdentification };
+
+public:
+ TypeIdentificationAST();
+
+private:
+ TypeIdentificationAST(const TypeIdentificationAST &source);
+ void operator = (const TypeIdentificationAST &source);
+};
+
+class TypeIdAST: public AST
+{
+public:
+ enum { Type = NodeType_TypeId };
+
+public:
+ TypeIdAST();
+
+ inline TypeSpecifierAST *typeSpecifier() const
+ { return m_typeSpecifier; }
+
+ inline DeclaratorAST *declarator() const
+ { return m_declarator; }
+
+ void setTypeSpecifier(TypeSpecifierAST *typeSpecifier);
+ void setDeclarator(DeclaratorAST *declarator);
+
+private:
+ TypeSpecifierAST *m_typeSpecifier;
+ DeclaratorAST *m_declarator;
+
+private:
+ TypeIdAST(const TypeIdAST &source);
+ void operator = (const TypeIdAST &source);
+};
+
+class StatementAST: public AST
+{
+public:
+ enum { Type = NodeType_Statement };
+};
+
+class TemplateArgumentListAST: public AST
+{
+public:
+ enum { Type = NodeType_TemplateArgumentList };
+
+public:
+ TemplateArgumentListAST();
+
+ void addArgument(AST *arg);
+ inline List<AST *> *argumentList() const { return m_argumentList; }
+
+private:
+ List<AST *> *m_argumentList;
+
+private:
+ TemplateArgumentListAST(const TemplateArgumentListAST &source);
+ void operator = (const TemplateArgumentListAST &source);
+};
+
+class ClassOrNamespaceNameAST: public AST
+{
+public:
+ enum { Type = NodeType_ClassOrNamespaceName };
+
+public:
+ ClassOrNamespaceNameAST();
+
+ inline AST *name() const { return m_name; }
+ void setName(AST *name);
+
+ inline TemplateArgumentListAST *templateArgumentList() const { return m_templateArgumentList; }
+ void setTemplateArgumentList(TemplateArgumentListAST *templateArgumentList);
+
+private:
+ AST* m_name;
+ TemplateArgumentListAST* m_templateArgumentList;
+
+private:
+ ClassOrNamespaceNameAST(const ClassOrNamespaceNameAST &source);
+ void operator = (const ClassOrNamespaceNameAST &source);
+};
+
+class NameAST: public AST
+{
+public:
+ enum { Type = NodeType_Name };
+
+public:
+ NameAST();
+
+ inline bool isGlobal() const { return m_global; }
+ void setGlobal(bool b);
+
+ void addClassOrNamespaceName(ClassOrNamespaceNameAST *classOrNamespaceName);
+ inline List<ClassOrNamespaceNameAST *> *classOrNamespaceNameList() const { return m_classOrNamespaceNameList; }
+
+ inline ClassOrNamespaceNameAST *unqualifiedName() const { return m_unqualifiedName; }
+ void setUnqualifiedName(ClassOrNamespaceNameAST *unqualifiedName);
+
+private:
+ bool m_global;
+ ClassOrNamespaceNameAST* m_unqualifiedName;
+ List<ClassOrNamespaceNameAST *> *m_classOrNamespaceNameList;
+
+private:
+ NameAST(const NameAST &source);
+ void operator = (const NameAST &source);
+};
+
+class TypeParameterAST: public AST
+{
+public:
+ enum { Type = NodeType_TypeParameter };
+
+public:
+ TypeParameterAST();
+
+ inline AST *kind() const { return m_kind; }
+ void setKind(AST *kind);
+
+ inline class TemplateParameterListAST *templateParameterList() const { return m_templateParameterList; }
+ void setTemplateParameterList(class TemplateParameterListAST *templateParameterList);
+
+ inline NameAST *name() const { return m_name; }
+ void setName(NameAST *name);
+
+ inline AST *typeId() const { return m_typeId; }
+ void setTypeId(AST *typeId);
+
+private:
+ AST* m_kind;
+ class TemplateParameterListAST *m_templateParameterList;
+ NameAST* m_name;
+ AST* m_typeId;
+
+private:
+ TypeParameterAST(const TypeParameterAST &source);
+ void operator = (const TypeParameterAST &source);
+};
+
+class DeclarationAST: public AST
+{
+public:
+ enum { Type = NodeType_Declaration };
+
+public:
+ DeclarationAST();
+
+private:
+ DeclarationAST(const DeclarationAST &source);
+ void operator = (const DeclarationAST &source);
+};
+
+class AccessDeclarationAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_AccessDeclaration };
+
+public:
+ AccessDeclarationAST();
+
+ inline List<AST *> *accessList() const { return m_accessList; }
+ void addAccess(AST *access);
+
+private:
+ List<AST *> *m_accessList;
+
+private:
+ AccessDeclarationAST(const AccessDeclarationAST &source);
+ void operator = (const AccessDeclarationAST &source);
+};
+
+class TypeSpecifierAST: public AST
+{
+public:
+ enum { Type = NodeType_TypeSpecifier };
+
+public:
+ TypeSpecifierAST();
+
+ inline virtual NameAST *name() const { return m_name; }
+ virtual void setName(NameAST *name);
+
+ inline AST *cvQualify() const { return m_cvQualify; }
+ void setCvQualify(AST *cvQualify);
+
+ inline AST *cv2Qualify() const { return m_cv2Qualify; }
+ void setCv2Qualify(AST *cv2Qualify);
+
+private:
+ NameAST* m_name;
+ AST* m_cvQualify;
+ AST* m_cv2Qualify;
+
+private:
+ TypeSpecifierAST(const TypeSpecifierAST &source);
+ void operator = (const TypeSpecifierAST &source);
+};
+
+class BaseSpecifierAST: public AST
+{
+public:
+ enum { Type = NodeType_BaseSpecifier };
+
+public:
+ BaseSpecifierAST();
+
+ inline AST *isVirtual() const { return m_isVirtual; }
+ void setIsVirtual(AST *isVirtual);
+
+ inline AST *access() const { return m_access; }
+ void setAccess(AST *access);
+
+ inline NameAST *name() const { return m_name; }
+ void setName(NameAST *name);
+
+private:
+ AST* m_isVirtual;
+ AST* m_access;
+ NameAST* m_name;
+
+private:
+ BaseSpecifierAST(const BaseSpecifierAST &source);
+ void operator = (const BaseSpecifierAST &source);
+};
+
+class BaseClauseAST: public AST
+{
+public:
+ enum { Type = NodeType_BaseClause };
+
+public:
+ BaseClauseAST();
+
+ void addBaseSpecifier(BaseSpecifierAST *baseSpecifier);
+ inline List<BaseSpecifierAST *> *baseSpecifierList() const { return m_baseSpecifierList; }
+
+private:
+ List<BaseSpecifierAST *> *m_baseSpecifierList;
+
+private:
+ BaseClauseAST(const BaseClauseAST &source);
+ void operator = (const BaseClauseAST &source);
+};
+
+class ClassSpecifierAST: public TypeSpecifierAST
+{
+public:
+ enum { Type = NodeType_ClassSpecifier };
+
+public:
+ ClassSpecifierAST();
+
+ inline AST *winDeclSpec() const { return m_winDeclSpec; }
+ void setWinDeclSpec(AST *winDeclSpec);
+
+ inline AST *classKey() const { return m_classKey; }
+ void setClassKey(AST *classKey);
+
+ inline BaseClauseAST *baseClause() const { return m_baseClause; }
+ void setBaseClause(BaseClauseAST *baseClause);
+
+ inline List<DeclarationAST *> *declarationList() const { return m_declarationList; }
+ void addDeclaration(DeclarationAST *declaration);
+
+private:
+ AST* m_winDeclSpec;
+ AST* m_classKey;
+ BaseClauseAST* m_baseClause;
+ List<DeclarationAST *> *m_declarationList;
+
+private:
+ ClassSpecifierAST(const ClassSpecifierAST &source);
+ void operator = (const ClassSpecifierAST &source);
+};
+
+class EnumeratorAST: public AST
+{
+public:
+ enum { Type = NodeType_Enumerator };
+
+public:
+ EnumeratorAST();
+
+ inline AST *id() const { return m_id; }
+ void setId(AST *id);
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expr);
+
+private:
+ AST* m_id;
+ AbstractExpressionAST* m_expression;
+
+private:
+ EnumeratorAST(const EnumeratorAST &source);
+ void operator = (const EnumeratorAST &source);
+};
+
+class EnumSpecifierAST: public TypeSpecifierAST
+{
+public:
+ enum { Type = NodeType_EnumSpecifier };
+
+public:
+ EnumSpecifierAST();
+
+ void addEnumerator(EnumeratorAST *enumerator);
+ inline List<EnumeratorAST *> *enumeratorList() const { return m_enumeratorList; }
+
+private:
+ List<EnumeratorAST *> *m_enumeratorList;
+
+private:
+ EnumSpecifierAST(const EnumSpecifierAST &source);
+ void operator = (const EnumSpecifierAST &source);
+};
+
+class ElaboratedTypeSpecifierAST: public TypeSpecifierAST
+{
+public:
+ enum { Type = NodeType_ElaboratedTypeSpecifier };
+
+public:
+ ElaboratedTypeSpecifierAST();
+
+ inline AST *kind() const { return m_kind; }
+ void setKind(AST *kind);
+
+private:
+ AST* m_kind;
+
+private:
+ ElaboratedTypeSpecifierAST(const ElaboratedTypeSpecifierAST &source);
+ void operator = (const ElaboratedTypeSpecifierAST &source);
+};
+
+
+class LinkageBodyAST: public AST
+{
+public:
+ enum { Type = NodeType_LinkageBody };
+
+public:
+ LinkageBodyAST();
+
+ void addDeclaration(DeclarationAST *ast);
+ inline List<DeclarationAST *> *declarationList() const { return m_declarationList; }
+
+private:
+ List<DeclarationAST *> *m_declarationList;
+
+private:
+ LinkageBodyAST(const LinkageBodyAST &source);
+ void operator = (const LinkageBodyAST &source);
+};
+
+class LinkageSpecificationAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_LinkageSpecification };
+
+public:
+ LinkageSpecificationAST();
+
+ inline AST *externType() const { return m_externType; }
+ void setExternType(AST *externType);
+
+ inline LinkageBodyAST *linkageBody() const { return m_linkageBody; }
+ void setLinkageBody(LinkageBodyAST *linkageBody);
+
+ inline DeclarationAST *declaration() const { return m_declaration; }
+ void setDeclaration(DeclarationAST *decl);
+
+private:
+ AST* m_externType;
+ LinkageBodyAST* m_linkageBody;
+ DeclarationAST* m_declaration;
+
+private:
+ LinkageSpecificationAST(const LinkageSpecificationAST &source);
+ void operator = (const LinkageSpecificationAST &source);
+};
+
+class NamespaceAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_Namespace };
+
+public:
+ NamespaceAST();
+
+ inline AST *namespaceName() const { return m_namespaceName; }
+ void setNamespaceName(AST *namespaceName);
+
+ inline LinkageBodyAST *linkageBody() const { return m_linkageBody; }
+ void setLinkageBody(LinkageBodyAST *linkageBody);
+
+private:
+ AST* m_namespaceName;
+ LinkageBodyAST* m_linkageBody;
+
+private:
+ NamespaceAST(const NamespaceAST &source);
+ void operator = (const NamespaceAST &source);
+};
+
+class NamespaceAliasAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_NamespaceAlias };
+
+public:
+ NamespaceAliasAST();
+
+ inline AST *namespaceName() const { return m_namespaceName; }
+ void setNamespaceName(AST *name);
+
+ inline NameAST *aliasName() const { return m_aliasName; }
+ void setAliasName(NameAST *name);
+
+private:
+ AST* m_namespaceName;
+ NameAST* m_aliasName;
+
+private:
+ NamespaceAliasAST(const NamespaceAliasAST &source);
+ void operator = (const NamespaceAliasAST &source);
+};
+
+class UsingAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_Using };
+
+public:
+ UsingAST();
+
+ inline AST *typeName() const { return m_typeName; }
+ void setTypeName(AST *typeName);
+
+ inline NameAST *name() const { return m_name; }
+ void setName(NameAST *name);
+
+private:
+ AST* m_typeName;
+ NameAST* m_name;
+
+private:
+ UsingAST(const UsingAST &source);
+ void operator = (const UsingAST &source);
+};
+
+class UsingDirectiveAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_UsingDirective };
+
+public:
+ UsingDirectiveAST();
+
+ inline NameAST *name() const { return m_name; }
+ void setName(NameAST *name);
+
+private:
+ NameAST* m_name;
+
+private:
+ UsingDirectiveAST(const UsingDirectiveAST &source);
+ void operator = (const UsingDirectiveAST &source);
+};
+
+class DeclaratorAST: public AST
+{
+public:
+ enum { Type = NodeType_Declarator };
+
+public:
+ DeclaratorAST();
+
+ inline List<AST *> *ptrOpList() const { return m_ptrOpList; }
+ void addPtrOp(AST *ptrOp);
+
+ inline DeclaratorAST *subDeclarator() const { return m_subDeclarator; }
+ void setSubDeclarator(DeclaratorAST *subDeclarator);
+
+ inline NameAST *declaratorId() const { return m_declaratorId; }
+ void setDeclaratorId(NameAST *declaratorId);
+
+ inline AST *bitfieldInitialization() const { return m_bitfieldInitialization; }
+ void setBitfieldInitialization(AST *bitfieldInitialization);
+
+ inline List<AST *> *arrayDimensionList() const { return m_arrayDimensionList; }
+ void addArrayDimension(AST *arrayDimension);
+
+ inline class ParameterDeclarationClauseAST *parameterDeclarationClause() const { return m_parameterDeclarationClause; }
+ void setParameterDeclarationClause(class ParameterDeclarationClauseAST *parameterDeclarationClause);
+
+ // ### replace 'constant' with cvQualify
+ inline AST *constant() const { return m_constant; }
+ void setConstant(AST *constant);
+
+ inline AST *exceptionSpecification() const { return m_exceptionSpecification; }
+ void setExceptionSpecification(AST *exceptionSpecification);
+
+private:
+ List<AST *> *m_ptrOpList;
+ DeclaratorAST * m_subDeclarator;
+ NameAST* m_declaratorId;
+ AST* m_bitfieldInitialization;
+ List<AST *> *m_arrayDimensionList;
+ class ParameterDeclarationClauseAST * m_parameterDeclarationClause;
+ AST* m_constant;
+ AST* m_exceptionSpecification;
+
+private:
+ DeclaratorAST(const DeclaratorAST &source);
+ void operator = (const DeclaratorAST &source);
+};
+
+class ParameterDeclarationAST: public AST
+{
+public:
+ enum { Type = NodeType_ParameterDeclaration };
+
+public:
+ ParameterDeclarationAST();
+
+ inline TypeSpecifierAST *typeSpec() const { return m_typeSpec; }
+ void setTypeSpec(TypeSpecifierAST *typeSpec);
+
+ inline DeclaratorAST *declarator() const { return m_declarator; }
+ void setDeclarator(DeclaratorAST *declarator);
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ TypeSpecifierAST* m_typeSpec;
+ DeclaratorAST* m_declarator;
+ AbstractExpressionAST* m_expression;
+
+private:
+ ParameterDeclarationAST(const ParameterDeclarationAST &source);
+ void operator = (const ParameterDeclarationAST &source);
+};
+
+class ParameterDeclarationListAST: public AST
+{
+public:
+ enum { Type = NodeType_ParameterDeclarationList };
+
+public:
+ ParameterDeclarationListAST();
+
+ inline List<ParameterDeclarationAST *> *parameterList() const { return m_parameterList; }
+ void addParameter(ParameterDeclarationAST *parameter);
+
+private:
+ List<ParameterDeclarationAST *> *m_parameterList;
+
+private:
+ ParameterDeclarationListAST(const ParameterDeclarationListAST &source);
+ void operator = (const ParameterDeclarationListAST &source);
+};
+
+class ParameterDeclarationClauseAST: public AST
+{
+public:
+ enum { Type = NodeType_ParameterDeclarationClause };
+
+public:
+ ParameterDeclarationClauseAST();
+
+ inline ParameterDeclarationListAST *parameterDeclarationList() const { return m_parameterDeclarationList; }
+ void setParameterDeclarationList(ParameterDeclarationListAST *parameterDeclarationList);
+
+ inline AST *ellipsis() const { return m_ellipsis; }
+ void setEllipsis(AST *ellipsis);
+
+private:
+ ParameterDeclarationListAST* m_parameterDeclarationList;
+ AST* m_ellipsis;
+
+private:
+ ParameterDeclarationClauseAST(const ParameterDeclarationClauseAST &source);
+ void operator = (const ParameterDeclarationClauseAST &source);
+};
+
+
+class InitDeclaratorAST: public AST
+{
+public:
+ enum { Type = NodeType_InitDeclarator };
+
+public:
+ InitDeclaratorAST();
+
+ inline DeclaratorAST *declarator() const { return m_declarator; }
+ void setDeclarator(DeclaratorAST *declarator);
+
+ inline AST *initializer() const { return m_initializer; }
+ void setInitializer(AST *initializer);
+
+private:
+ DeclaratorAST* m_declarator;
+ AST* m_initializer;
+
+private:
+ InitDeclaratorAST(const InitDeclaratorAST &source);
+ void operator = (const InitDeclaratorAST &source);
+};
+
+class InitDeclaratorListAST: public AST
+{
+public:
+ enum { Type = NodeType_InitDeclaratorList };
+
+public:
+ InitDeclaratorListAST();
+
+ inline List<InitDeclaratorAST *> *initDeclaratorList() const { return m_initDeclaratorList; }
+ void addInitDeclarator(InitDeclaratorAST *decl);
+
+private:
+ List<InitDeclaratorAST *> *m_initDeclaratorList;
+
+private:
+ InitDeclaratorListAST(const InitDeclaratorListAST &source);
+ void operator = (const InitDeclaratorListAST &source);
+};
+
+class TypedefAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_Typedef };
+
+public:
+ TypedefAST();
+
+ inline TypeSpecifierAST *typeSpec() const { return m_typeSpec; }
+ void setTypeSpec(TypeSpecifierAST *typeSpec);
+
+ inline InitDeclaratorListAST *initDeclaratorList() const { return m_initDeclaratorList; }
+ void setInitDeclaratorList(InitDeclaratorListAST *initDeclaratorList);
+
+private:
+ TypeSpecifierAST* m_typeSpec;
+ InitDeclaratorListAST* m_initDeclaratorList;
+
+private:
+ void operator = (const TypedefAST &source);
+};
+
+class TemplateParameterAST: public AST
+{
+public:
+ enum { Type = NodeType_TemplateParameter };
+
+public:
+ TemplateParameterAST();
+
+ inline TypeParameterAST *typeParameter() const { return m_typeParameter; }
+ void setTypeParameter(TypeParameterAST *typeParameter);
+
+ inline ParameterDeclarationAST *typeValueParameter() const { return m_typeValueParameter; }
+ void setTypeValueParameter(ParameterDeclarationAST *typeValueParameter);
+
+private:
+ TypeParameterAST* m_typeParameter;
+ ParameterDeclarationAST* m_typeValueParameter;
+
+private:
+ TemplateParameterAST(const TemplateParameterAST &source);
+ void operator = (const TemplateParameterAST &source);
+};
+
+class TemplateParameterListAST: public AST
+{
+public:
+ enum { Type = NodeType_TemplateParameterList };
+
+public:
+ TemplateParameterListAST();
+
+ inline List<TemplateParameterAST *> *templateParameterList() const { return m_templateParameterList; }
+ void addTemplateParameter(TemplateParameterAST *templateParameter);
+
+private:
+ List<TemplateParameterAST *> *m_templateParameterList;
+
+private:
+ TemplateParameterListAST(const TemplateParameterListAST &source);
+ void operator = (const TemplateParameterListAST &source);
+};
+
+class TemplateDeclarationAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_TemplateDeclaration };
+
+public:
+ TemplateDeclarationAST();
+
+ inline AST *exported() const { return m_exported; }
+ void setExported(AST *exported);
+
+ inline TemplateParameterListAST *templateParameterList() const { return m_templateParameterList; }
+ void setTemplateParameterList(TemplateParameterListAST *templateParameterList);
+
+ inline DeclarationAST *declaration() const { return m_declaration; }
+ void setDeclaration(DeclarationAST *declaration);
+
+private:
+ AST* m_exported;
+ TemplateParameterListAST* m_templateParameterList;
+ DeclarationAST* m_declaration;
+
+private:
+ TemplateDeclarationAST(const TemplateDeclarationAST &source);
+ void operator = (const TemplateDeclarationAST &source);
+};
+
+class SimpleDeclarationAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_SimpleDeclaration };
+
+public:
+ SimpleDeclarationAST();
+
+ inline AST *functionSpecifier() const { return m_functionSpecifier; }
+ void setFunctionSpecifier(AST *functionSpecifier);
+
+ inline AST *storageSpecifier() const { return m_storageSpecifier; }
+ void setStorageSpecifier(AST *storageSpecifier);
+
+ inline TypeSpecifierAST *typeSpec() const { return m_typeSpec; }
+ void setTypeSpec(TypeSpecifierAST *typeSpec);
+
+ inline InitDeclaratorListAST *initDeclaratorList() const { return m_initDeclaratorList; }
+ void setInitDeclaratorList(InitDeclaratorListAST *initDeclaratorList);
+
+ inline AST *winDeclSpec() const { return m_winDeclSpec; }
+ void setWinDeclSpec(AST *winDeclSpec);
+
+private:
+ AST* m_functionSpecifier;
+ AST* m_storageSpecifier;
+ TypeSpecifierAST* m_typeSpec;
+ InitDeclaratorListAST* m_initDeclaratorList;
+ AST* m_winDeclSpec;
+
+private:
+ SimpleDeclarationAST(const SimpleDeclarationAST &source);
+ void operator = (const SimpleDeclarationAST &source);
+};
+
+class ExpressionStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_ExpressionStatement };
+
+public:
+ ExpressionStatementAST();
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ AbstractExpressionAST* m_expression;
+
+private:
+ ExpressionStatementAST(const ExpressionStatementAST &source);
+ void operator = (const ExpressionStatementAST &source);
+};
+
+class ReturnStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_ReturnStatement };
+
+public:
+ ReturnStatementAST();
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ AbstractExpressionAST* m_expression;
+
+private:
+ ReturnStatementAST(const ReturnStatementAST &source);
+ void operator = (const ReturnStatementAST &source);
+};
+
+
+class ConditionAST: public AST
+{
+public:
+ enum { Type = NodeType_Condition };
+
+public:
+ ConditionAST();
+
+ inline TypeSpecifierAST *typeSpec() const { return m_typeSpec; }
+ void setTypeSpec(TypeSpecifierAST *typeSpec);
+
+ inline DeclaratorAST *declarator() const { return m_declarator; }
+ void setDeclarator(DeclaratorAST *declarator);
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+
+private:
+ TypeSpecifierAST* m_typeSpec;
+ DeclaratorAST* m_declarator;
+ AbstractExpressionAST* m_expression;
+
+private:
+ ConditionAST(const ConditionAST &source);
+ void operator = (const ConditionAST &source);
+};
+
+class IfStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_IfStatement };
+
+public:
+ IfStatementAST();
+
+ inline ConditionAST *condition() const { return m_condition; }
+ void setCondition(ConditionAST *condition);
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+ inline StatementAST *elseStatement() const { return m_elseStatement; }
+ void setElseStatement(StatementAST *statement);
+
+private:
+ ConditionAST* m_condition;
+ StatementAST* m_statement;
+ StatementAST* m_elseStatement;
+
+private:
+ IfStatementAST(const IfStatementAST &source);
+ void operator = (const IfStatementAST &source);
+};
+
+class WhileStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_WhileStatement };
+
+public:
+ WhileStatementAST();
+
+ inline ConditionAST *condition() const { return m_condition; }
+ void setCondition(ConditionAST *condition);
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+private:
+ ConditionAST* m_condition;
+ StatementAST* m_statement;
+
+private:
+ WhileStatementAST(const WhileStatementAST &source);
+ void operator = (const WhileStatementAST &source);
+};
+
+class DoStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_DoStatement };
+
+public:
+ DoStatementAST();
+
+ inline ConditionAST *condition() const { return m_condition; }
+ void setCondition(ConditionAST *condition);
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+private:
+ ConditionAST* m_condition;
+ StatementAST* m_statement;
+
+private:
+ DoStatementAST(const DoStatementAST &source);
+ void operator = (const DoStatementAST &source);
+};
+
+class ForStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_ForStatement };
+
+public:
+ ForStatementAST();
+
+ inline StatementAST *initStatement() const { return m_initStatement; }
+ void setInitStatement(StatementAST *statement);
+
+ inline ConditionAST *condition() const { return m_condition; }
+ void setCondition(ConditionAST *condition);
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+private:
+ ConditionAST* m_condition;
+ StatementAST* m_initStatement;
+ StatementAST* m_statement;
+ AbstractExpressionAST* m_expression;
+
+private:
+ ForStatementAST(const ForStatementAST &source);
+ void operator = (const ForStatementAST &source);
+};
+
+class SwitchStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_SwitchStatement };
+
+public:
+ SwitchStatementAST();
+
+ inline ConditionAST *condition() const { return m_condition; }
+ void setCondition(ConditionAST *condition);
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+private:
+ ConditionAST* m_condition;
+ StatementAST* m_statement;
+
+private:
+ SwitchStatementAST(const SwitchStatementAST &source);
+ void operator = (const SwitchStatementAST &source);
+};
+
+class StatementListAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_StatementList };
+
+public:
+ StatementListAST();
+
+ inline List<StatementAST *> *statementList() const { return m_statementList; }
+ void addStatement(StatementAST *statement);
+
+private:
+ List<StatementAST *> *m_statementList;
+
+private:
+ StatementListAST(const StatementListAST &source);
+ void operator = (const StatementListAST &source);
+};
+
+class DeclarationStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_DeclarationStatement };
+
+public:
+ DeclarationStatementAST();
+
+ inline DeclarationAST *declaration() const { return m_declaration; }
+ void setDeclaration(DeclarationAST *declaration);
+
+private:
+ DeclarationAST* m_declaration;
+
+private:
+ DeclarationStatementAST(const DeclarationStatementAST &source);
+ void operator = (const DeclarationStatementAST &source);
+};
+
+/*
+ LabeledStatementAST:
+ case constant-expression : statement
+ default : statement (expression is 0)
+*/
+class LabeledStatementAST: public StatementAST
+{
+public:
+ enum { Type = NodeType_LabeledStatement };
+public:
+ LabeledStatementAST();
+
+ inline StatementAST *statement() const { return m_statement; }
+ void setStatement(StatementAST *statement);
+
+ inline AbstractExpressionAST *expression() const { return m_expression; }
+ void setExpression(AbstractExpressionAST *expression);
+private:
+ StatementAST* m_statement;
+ AbstractExpressionAST *m_expression;
+
+private:
+ LabeledStatementAST(const LabeledStatementAST &source);
+ void operator = (const LabeledStatementAST &source);
+};
+
+class FunctionDefinitionAST: public DeclarationAST
+{
+public:
+ enum { Type = NodeType_FunctionDefinition };
+
+public:
+ FunctionDefinitionAST();
+
+ inline AST *functionSpecifier() const { return m_functionSpecifier; }
+ void setFunctionSpecifier(AST *functionSpecifier);
+
+ inline AST *storageSpecifier() const { return m_storageSpecifier; }
+ void setStorageSpecifier(AST *storageSpecifier);
+
+ inline TypeSpecifierAST *typeSpec() const { return m_typeSpec; }
+ void setTypeSpec(TypeSpecifierAST *typeSpec);
+
+ inline InitDeclaratorAST *initDeclarator() const { return m_initDeclarator; }
+ void setInitDeclarator(InitDeclaratorAST *initDeclarator);
+
+ inline StatementListAST *functionBody() const { return m_functionBody; }
+ void setFunctionBody(StatementListAST *functionBody);
+
+ inline AST *winDeclSpec() const { return m_winDeclSpec; }
+ void setWinDeclSpec(AST *winDeclSpec);
+
+private:
+ AST* m_functionSpecifier;
+ AST* m_storageSpecifier;
+ TypeSpecifierAST* m_typeSpec;
+ InitDeclaratorAST* m_initDeclarator;
+ StatementListAST* m_functionBody;
+ AST* m_winDeclSpec;
+
+private:
+ FunctionDefinitionAST(const FunctionDefinitionAST &source);
+ void operator = (const FunctionDefinitionAST &source);
+};
+
+class TranslationUnitAST: public AST
+{
+public:
+ enum { Type = NodeType_TranslationUnit };
+
+public:
+ TranslationUnitAST();
+
+ void addDeclaration(DeclarationAST *ast);
+ inline List<DeclarationAST *> *declarationList() const { return m_declarationList; }
+
+private:
+ List<DeclarationAST *> *m_declarationList;
+
+private:
+ TranslationUnitAST(const TranslationUnitAST &source);
+ void operator = (const TranslationUnitAST &source);
+};
+
+template <class T> T* CreateNode(pool *p)
+{
+ T* node = new (p->allocate(sizeof(T))) T;
+ node->setNodeType(T::Type);
+ node->_pool = p;
+ return node;
+}
+
+template <int kind> ExpressionAST<kind> *CreateExpression(pool *p)
+{
+ ExpressionAST<kind>* node = new (p->allocate(sizeof(ExpressionAST<kind>))) ExpressionAST<kind>;
+ node->setNodeType(kind);
+ node->_pool = p;
+ return node;
+}
+
+/*
+template <typename T>
+inline List<T *> *snoc(List<T *> *e, T *d, pool *p)
+{ if (!e) e = new (p->allocate(sizeof(List<T*>))) List<T *>(p); e->append(d); return e; }
+*/
+
+//Workaround for ICE on MSVC, use macro instead of template.
+#define SNOC(ListType, ListValueType) \
+inline ListType *snoc(ListType *e, ListValueType *d, pool *p) \
+{ if (!e) e = new (p->allocate(sizeof(ListType))) ListType(p); e->append(d); return e; }
+
+SNOC(List<AST *>, AST)
+SNOC(List<ClassOrNamespaceNameAST *>, ClassOrNamespaceNameAST)
+SNOC(List<BaseSpecifierAST *>, BaseSpecifierAST)
+SNOC(List<DeclarationAST *>, DeclarationAST)
+SNOC(List<EnumeratorAST *>, EnumeratorAST)
+SNOC(List<ParameterDeclarationAST *>, ParameterDeclarationAST)
+SNOC(List<InitDeclaratorAST *>, InitDeclaratorAST)
+SNOC(List<TemplateParameterAST *>, TemplateParameterAST)
+SNOC(List<StatementAST *>, StatementAST)
+
+QT_END_NAMESPACE
+
+#endif // AST_H
diff --git a/tools/porting/src/codemodel.cpp b/tools/porting/src/codemodel.cpp
new file mode 100644
index 0000000..4622833
--- /dev/null
+++ b/tools/porting/src/codemodel.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "codemodel.h"
+
+#include <QList>
+#include <QByteArray>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+namespace CodeModel {
+
+BuiltinType BuiltinType::Bool("bool", 0 );
+BuiltinType BuiltinType::Void("void", 0 );
+BuiltinType BuiltinType::Char("char", 0 );
+BuiltinType BuiltinType::Short("short", 0 );
+BuiltinType BuiltinType::Int("int", 0 );
+BuiltinType BuiltinType::Long("long", 0 );
+BuiltinType BuiltinType::Double("double", 0 );
+BuiltinType BuiltinType::Float("float", 0 );
+BuiltinType BuiltinType::Unsigned("unsigned", 0 );
+BuiltinType BuiltinType::Signed("signed", 0 );
+
+void Scope::addScope(Scope *scope)
+{
+ scope->setParent(this);
+ m_scopes.add(scope);
+}
+
+void Scope::addType(Type *type)
+{
+ if (ClassType *klass = type->toClassType())
+ klass->setParent(this);
+ m_types.add(type);
+}
+
+void Scope::addMember(Member *member)
+{
+ member->setParent(this);
+ m_members.add(member);
+}
+
+void Scope::addNameUse(NameUse *nameUse)
+{
+ nameUse->setParent(this);
+ m_nameUses.add(nameUse);
+}
+
+} //namepsace CodeModel
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/codemodel.h b/tools/porting/src/codemodel.h
new file mode 100644
index 0000000..017191e
--- /dev/null
+++ b/tools/porting/src/codemodel.h
@@ -0,0 +1,777 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CODEMODEL_H
+#define CODEMODEL_H
+
+#include "smallobject.h"
+#include "tokenengine.h"
+
+#include <QByteArray>
+#include <QList>
+#include <QMap>
+#include <QHash>
+
+QT_BEGIN_NAMESPACE
+
+namespace CodeModel
+{
+
+// types
+struct Type;
+struct EnumType;
+struct EnumeratorType;
+struct ClassType;
+struct BuiltinType;
+struct PointerType;
+struct ReferenceType;
+struct GenericType;
+struct AliasType;
+struct FunctionType;
+struct UnknownType;
+
+// Scopes contain child scopes, members and types.
+struct Scope;
+struct ClassScope;
+struct NamespaceScope;
+struct BlockScope;
+
+// Members introduces names into scopes, and are also linked to a specific
+// token in a source file.
+struct Member;
+struct FunctionMember;
+struct VariableMember;
+struct UsingDeclarationMember;
+struct NamespaceMember;
+struct TypeMember;
+
+// Name uses links uses of a name to its declaration (a Member), and also to a
+// token in a source file.
+struct NameUse;
+
+struct Argument;
+struct UsingDirectiveLink;
+
+template <typename CollectedType>
+class Collection: public QMultiHash<QByteArray, CollectedType *>
+{
+public:
+ void add(CollectedType *collectedItem)
+ { insert(collectedItem->name(), collectedItem); }
+};
+
+typedef Collection<Scope> ScopeCollection;
+typedef Collection<Member> MemberCollection;
+typedef Collection<Type> TypeCollection;
+typedef Collection<NameUse> NameUseCollection;
+typedef Collection<Argument> ArgumentCollection;
+
+struct SemanticInfo
+{
+ CodeModel::NamespaceScope *codeModel;
+
+ // tokenindex -> NameUse* map. Use map here bacause we expect name uses to
+ // be sparesly distributed among the tokens.
+ QMap<int, NameUse*> nameUses;
+};
+
+
+struct Item
+{
+ Item() {}
+ virtual ~Item() {}
+ virtual QByteArray name() const = 0;
+};
+
+struct Type: public Item
+{
+ virtual QByteArray name() const =0;
+
+ virtual EnumType *toEnumType() const
+ { return 0; }
+
+ virtual ClassType *toClassType() const
+ { return 0; }
+
+ virtual UnknownType *toUnknownType() const
+ { return 0; }
+
+ virtual BuiltinType *toBuiltinType() const
+ { return 0; }
+
+ virtual PointerType *toPointerType() const
+ { return 0; }
+
+ virtual ReferenceType *toReferenceType() const
+ { return 0; }
+
+ virtual GenericType *toGenericType() const
+ { return 0; }
+
+ virtual AliasType *toAliasType() const
+ { return 0; }
+};
+
+struct Scope: public Item
+{
+ Scope()
+ : m_parent(0) {}
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name=name; }
+
+ virtual NamespaceScope *toNamespaceScope() const
+ { return 0; }
+
+ virtual ClassScope *toClassScope() const
+ { return 0; }
+
+ virtual BlockScope *toBlockScope() const
+ { return 0; }
+
+ const Collection<Scope> scopes() const
+ { return m_scopes; }
+ const Collection<Type> types() const
+ { return m_types; }
+ const Collection<Member> members() const
+ { return m_members; }
+ const Collection<NameUse> nameUses() const
+ { return m_nameUses; }
+
+ void addScope(Scope *scope);
+ void addType(Type *type);
+ void addMember(Member *member);
+ void addNameUse(NameUse *nameUse);
+private:
+ Scope *m_parent;
+ QByteArray m_name;
+ Collection<Scope> m_scopes;
+ Collection<Type> m_types;
+ Collection<Member> m_members;
+ Collection<NameUse> m_nameUses;
+};
+
+struct Member: public Item
+{
+ enum Binding // ### not used yet
+ {
+ Static,
+ Instance
+ };
+
+ enum Access // ### not used yet
+ {
+ Public,
+ Protected,
+ Private
+ };
+
+ Member()
+ : m_binding(Static), m_access(Public),
+ m_parent(0), m_constant(0), m_static(0) {}
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name = name; }
+
+ TokenEngine::TokenRef nameToken() const
+ { return m_nameToken; }
+
+ void setNameToken(TokenEngine::TokenRef nameToken)
+ { m_nameToken = nameToken; }
+
+ Binding binding() const
+ { return m_binding; }
+
+ void setBinding(Binding binding)
+ { m_binding = binding; }
+
+ Access access() const
+ { return m_access; }
+
+ void setAccess(Access access)
+ { m_access = access; }
+
+ bool isConstant() const
+ { return m_constant; }
+
+ void setConstant(bool b)
+ { m_constant = b; }
+
+ bool isStatic() const
+ { return m_static; }
+
+ void setStatic(bool b)
+ { m_static = b; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual FunctionMember *toFunctionMember() const
+ { return 0; }
+
+ virtual VariableMember *toVariableMember() const
+ { return 0; }
+
+ virtual UsingDeclarationMember *toUsingDeclarationMember() const
+ { return 0; }
+
+ virtual NamespaceMember *toNamespaceMember() const
+ { return 0; }
+
+ virtual TypeMember *toTypeMember() const
+ { return 0; }
+
+ private:
+ Binding m_binding;
+ Access m_access;
+ Scope *m_parent;
+ QByteArray m_name;
+ TokenEngine::TokenRef m_nameToken;
+ uint m_constant : 1;
+ uint m_static : 1;
+};
+
+struct ClassScope: public Scope
+{
+ const Collection<Type> baseClasses() const
+ { return m_baseClasses; }
+
+ void addBaseClass(Type *baseClass)
+ {
+ Q_ASSERT(baseClass->toClassType());
+ m_baseClasses.add(baseClass);
+ }
+
+ virtual ClassScope *toClassScope() const
+ { return const_cast<ClassScope*>(this); }
+
+private:
+ Collection<Type> m_baseClasses;
+};
+
+struct UsingDirectiveLinkable : public Scope
+{
+ const QList<UsingDirectiveLink *> usingDirectiveLinks() const
+ { return m_usingDirectiveLinks; }
+
+ void addUsingDirectiveLink(UsingDirectiveLink *usingDirectiveLink)
+ { m_usingDirectiveLinks.append(usingDirectiveLink); }
+private:
+ QList<UsingDirectiveLink *> m_usingDirectiveLinks;
+};
+
+struct NamespaceScope: public UsingDirectiveLinkable
+{
+ NamespaceScope() {}
+
+ virtual NamespaceScope *toNamespaceScope() const
+ { return const_cast<NamespaceScope*>(this); }
+};
+
+struct BlockScope: public UsingDirectiveLinkable
+{
+ BlockScope() {}
+
+ virtual BlockScope *toBlockScope() const
+ { return const_cast<BlockScope*>(this); }
+};
+
+struct EnumType: public Type
+{
+ EnumType()
+ : m_parent(0) {}
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name = name; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual EnumType *toEnumType() const
+ { return const_cast<EnumType*>(this); }
+
+private:
+ Scope *m_parent;
+ QByteArray m_name;
+};
+
+struct UnknownType: public Type
+{
+ UnknownType()
+ : m_parent(0) {}
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name = name; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual UnknownType *toUnknownType() const
+ { return const_cast<UnknownType*>(this); }
+
+private:
+ Scope *m_parent;
+ QByteArray m_name;
+};
+
+struct ClassType: public Type
+{
+ ClassType()
+ : m_parent(0), m_scope(0) {}
+
+ ClassScope *scope() const
+ { return m_scope; }
+
+ void setScope(ClassScope *scope)
+ { m_scope = scope; }
+
+ QByteArray name() const
+ { return m_scope ? m_scope->name() : /*anonymous*/ QByteArray(); }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual ClassType *toClassType() const
+ { return const_cast<ClassType*>(this); }
+
+private:
+ Scope *m_parent;
+ ClassScope *m_scope;
+
+};
+
+struct BuiltinType: public Type
+{
+protected:
+ BuiltinType(const QByteArray &name, Scope *parent)
+ : m_name(name), m_parent(parent) {}
+
+public:
+ QByteArray name() const
+ { return m_name; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ virtual BuiltinType *toBuiltinType() const
+ { return const_cast<BuiltinType*>(this); }
+
+ static BuiltinType Bool;
+ static BuiltinType Void;
+ static BuiltinType Char;
+ static BuiltinType Short;
+ static BuiltinType Int;
+ static BuiltinType Long;
+ static BuiltinType Double;
+ static BuiltinType Float;
+ static BuiltinType Unsigned;
+ static BuiltinType Signed;
+ // ### more
+
+private:
+ QByteArray m_name;
+ Scope *m_parent;
+};
+
+struct PointerType: public Type
+{
+ PointerType()
+ : m_parent(0), m_baseType(0) {}
+
+ Type *baseType() const
+ { return m_baseType; }
+
+ void setBaseType(Type *baseType)
+ { m_baseType = baseType; }
+
+ QByteArray name() const
+ { return m_baseType->name(); }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual PointerType *toPointerType() const
+ { return const_cast<PointerType*>(this); }
+
+private:
+ Scope *m_parent;
+ Type *m_baseType;
+};
+
+struct ReferenceType: public Type
+{
+ ReferenceType()
+ : m_parent(0), m_baseType(0) {}
+
+ Type *baseType() const
+ { return m_baseType; }
+
+ void setBaseType(Type *baseType)
+ { m_baseType = baseType; }
+
+ QByteArray name() const
+ { return m_baseType->name(); }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ virtual ReferenceType *toReferenceType() const
+ { return const_cast<ReferenceType*>(this); }
+
+private:
+ Scope *m_parent;
+ Type *m_baseType;
+};
+
+struct GenericType: public Type // ### implement me
+{
+ virtual GenericType *toGenericType() const
+ { return const_cast<GenericType*>(this); }
+};
+
+struct AliasType: public Type // ### implement me
+{
+ AliasType ()
+ : m_parent(0) {}
+
+ QByteArray name() const
+ { return m_name; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ virtual AliasType *toAliasType() const
+ { return const_cast<AliasType*>(this); }
+private:
+ QByteArray m_name;
+ Scope *m_parent;
+};
+
+struct Argument: public Item
+{
+ Argument()
+ : m_parent(0), m_type(0) {}
+
+ Type *type() const
+ { return m_type; }
+
+ void setType(Type *type)
+ { m_type = type; }
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name = name; }
+
+ TokenEngine::TokenRef nameToken() const
+ { return m_nameToken; }
+
+ void setNameToken(TokenEngine::TokenRef nameToken)
+ { m_nameToken = nameToken; }
+
+ virtual FunctionMember *parent() const
+ { return m_parent; }
+
+ void setParent(FunctionMember *parent)
+ { m_parent = parent; }
+
+private:
+ FunctionMember *m_parent;
+ Type *m_type;
+ QByteArray m_name;
+ TokenEngine::TokenRef m_nameToken;
+};
+
+struct FunctionMember: public Member
+{
+ inline FunctionMember()
+ : m_returnType(0),
+ m_functionBodyScope(0),
+ m_signal(0),
+ m_virtual(0), m_abstract(0) { m_slot = 0; }
+
+ virtual FunctionMember *toFunctionMember() const
+ { return const_cast<FunctionMember*>(this); }
+
+ Type *returnType() const
+ { return m_returnType; }
+
+ void setReturnType(Type *type)
+ { m_returnType = type; }
+
+ const Collection<Argument> arguments() const
+ { return m_arguments; }
+
+ void addArgument(Argument *argument)
+ { m_arguments.insert(argument->name(), argument); }
+
+ void setFunctionBodyScope(BlockScope *functionBodyScope)
+ { m_functionBodyScope = functionBodyScope; }
+
+ BlockScope *functionBodyScope() const
+ {return m_functionBodyScope;}
+
+ bool isSignal() const
+ { return m_signal; }
+
+ void setSignal(bool b)
+ { m_signal = b; }
+
+ bool isSlot() const
+ { return m_slot; }
+
+ void setSlot(bool b)
+ { m_slot = b; }
+
+ bool isVirtual() const
+ { return m_virtual; }
+
+ void setVirtual(bool b)
+ { m_virtual = b; }
+
+ bool isAbstract() const
+ { return m_abstract; }
+
+ void setAbstract(bool b)
+ { m_abstract = b; }
+
+private:
+ Type *m_returnType;
+ Collection<Argument> m_arguments;
+ BlockScope *m_functionBodyScope;
+ uint m_signal: 1;
+ uint m_slot: 1;
+ uint m_virtual: 1;
+ uint m_abstract: 1;
+};
+
+struct VariableMember: public Member
+{
+ VariableMember()
+ : m_type(0) {}
+
+ Type *type() const
+ { return m_type; }
+
+ void setType(Type *type)
+ { m_type = type; }
+
+ virtual VariableMember *toVariableMember() const
+ { return const_cast<VariableMember*>(this); }
+
+private:
+ Type *m_type;
+};
+
+struct UsingDeclarationMember: public Member
+{
+ UsingDeclarationMember()
+ : m_member(0) {}
+
+ virtual UsingDeclarationMember *toUsingDeclarationMember() const
+ { return const_cast<UsingDeclarationMember*>(this); }
+
+ Member *member() const
+ { return m_member; }
+
+ void setMember(Member *member)
+ { m_member = member; }
+
+private:
+ Member *m_member;
+};
+
+struct NamespaceMember: public Member
+{
+ NamespaceMember()
+ :m_namespaceScope(0) {}
+
+ virtual NamespaceMember *toNamespaceMember() const
+ { return const_cast<NamespaceMember*>(this); }
+
+ NamespaceScope *namespaceScope() const
+ { return m_namespaceScope; }
+
+ void setNamespaceScope(NamespaceScope *namespaceScope)
+ { m_namespaceScope = namespaceScope; }
+private:
+ NamespaceScope *m_namespaceScope;
+};
+
+struct TypeMember: public Member
+{
+ TypeMember()
+ :m_type(0) {}
+
+ virtual TypeMember *toTypeMember() const
+ { return const_cast<TypeMember*>(this); }
+
+ Type *type() const
+ { return m_type; }
+
+ void setType(Type *type)
+ { m_type = type; }
+private:
+ Type *m_type;
+
+};
+
+struct NameUse: public Item
+{
+ NameUse()
+ : m_declaration(0), m_parent(0) {}
+
+ QByteArray name() const
+ { return m_name; }
+
+ void setName(const QByteArray &name)
+ { m_name = name; }
+
+ TokenEngine::TokenRef nameToken() const
+ { return m_nameToken; }
+
+ void setNameToken(TokenEngine::TokenRef nameToken)
+ { m_nameToken = nameToken; }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ Member *declaration() const
+ { return m_declaration; }
+
+ void setDeclaration(Member *parent)
+ { m_declaration = parent; }
+
+private:
+ QByteArray m_name;
+ TokenEngine::TokenRef m_nameToken;
+ Member *m_declaration;
+ Scope *m_parent;
+};
+
+struct UsingDirectiveLink: public Item
+{
+ UsingDirectiveLink()
+ : m_parent(0), m_targetNamespace(0), m_insertionNamespace(0) {}
+
+ QByteArray name() const
+ { return QByteArray(); }
+
+ Scope *parent() const
+ { return m_parent; }
+
+ void setParent(Scope *parent)
+ { m_parent = parent; }
+
+ NamespaceScope *targetNamespace() const
+ { return m_targetNamespace; }
+
+ void setTargetNamespace(NamespaceScope *targetNamespace)
+ { m_targetNamespace = targetNamespace; }
+
+ NamespaceScope *insertionNamespace() const
+ { return m_insertionNamespace; }
+
+ void setInsertionNamespace(NamespaceScope *insertionNamespace)
+ { m_insertionNamespace = insertionNamespace; }
+private:
+ Scope *m_parent;
+ // targetNamespace is the namespace specified by the using directive.
+ NamespaceScope *m_targetNamespace;
+ // m_insertionNamespace is the namespace where the names from
+ // targetNamespace will be inserted. The C++ standard (7.3.4.1)
+ // defines this as the nearest namespace that includes both m_parent
+ // and m_targetNamespace.
+ NamespaceScope *m_insertionNamespace;
+};
+
+template <class T>
+T *Create(TypedPool<CodeModel::Item> *p)
+{
+ return new (p->allocate(sizeof(T))) T();
+}
+
+} // namespace CodeModel
+
+QT_END_NAMESPACE
+
+#endif // CODEMODEL_H
diff --git a/tools/porting/src/codemodelattributes.cpp b/tools/porting/src/codemodelattributes.cpp
new file mode 100644
index 0000000..eccd11d
--- /dev/null
+++ b/tools/porting/src/codemodelattributes.cpp
@@ -0,0 +1,195 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "codemodelattributes.h"
+#include "tokenengine.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace CodeModel;
+using namespace TokenEngine;
+
+/*
+ Walk the codemodel.
+*/
+void CodeModelAttributes::createAttributes(TranslationUnit translationUnit)
+{
+ m_translationUnit = translationUnit;
+ parseScope(const_cast<CodeModel::NamespaceScope *>(translationUnit.codeModel()));
+}
+
+/*
+ Create attributes for each name use and assign to the token.
+*/
+void CodeModelAttributes::parseNameUse(CodeModel::NameUse *nameUse)
+{
+ // Get the container for this token.
+ TokenRef ref = nameUse->nameToken();
+ const int containerIndex = ref.containerIndex();
+ TokenAttributes *attributes = ref.tokenContainer().tokenAttributes();
+
+ if (!areAttributesEnabled(attributes))
+ return;
+
+ // Test if the nameUse refers to a UnknownType. If so we add and
+ // "unknown" attribute.
+ if (TypeMember *typeMember = nameUse->declaration()->toTypeMember()) {
+ if (typeMember->type()->toUnknownType()) {
+ attributes->addAttribute(containerIndex, "unknown", nameUse->name());
+ return;
+ }
+ }
+
+ // Add attributes this namnUse.
+ attributes->addAttribute(containerIndex, "nameUse", nameUse->name());
+ attributes->addAttribute(containerIndex, "parentScope",
+ nameUse->declaration()->parent()->name() );
+ if (CodeModel::Scope * skop = nameUse->declaration()->parent()->parent()) {
+ attributes->addAttribute(containerIndex, "grandParentScope", skop->name());
+ }
+
+ createNameTypeAttribute(nameUse);
+}
+
+/*
+ Create attributes for members and assign to token.
+*/
+void CodeModelAttributes::parseMember(CodeModel::Member *member)
+{
+ if(!member || member->name() == QByteArray())
+ return;
+
+ //get the container for this token
+ TokenRef ref = member->nameToken();
+ const int containerIndex = ref.containerIndex();
+ TokenAttributes *attributes = ref.tokenContainer().tokenAttributes();
+
+ if (areAttributesEnabled(attributes)) {
+ //add attributes for this declaration
+ static const QByteArray textDeclaration = "declaration";
+ attributes->addAttribute(containerIndex, textDeclaration, member->name());
+ createNameTypeAttribute(member);
+ }
+ CodeModelWalker::parseMember(member);
+}
+
+void CodeModelAttributes::parseFunctionMember(CodeModel::FunctionMember *member)
+{
+ CodeModel::ArgumentCollection arguments = member->arguments();
+ CodeModel::ArgumentCollection::ConstIterator it = arguments.constBegin();
+ TokenRef ref = member->nameToken();
+ TokenAttributes *attributes = ref.tokenContainer().tokenAttributes();
+
+ if (areAttributesEnabled(attributes)) {
+ while (it != arguments.constEnd()) {
+ const int containerIndex = (*it)->nameToken().containerIndex();
+ const QByteArray name = (*it)->name();
+ attributes->addAttribute(containerIndex, "declaration", name);
+ attributes->addAttribute(containerIndex, "nameType", "variable");
+ ++it;
+ }
+ }
+ CodeModelWalker::parseFunctionMember(member);
+}
+
+/*
+ NameType attributes gives information on what kind of member this is.
+*/
+void CodeModelAttributes::createNameTypeAttribute(CodeModel::Member *member)
+{
+ if(!member)
+ return;
+ //get the container for the token accosiated with this member.
+ TokenRef ref = member->nameToken();
+ const int containerIndex = ref.containerIndex();
+ TokenAttributes *attributes = ref.tokenContainer().tokenAttributes();
+
+ createNameTypeAttributeAtIndex(attributes, containerIndex, member);
+}
+
+/*
+ A NameUse has the same NameType as the declaration it is referring to.
+*/
+void CodeModelAttributes::createNameTypeAttribute(CodeModel::NameUse *nameUse)
+{
+ if(!nameUse)
+ return;
+
+ //get the container for the token accosiated with this NameUse.
+ TokenRef ref = nameUse->nameToken();
+ const int containerIndex = ref.containerIndex();
+ TokenAttributes *attributes = ref.tokenContainer().tokenAttributes();
+
+ createNameTypeAttributeAtIndex(attributes, containerIndex, nameUse->declaration());
+}
+
+void CodeModelAttributes::createNameTypeAttributeAtIndex(TokenEngine::TokenAttributes *attributes,
+ int index, CodeModel::Member *member)
+{
+ QByteArray nameType = "unknown";
+ if (member->toFunctionMember()) {
+ nameType = "function";
+ } else if (CodeModel::VariableMember *variableMember = member->toVariableMember()) {
+ if (variableMember->type()->toEnumType())
+ nameType = "enumerator";
+ else
+ nameType = "variable";
+ } else if (CodeModel::TypeMember *typeMember = member->toTypeMember()) {
+ if (CodeModel::Type *type = typeMember->type()) {
+ if (type->toClassType()) {
+ nameType = "class";
+ } else if (type->toEnumType()) {
+ nameType = "enum";
+ }
+ }
+ }
+ attributes->addAttribute(index, "nameType", nameType);
+}
+
+bool CodeModelAttributes::areAttributesEnabled(const TokenAttributes *attributes) const
+{
+ static const QByteArray tstCreateAttributes("CreateAttributes");
+ static const QByteArray tstTrue("True");
+ return (attributes->attribute(tstCreateAttributes) == tstTrue);
+}
+
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/codemodelattributes.h b/tools/porting/src/codemodelattributes.h
new file mode 100644
index 0000000..e02f383
--- /dev/null
+++ b/tools/porting/src/codemodelattributes.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CODEMODELATTRIBUTES_H
+#define CODEMODELATTRIBUTES_H
+
+#include "codemodelwalker.h"
+#include "translationunit.h"
+
+QT_BEGIN_NAMESPACE
+
+class CodeModelAttributes : public CodeModelWalker
+{
+public:
+ void createAttributes(TranslationUnit translationUnit);
+protected:
+ void parseNameUse(CodeModel::NameUse *);
+ void parseMember(CodeModel::Member *member);
+ void parseFunctionMember(CodeModel::FunctionMember *member);
+
+ void createNameTypeAttribute(CodeModel::Member *member);
+ void createNameTypeAttribute(CodeModel::NameUse *nameUse);
+
+private:
+ void createNameTypeAttributeAtIndex(TokenEngine::TokenAttributes *attributes,
+ int index, CodeModel::Member *member);
+ bool areAttributesEnabled(const TokenEngine::TokenAttributes *attributes) const;
+
+ TranslationUnit m_translationUnit;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/codemodelwalker.cpp b/tools/porting/src/codemodelwalker.cpp
new file mode 100644
index 0000000..641bc02
--- /dev/null
+++ b/tools/porting/src/codemodelwalker.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "codemodelwalker.h"
+
+QT_BEGIN_NAMESPACE
+using namespace CodeModel;
+
+void CodeModelWalker::parseScope(CodeModel::Scope *scope)
+{
+ if(!scope)
+ return;
+
+ if(scope->toClassScope())
+ parseClassScope(scope->toClassScope());
+ if(scope->toNamespaceScope())
+ parseNamespaceScope(scope->toNamespaceScope());
+ if(scope->toBlockScope())
+ parseBlockScope(scope->toBlockScope());
+
+
+ {
+ MemberCollection collection = scope->members();
+ MemberCollection::ConstIterator it = collection.constBegin();
+ while(it != collection.constEnd())
+ parseMember(*it++);
+ }
+ {
+ ScopeCollection collection = scope->scopes();
+ ScopeCollection::ConstIterator it = collection.constBegin();
+ while(it != collection.constEnd())
+ parseScope(*it++);
+ }
+ {
+ NameUseCollection collection = scope->nameUses();
+ NameUseCollection::ConstIterator it = collection.constBegin();
+ while(it != collection.constEnd())
+ parseNameUse(*it++);
+ }
+}
+
+void CodeModelWalker::parseType(CodeModel::Type *type)
+{
+ if(!type)
+ return;
+ if (type->toEnumType())
+ parseEnumType(type->toEnumType());
+ else if (type->toClassType())
+ parseClassType(type->toClassType());
+ else if (type->toBuiltinType())
+ parseBuiltinType(type->toBuiltinType());
+ else if (type->toPointerType())
+ parsePointerType(type->toPointerType());
+ else if (type->toReferenceType())
+ parseReferenceType(type->toReferenceType());
+ else if (type->toGenericType())
+ parseGenericType(type->toGenericType());
+ else if (type->toAliasType())
+ parseAliasType(type->toAliasType());
+ else if (type->toUnknownType())
+ parseUnknownType(type->toUnknownType());
+}
+
+void CodeModelWalker::parseMember(CodeModel::Member *member)
+{
+ if(!member)
+ return;
+
+ if (member->toFunctionMember())
+ parseFunctionMember(member->toFunctionMember());
+ else if (member->toVariableMember())
+ parseVariableMember(member->toVariableMember());
+ else if (member->toUsingDeclarationMember())
+ parseUsingDeclarationMember(member->toUsingDeclarationMember());
+ else if (member->toTypeMember())
+ parseTypeMember(member->toTypeMember());
+}
+
+void CodeModelWalker::parseFunctionMember(CodeModel::FunctionMember *member)
+{
+ if(!member)
+ return;
+ if(member->functionBodyScope())
+ parseScope(member->functionBodyScope());
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/codemodelwalker.h b/tools/porting/src/codemodelwalker.h
new file mode 100644
index 0000000..446ea93
--- /dev/null
+++ b/tools/porting/src/codemodelwalker.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CODEMODELWALKER_H
+#define CODEMODELWALKER_H
+
+#include "codemodel.h"
+
+QT_BEGIN_NAMESPACE
+
+class CodeModelWalker
+{
+public:
+ virtual ~CodeModelWalker(){};
+ virtual void parseScope(CodeModel::Scope *scope);
+ virtual void parseClassScope(CodeModel::ClassScope *){};
+ virtual void parseNamespaceScope(CodeModel::NamespaceScope *){};
+ virtual void parseBlockScope(CodeModel::BlockScope *){};
+
+ virtual void parseType(CodeModel::Type *type);
+ virtual void parseEnumType(CodeModel::EnumType *){};
+ virtual void parseClassType(CodeModel::ClassType *){};
+ virtual void parseUnknownType(CodeModel::UnknownType *){};
+ virtual void parseBuiltinType(CodeModel::BuiltinType *){};
+ virtual void parsePointerType(CodeModel::PointerType *){};
+ virtual void parseReferenceType(CodeModel::ReferenceType *){};
+ virtual void parseGenericType(CodeModel::GenericType *){};
+ virtual void parseAliasType(CodeModel::AliasType *){};
+
+ virtual void parseMember(CodeModel::Member *member);
+ virtual void parseFunctionMember(CodeModel::FunctionMember *);
+ virtual void parseVariableMember(CodeModel::VariableMember *){};
+ virtual void parseUsingDeclarationMember(CodeModel::UsingDeclarationMember *){};
+ virtual void parseTypeMember(CodeModel::TypeMember *){};
+
+ virtual void parseArgument(CodeModel::Argument *){};
+ virtual void parseNameUse(CodeModel::NameUse *){};
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/cpplexer.cpp b/tools/porting/src/cpplexer.cpp
new file mode 100644
index 0000000..ef63538
--- /dev/null
+++ b/tools/porting/src/cpplexer.cpp
@@ -0,0 +1,1297 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "cpplexer.h"
+#include <QChar>
+#include <ctype.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+
+CppLexer::CppLexer()
+ : m_buffer(0), m_ptr(0), m_len(0)
+{
+ setupScanTable();
+}
+
+void CppLexer::setupScanTable()
+{
+ s_scan_keyword_table[0] = &CppLexer::scanKeyword0;
+ s_scan_keyword_table[1] = &CppLexer::scanKeyword0;
+ s_scan_keyword_table[2] = &CppLexer::scanKeyword2;
+ s_scan_keyword_table[3] = &CppLexer::scanKeyword3;
+ s_scan_keyword_table[4] = &CppLexer::scanKeyword4;
+ s_scan_keyword_table[5] = &CppLexer::scanKeyword5;
+ s_scan_keyword_table[6] = &CppLexer::scanKeyword6;
+ s_scan_keyword_table[7] = &CppLexer::scanKeyword7;
+ s_scan_keyword_table[8] = &CppLexer::scanKeyword8;
+ s_scan_keyword_table[9] = &CppLexer::scanKeyword9;
+ s_scan_keyword_table[10] = &CppLexer::scanKeyword10;
+ s_scan_keyword_table[11] = &CppLexer::scanKeyword11;
+ s_scan_keyword_table[12] = &CppLexer::scanKeyword12;
+ s_scan_keyword_table[13] = &CppLexer::scanKeyword0;
+ s_scan_keyword_table[14] = &CppLexer::scanKeyword14;
+ s_scan_keyword_table[15] = &CppLexer::scanKeyword0;
+ s_scan_keyword_table[16] = &CppLexer::scanKeyword16;
+
+ memset(s_attr_table, 0, 256);
+
+ for (int i=0; i<128; ++i) {
+ switch (i) {
+ case ':':
+ case '*':
+ case '/':
+ case '%':
+ case '^':
+ case '=':
+ case '!':
+ case '&':
+ case '|':
+ case '+':
+ case '<':
+ case '>':
+ case '-':
+ case '.':
+ s_scan_table[i] = &CppLexer::scanOperator;
+ break;
+
+ case '\r':
+ case '\n':
+ s_scan_table[i] = &CppLexer::scanNewline;
+ break;
+
+ case '\'':
+ s_scan_table[i] = &CppLexer::scanCharLiteral;
+ break;
+
+ case '"':
+ s_scan_table[i] = &CppLexer::scanStringLiteral;
+ break;
+
+ default:
+ if (isspace(i)) {
+ s_scan_table[i] = &CppLexer::scanWhiteSpaces;
+ s_attr_table[i] |= A_Whitespace;
+ } else if (isalpha(i) || i == '_') {
+ s_scan_table[i] = &CppLexer::scanIdentifier;
+ s_attr_table[i] |= A_Alpha;
+ } else if (isdigit(i)) {
+ s_scan_table[i] = &CppLexer::scanNumberLiteral;
+ s_attr_table[i] |= A_Digit;
+ } else
+ s_scan_table[i] = &CppLexer::scanChar;
+ }
+ }
+
+ s_scan_table[128] = &CppLexer::scanUnicodeChar;
+}
+
+QVector<Type> CppLexer::lex(TokenSectionSequence tokenSectionSequence)
+{
+ QVector<Type> tokenTypes;
+ tokenTypes.reserve(tokenSectionSequence.count());
+ TokenSectionSequenceIterator it(tokenSectionSequence);
+ while(it.nextToken()) {
+ tokenTypes.append(identify(it.tokenTempRef()));
+ }
+ return tokenTypes;
+}
+
+Type CppLexer::identify(const TokenTempRef &tokenTempRef)
+{
+ Q_ASSERT(tokenTempRef.length() >= 0 );
+ m_buffer = tokenTempRef.constData();
+ m_len = tokenTempRef.length();
+ m_ptr = 0;
+ const unsigned char ch = m_buffer[0];
+ int kind = 0;
+ (this->*s_scan_table[ch < 128 ? ch : 128])(&kind);
+ return (Type)kind;
+}
+
+void CppLexer::scanKeyword0(int *kind)
+{
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword2(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'i':
+ if (m_buffer[m_ptr+1] == 'f')
+ {
+ *kind = Token_if;
+ return;
+ }
+ break;
+
+ case 'd':
+ if (m_buffer[m_ptr+1] == 'o')
+ {
+ *kind = Token_do;
+ return;
+ }
+ break;
+
+ case 'o':
+ if (m_buffer[m_ptr+1] == 'r')
+ {
+ *kind = Token_or;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword3(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'a':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 'd')
+ {
+ *kind = Token_and;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 's' &&
+ m_buffer[m_ptr+2] == 'm')
+ {
+ *kind = Token_asm;
+ return;
+ }
+ break;
+
+ case 'f':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'r')
+ {
+ *kind = Token_for;
+ return;
+ }
+ break;
+
+ case 'i':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 't')
+ {
+ *kind = Token_int;
+ return;
+ }
+ break;
+
+ case 'n':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'w')
+ {
+ *kind = Token_new;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 't')
+ {
+ *kind = Token_not;
+ return;
+ }
+ break;
+
+ case 't':
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == 'y')
+ {
+ *kind = Token_try;
+ return;
+ }
+ break;
+
+ case 'x':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'r')
+ {
+ *kind = Token_xor;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword4(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'a':
+ if (m_buffer[m_ptr+1] == 'u' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'o')
+ {
+ *kind = Token_auto;
+ return;
+ }
+ break;
+
+ case 'c':
+ if (m_buffer[m_ptr+1] == 'a' &&
+ m_buffer[m_ptr+2] == 's' &&
+ m_buffer[m_ptr+3] == 'e')
+ {
+ *kind = Token_case;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'h' &&
+ m_buffer[m_ptr+2] == 'a' &&
+ m_buffer[m_ptr+3] == 'r')
+ {
+ *kind = Token_char;
+ return;
+ }
+ break;
+
+ case 'b':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'o' &&
+ m_buffer[m_ptr+3] == 'l')
+ {
+ *kind = Token_bool;
+ return;
+ }
+ break;
+
+ case 'e':
+ if (m_buffer[m_ptr+1] == 'l' &&
+ m_buffer[m_ptr+2] == 's' &&
+ m_buffer[m_ptr+3] == 'e')
+ {
+ *kind = Token_else;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'm' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 't')
+ {
+ *kind = Token_emit;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 'u' &&
+ m_buffer[m_ptr+3] == 'm')
+ {
+ *kind = Token_enum;
+ return;
+ }
+ break;
+
+ case 'g':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'o')
+ {
+ *kind = Token_goto;
+ return;
+ }
+ break;
+
+ case 'l':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'n' &&
+ m_buffer[m_ptr+3] == 'g')
+ {
+ *kind = Token_long;
+ return;
+ }
+ break;
+
+ case 't':
+ if (m_buffer[m_ptr+1] == 'h' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 's')
+ {
+ *kind = Token_this;
+ return;
+ }
+ break;
+
+ case 'v':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'd')
+ {
+ *kind = Token_void;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword5(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'c':
+ if (m_buffer[m_ptr+1] == 'a' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'c' &&
+ m_buffer[m_ptr+4] == 'h')
+ {
+ *kind = Token_catch;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'l' &&
+ m_buffer[m_ptr+2] == 'a' &&
+ m_buffer[m_ptr+3] == 's' &&
+ m_buffer[m_ptr+4] == 's')
+ {
+ *kind = Token_class;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'm' &&
+ m_buffer[m_ptr+3] == 'p' &&
+ m_buffer[m_ptr+4] == 'l')
+ {
+ *kind = Token_compl;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'n' &&
+ m_buffer[m_ptr+3] == 's' &&
+ m_buffer[m_ptr+4] == 't')
+ {
+ *kind = Token_const;
+ return;
+ }
+ break;
+
+ case 'b':
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'o' &&
+ m_buffer[m_ptr+4] == 'r')
+ {
+ *kind = Token_bitor;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == 'e' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 'k')
+ {
+ *kind = Token_break;
+ return;
+ }
+ break;
+
+ case 'f':
+ if (m_buffer[m_ptr+1] == 'l' &&
+ m_buffer[m_ptr+2] == 'o' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 't')
+ {
+ *kind = Token_float;
+ return;
+ }
+ break;
+
+ case 'o':
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == '_' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'q')
+ {
+ *kind = Token_or_eq;
+ return;
+ }
+ break;
+
+ case 's':
+ if (m_buffer[m_ptr+1] == 'h' &&
+ m_buffer[m_ptr+2] == 'o' &&
+ m_buffer[m_ptr+3] == 'r' &&
+ m_buffer[m_ptr+4] == 't')
+ {
+ *kind = Token_short;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'l' &&
+ m_buffer[m_ptr+2] == 'o' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 's')
+ {
+ *kind = Token_slots;
+ return;
+ }
+ break;
+
+ case 'u':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'o' &&
+ m_buffer[m_ptr+4] == 'n')
+ {
+ *kind = Token_union;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 's' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'n' &&
+ m_buffer[m_ptr+4] == 'g')
+ {
+ *kind = Token_using;
+ return;
+ }
+ break;
+
+ case 't':
+ if (m_buffer[m_ptr+1] == 'h' &&
+ m_buffer[m_ptr+2] == 'r' &&
+ m_buffer[m_ptr+3] == 'o' &&
+ m_buffer[m_ptr+4] == 'w')
+ {
+ *kind = Token_throw;
+ return;
+ }
+ break;
+
+ case 'w':
+ if (m_buffer[m_ptr+1] == 'h' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'l' &&
+ m_buffer[m_ptr+4] == 'e')
+ {
+ *kind = Token_while;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword6(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'a':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 'd' &&
+ m_buffer[m_ptr+3] == '_' &&
+ m_buffer[m_ptr+4] == 'e' &&
+ m_buffer[m_ptr+5] == 'q')
+ {
+ *kind = Token_and_eq;
+ return;
+ }
+ break;
+
+ case 'b':
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 'n' &&
+ m_buffer[m_ptr+5] == 'd')
+ {
+ *kind = Token_bitand;
+ return;
+ }
+ break;
+
+ case 'e':
+ if (m_buffer[m_ptr+1] == 'x' &&
+ m_buffer[m_ptr+2] == 'p' &&
+ m_buffer[m_ptr+3] == 'o' &&
+ m_buffer[m_ptr+4] == 'r' &&
+ m_buffer[m_ptr+5] == 't')
+ {
+ *kind = Token_export;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'x' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'r' &&
+ m_buffer[m_ptr+5] == 'n')
+ {
+ *kind = Token_extern;
+ return;
+ }
+ break;
+
+ case 'd':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'l' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 't' &&
+ m_buffer[m_ptr+5] == 'e')
+ {
+ *kind = Token_delete;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'u' &&
+ m_buffer[m_ptr+3] == 'b' &&
+ m_buffer[m_ptr+4] == 'l' &&
+ m_buffer[m_ptr+5] == 'e')
+ {
+ *kind = Token_double;
+ return;
+ }
+ break;
+
+ case 'f':
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'n' &&
+ m_buffer[m_ptr+5] == 'd')
+ {
+ *kind = Token_friend;
+ return;
+ }
+ break;
+
+ case 'i':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 'l' &&
+ m_buffer[m_ptr+3] == 'i' &&
+ m_buffer[m_ptr+4] == 'n' &&
+ m_buffer[m_ptr+5] == 'e')
+ {
+ *kind = Token_inline;
+ return;
+ }
+ break;
+
+ case 'K':
+ if (m_buffer[m_ptr+1] == '_' &&
+ m_buffer[m_ptr+2] == 'D' &&
+ m_buffer[m_ptr+3] == 'C' &&
+ m_buffer[m_ptr+4] == 'O' &&
+ m_buffer[m_ptr+5] == 'P')
+ {
+ *kind = Token_K_DCOP;
+ return;
+ }
+ break;
+
+ case 'n':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == '_' &&
+ m_buffer[m_ptr+4] == 'e' &&
+ m_buffer[m_ptr+5] == 'q')
+ {
+ *kind = Token_not_eq;
+ return;
+ }
+ break;
+
+ case 'p':
+ if (m_buffer[m_ptr+1] == 'u' &&
+ m_buffer[m_ptr+2] == 'b' &&
+ m_buffer[m_ptr+3] == 'l' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'c')
+ {
+ *kind = Token_public;
+ return;
+ }
+ break;
+
+ case 's':
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 'g' &&
+ m_buffer[m_ptr+3] == 'n' &&
+ m_buffer[m_ptr+4] == 'e' &&
+ m_buffer[m_ptr+5] == 'd')
+ {
+ *kind = Token_signed;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 'z' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'o' &&
+ m_buffer[m_ptr+5] == 'f')
+ {
+ *kind = Token_sizeof;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 't' &&
+ m_buffer[m_ptr+2] == 'a' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'c')
+ {
+ *kind = Token_static;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 't' &&
+ m_buffer[m_ptr+2] == 'r' &&
+ m_buffer[m_ptr+3] == 'u' &&
+ m_buffer[m_ptr+4] == 'c' &&
+ m_buffer[m_ptr+5] == 't')
+ {
+ *kind = Token_struct;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'w' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'c' &&
+ m_buffer[m_ptr+5] == 'h')
+ {
+ *kind = Token_switch;
+ return;
+ }
+ break;
+
+ case 'r':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'u' &&
+ m_buffer[m_ptr+4] == 'r' &&
+ m_buffer[m_ptr+5] == 'n')
+ {
+ *kind = Token_return;
+ return;
+ }
+ break;
+
+ case 't':
+ if (m_buffer[m_ptr+1] == 'y' &&
+ m_buffer[m_ptr+2] == 'p' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'd')
+ {
+ *kind = Token_typeid;
+ return;
+ }
+ break;
+
+ case 'x':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'r' &&
+ m_buffer[m_ptr+3] == '_' &&
+ m_buffer[m_ptr+4] == 'e' &&
+ m_buffer[m_ptr+5] == 'q')
+ {
+ *kind = Token_xor_eq;
+ return;
+ }
+ break;
+
+ case 'k':
+ if (m_buffer[m_ptr+1] == '_' &&
+ m_buffer[m_ptr+2] == 'd' &&
+ m_buffer[m_ptr+3] == 'c' &&
+ m_buffer[m_ptr+4] == 'o' &&
+ m_buffer[m_ptr+5] == 'p')
+ {
+ *kind = Token_k_dcop;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword7(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'd':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'f' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 'u' &&
+ m_buffer[m_ptr+5] == 'l' &&
+ m_buffer[m_ptr+6] == 't')
+ {
+ *kind = Token_default;
+ return;
+ }
+ break;
+
+ case 'm':
+ if (m_buffer[m_ptr+1] == 'u' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 'b' &&
+ m_buffer[m_ptr+5] == 'l' &&
+ m_buffer[m_ptr+6] == 'e')
+ {
+ *kind = Token_mutable;
+ return;
+ }
+ break;
+
+ case 'p':
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'v' &&
+ m_buffer[m_ptr+4] == 'a' &&
+ m_buffer[m_ptr+5] == 't' &&
+ m_buffer[m_ptr+6] == 'e')
+ {
+ *kind = Token_private;
+ return;
+ }
+ break;
+#if 0
+ case 's':
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 'g' &&
+ m_buffer[m_ptr+3] == 'n' &&
+ m_buffer[m_ptr+4] == 'a' &&
+ m_buffer[m_ptr+5] == 'l' &&
+ m_buffer[m_ptr+6] == 's')
+ {
+ *kind = Token_signals;
+ return;
+ }
+ break;
+#endif
+ case 't':
+ if (m_buffer[m_ptr+1] == 'y' &&
+ m_buffer[m_ptr+2] == 'p' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'd' &&
+ m_buffer[m_ptr+5] == 'e' &&
+ m_buffer[m_ptr+6] == 'f')
+ {
+ *kind = Token_typedef;
+ return;
+ }
+ break;
+
+ case 'v':
+ if (m_buffer[m_ptr+1] == 'i' &&
+ m_buffer[m_ptr+2] == 'r' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'u' &&
+ m_buffer[m_ptr+5] == 'a' &&
+ m_buffer[m_ptr+6] == 'l')
+ {
+ *kind = Token_virtual;
+ return;
+ }
+ break;
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword8(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case '_':
+ if (m_buffer[m_ptr+1] == '_' &&
+ m_buffer[m_ptr+2] == 't' &&
+ m_buffer[m_ptr+3] == 'y' &&
+ m_buffer[m_ptr+4] == 'p' &&
+ m_buffer[m_ptr+5] == 'e' &&
+ m_buffer[m_ptr+6] == 'o' &&
+ m_buffer[m_ptr+7] == 'f')
+ {
+ *kind = Token___typeof;
+ return;
+ }
+ break;
+
+ case 'c':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'n' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'n' &&
+ m_buffer[m_ptr+6] == 'u' &&
+ m_buffer[m_ptr+7] == 'e')
+ {
+ *kind = Token_continue;
+ return;
+ }
+ break;
+
+ case 'e':
+ if (m_buffer[m_ptr+1] == 'x' &&
+ m_buffer[m_ptr+2] == 'p' &&
+ m_buffer[m_ptr+3] == 'l' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'c' &&
+ m_buffer[m_ptr+6] == 'i' &&
+ m_buffer[m_ptr+7] == 't')
+ {
+ *kind = Token_explicit;
+ return;
+ }
+ break;
+
+ case 'o':
+ if (m_buffer[m_ptr+1] == 'p' &&
+ m_buffer[m_ptr+2] == 'e' &&
+ m_buffer[m_ptr+3] == 'r' &&
+ m_buffer[m_ptr+4] == 'a' &&
+ m_buffer[m_ptr+5] == 't' &&
+ m_buffer[m_ptr+6] == 'o' &&
+ m_buffer[m_ptr+7] == 'r')
+ {
+ *kind = Token_operator;
+ return;
+ }
+ break;
+
+ case 'Q':
+ if (m_buffer[m_ptr+1] == '_' &&
+ m_buffer[m_ptr+2] == 'O' &&
+ m_buffer[m_ptr+3] == 'B' &&
+ m_buffer[m_ptr+4] == 'J' &&
+ m_buffer[m_ptr+5] == 'E' &&
+ m_buffer[m_ptr+6] == 'C' &&
+ m_buffer[m_ptr+7] == 'T')
+ {
+ *kind = Token_Q_OBJECT;
+ return;
+ }
+ break;
+
+ case 'r':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'g' &&
+ m_buffer[m_ptr+3] == 'i' &&
+ m_buffer[m_ptr+4] == 's' &&
+ m_buffer[m_ptr+5] == 't' &&
+ m_buffer[m_ptr+6] == 'e' &&
+ m_buffer[m_ptr+7] == 'r')
+ {
+ *kind = Token_register;
+ return;
+ }
+ break;
+
+ case 'u':
+ if (m_buffer[m_ptr+1] == 'n' &&
+ m_buffer[m_ptr+2] == 's' &&
+ m_buffer[m_ptr+3] == 'i' &&
+ m_buffer[m_ptr+4] == 'g' &&
+ m_buffer[m_ptr+5] == 'n' &&
+ m_buffer[m_ptr+6] == 'e' &&
+ m_buffer[m_ptr+7] == 'd')
+ {
+ *kind = Token_unsigned;
+ return;
+ }
+ break;
+
+ case 't':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'm' &&
+ m_buffer[m_ptr+3] == 'p' &&
+ m_buffer[m_ptr+4] == 'l' &&
+ m_buffer[m_ptr+5] == 'a' &&
+ m_buffer[m_ptr+6] == 't' &&
+ m_buffer[m_ptr+7] == 'e')
+ {
+ *kind = Token_template;
+ return;
+ }
+ if (m_buffer[m_ptr+1] == 'y' &&
+ m_buffer[m_ptr+2] == 'p' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 'n' &&
+ m_buffer[m_ptr+5] == 'a' &&
+ m_buffer[m_ptr+6] == 'm' &&
+ m_buffer[m_ptr+7] == 'e')
+ {
+ *kind = Token_typename;
+ return;
+ }
+ break;
+
+ case 'v':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'l' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 't' &&
+ m_buffer[m_ptr+5] == 'i' &&
+ m_buffer[m_ptr+6] == 'l' &&
+ m_buffer[m_ptr+7] == 'e')
+ {
+ *kind = Token_volatile;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword9(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'p':
+ if (m_buffer[m_ptr+1] == 'r' &&
+ m_buffer[m_ptr+2] == 'o' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'e' &&
+ m_buffer[m_ptr+5] == 'c' &&
+ m_buffer[m_ptr+6] == 't' &&
+ m_buffer[m_ptr+7] == 'e' &&
+ m_buffer[m_ptr+8] == 'd')
+ {
+ *kind = Token_protected;
+ return;
+ }
+ break;
+
+ case 'n':
+ if (m_buffer[m_ptr+1] == 'a' &&
+ m_buffer[m_ptr+2] == 'm' &&
+ m_buffer[m_ptr+3] == 'e' &&
+ m_buffer[m_ptr+4] == 's' &&
+ m_buffer[m_ptr+5] == 'p' &&
+ m_buffer[m_ptr+6] == 'a' &&
+ m_buffer[m_ptr+7] == 'c' &&
+ m_buffer[m_ptr+8] == 'e')
+ {
+ *kind = Token_namespace;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword10(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'c':
+ if (m_buffer[m_ptr+1] == 'o' &&
+ m_buffer[m_ptr+2] == 'n' &&
+ m_buffer[m_ptr+3] == 's' &&
+ m_buffer[m_ptr+4] == 't' &&
+ m_buffer[m_ptr+5] == '_' &&
+ m_buffer[m_ptr+6] == 'c' &&
+ m_buffer[m_ptr+7] == 'a' &&
+ m_buffer[m_ptr+8] == 's' &&
+ m_buffer[m_ptr+9] == 't')
+ {
+ *kind = Token_const_cast;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword11(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 's':
+ if (m_buffer[m_ptr+1] == 't' &&
+ m_buffer[m_ptr+2] == 'a' &&
+ m_buffer[m_ptr+3] == 't' &&
+ m_buffer[m_ptr+4] == 'i' &&
+ m_buffer[m_ptr+5] == 'c' &&
+ m_buffer[m_ptr+6] == '_' &&
+ m_buffer[m_ptr+7] == 'c' &&
+ m_buffer[m_ptr+8] == 'a' &&
+ m_buffer[m_ptr+9] == 's' &&
+ m_buffer[m_ptr+10] == 't')
+ {
+ *kind = Token_static_cast;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword12(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'd':
+ if (m_buffer[m_ptr+1] == 'y' &&
+ m_buffer[m_ptr+2] == 'n' &&
+ m_buffer[m_ptr+3] == 'a' &&
+ m_buffer[m_ptr+4] == 'm' &&
+ m_buffer[m_ptr+5] == 'i' &&
+ m_buffer[m_ptr+6] == 'c' &&
+ m_buffer[m_ptr+7] == '_' &&
+ m_buffer[m_ptr+8] == 'c' &&
+ m_buffer[m_ptr+9] == 'a' &&
+ m_buffer[m_ptr+10] == 's' &&
+ m_buffer[m_ptr+11] == 't')
+ {
+ *kind = Token_dynamic_cast;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword14(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'k':
+ if (m_buffer[m_ptr+1] == '_' &&
+ m_buffer[m_ptr+2] == 'd' &&
+ m_buffer[m_ptr+3] == 'c' &&
+ m_buffer[m_ptr+4] == 'o' &&
+ m_buffer[m_ptr+5] == 'p' &&
+ m_buffer[m_ptr+6] == '_' &&
+ m_buffer[m_ptr+7] == 's' &&
+ m_buffer[m_ptr+8] == 'i' &&
+ m_buffer[m_ptr+9] == 'g' &&
+ m_buffer[m_ptr+10] == 'n' &&
+ m_buffer[m_ptr+11] == 'a' &&
+ m_buffer[m_ptr+12] == 'l' &&
+ m_buffer[m_ptr+13] == 's')
+ {
+ *kind = Token_k_dcop_signals;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+void CppLexer::scanKeyword16(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case 'r':
+ if (m_buffer[m_ptr+1] == 'e' &&
+ m_buffer[m_ptr+2] == 'i' &&
+ m_buffer[m_ptr+3] == 'n' &&
+ m_buffer[m_ptr+4] == 't' &&
+ m_buffer[m_ptr+5] == 'e' &&
+ m_buffer[m_ptr+6] == 'r' &&
+ m_buffer[m_ptr+7] == 'p' &&
+ m_buffer[m_ptr+8] == 'r' &&
+ m_buffer[m_ptr+9] == 'e' &&
+ m_buffer[m_ptr+10] == 't' &&
+ m_buffer[m_ptr+11] == '_' &&
+ m_buffer[m_ptr+12] == 'c' &&
+ m_buffer[m_ptr+13] == 'a' &&
+ m_buffer[m_ptr+14] == 's' &&
+ m_buffer[m_ptr+15] == 't')
+ {
+ *kind = Token_reinterpret_cast;
+ return;
+ }
+ break;
+
+ }
+ *kind = Token_identifier;
+}
+
+
+
+void CppLexer::scanChar(int *kind)
+{
+ *kind = m_buffer[m_ptr++];
+}
+
+void CppLexer::scanWhiteSpaces(int *kind)
+{
+ *kind = Token_whitespaces;
+}
+
+void CppLexer::scanNewline(int *kind)
+{
+ *kind = '\n';
+}
+
+void CppLexer::scanUnicodeChar(int *kind)
+{
+ *kind = m_buffer[0];
+}
+
+void CppLexer::scanCharLiteral(int *kind)
+{
+ *kind = Token_char_literal;
+}
+
+void CppLexer::scanStringLiteral(int *kind)
+{
+ *kind = Token_string_literal;
+}
+
+void CppLexer::scanIdentifier(int *kind)
+{
+ if (m_len <16)
+ (this->*s_scan_keyword_table[m_len])(kind);
+ else
+ (this->*s_scan_keyword_table[0])(kind);
+}
+
+void CppLexer::scanNumberLiteral(int *kind)
+{
+ *kind = Token_number_literal;
+}
+
+void CppLexer::scanOperator(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case ':':
+ if (m_buffer[m_ptr+1] == ':') {
+ *kind = Token_scope;
+ return;
+ }
+ break;
+
+ case '*':
+ case '/':
+ case '%':
+ case '^':
+ if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '=':
+ case '!':
+ if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_eq;
+ return;
+ }
+ break;
+
+ case '&':
+ if (m_buffer[m_ptr+1] == '&') {
+ *kind = Token_and;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '|':
+ if (m_buffer[m_ptr+1] == '|' ) {
+ *kind = Token_or;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '+':
+ if (m_buffer[m_ptr+1] == '+' ) {
+ *kind = Token_incr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '<':
+ if (m_buffer[m_ptr+1] == '<') {
+ if (m_buffer[m_ptr+2] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ *kind = Token_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_leq;
+ return;
+ }
+ break;
+
+ case '>':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ *kind = Token_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_geq;
+ return;
+ }
+ break;
+
+ case '-':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '*') {
+ *kind = Token_ptrmem;
+ return;
+ }
+ *kind = Token_arrow;
+ return;
+ } else if (m_buffer[m_ptr+1] == '-') {
+ *kind = Token_decr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '.':
+ if (m_buffer[m_ptr+1] == '.' && m_buffer[m_ptr+2] == '.') {
+ *kind = Token_ellipsis;
+ return;
+ } else if (m_buffer[m_ptr+1] == '*') {
+ *kind = Token_ptrmem;
+ return;
+ }
+ break;
+
+ }
+
+ *kind = m_buffer[m_ptr++];
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/cpplexer.h b/tools/porting/src/cpplexer.h
new file mode 100644
index 0000000..ae84f1d
--- /dev/null
+++ b/tools/porting/src/cpplexer.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CPPLEXER_H
+#define CPPLEXER_H
+
+#include "tokenengine.h"
+#include "tokens.h"
+#include <QVector>
+
+QT_BEGIN_NAMESPACE
+
+class CppLexer
+{
+public:
+ CppLexer();
+ typedef void (CppLexer::*scan_fun_ptr)(int *kind);
+ QVector<Type> lex(TokenEngine::TokenSectionSequence tokenContainer);
+private:
+ Type identify(const TokenEngine::TokenTempRef &tokenTempRef);
+ void setupScanTable();
+
+ void scanChar(int *kind);
+ void scanUnicodeChar(int *kind);
+ void scanNewline(int *kind);
+ void scanWhiteSpaces(int *kind);
+ void scanCharLiteral(int *kind);
+ void scanStringLiteral(int *kind);
+ void scanNumberLiteral(int *kind);
+ void scanIdentifier(int *kind);
+ void scanPreprocessor(int *kind);
+ void scanOperator(int *kind);
+
+ void scanKeyword0(int *kind);
+ void scanKeyword2(int *kind);
+ void scanKeyword3(int *kind);
+ void scanKeyword4(int *kind);
+ void scanKeyword5(int *kind);
+ void scanKeyword6(int *kind);
+ void scanKeyword7(int *kind);
+ void scanKeyword8(int *kind);
+ void scanKeyword9(int *kind);
+ void scanKeyword10(int *kind);
+ void scanKeyword11(int *kind);
+ void scanKeyword12(int *kind);
+ void scanKeyword14(int *kind);
+ void scanKeyword16(int *kind);
+
+ CppLexer::scan_fun_ptr s_scan_table[128+1];
+ int s_attr_table[256];
+ CppLexer::scan_fun_ptr s_scan_keyword_table[17];
+
+ enum
+ {
+ A_Alpha = 0x01,
+ A_Digit = 0x02,
+ A_Alphanum = A_Alpha | A_Digit,
+ A_Whitespace = 0x04
+ };
+
+ const char *m_buffer;
+ int m_ptr;
+ int m_len;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/errors.cpp b/tools/porting/src/errors.cpp
new file mode 100644
index 0000000..76292c9
--- /dev/null
+++ b/tools/porting/src/errors.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "errors.h"
+
+QT_BEGIN_NAMESPACE
+
+QT_STATIC_CONST_IMPL Error& Errors::InternalError = Error( 1, -1, QLatin1String("Internal Error") );
+QT_STATIC_CONST_IMPL Error& Errors::SyntaxError = Error( 2, -1, QLatin1String("Syntax Error before '%1'") );
+QT_STATIC_CONST_IMPL Error& Errors::ParseError = Error( 3, -1, QLatin1String("Parse Error before '%1'") );
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/errors.h b/tools/porting/src/errors.h
new file mode 100644
index 0000000..11c2376
--- /dev/null
+++ b/tools/porting/src/errors.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ERRORS_H
+#define ERRORS_H
+
+#include <QString>
+
+QT_BEGIN_NAMESPACE
+
+class Error
+{
+public:
+ int code;
+ int level;
+ QString text;
+
+ inline Error(int c, int l, const QString &s)
+ : code(c), level(l), text(s) {}
+};
+
+class Errors
+{
+public:
+ QT_STATIC_CONST Error& InternalError;
+ QT_STATIC_CONST Error& SyntaxError;
+ QT_STATIC_CONST Error& ParseError;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/fileporter.cpp b/tools/porting/src/fileporter.cpp
new file mode 100644
index 0000000..9a5a458
--- /dev/null
+++ b/tools/porting/src/fileporter.cpp
@@ -0,0 +1,369 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "preprocessorcontrol.h"
+#include "fileporter.h"
+#include "replacetoken.h"
+#include "logger.h"
+#include "tokenizer.h"
+#include "filewriter.h"
+#include <QFile>
+#include <QDir>
+#include <QFileInfo>
+#include <QHash>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+using namespace Rpp;
+
+FilePorter::FilePorter(PreprocessorCache &preprocessorCache)
+:preprocessorCache(preprocessorCache)
+,tokenReplacementRules(PortingRules::instance()->getTokenReplacementRules())
+,headerReplacements(PortingRules::instance()->getHeaderReplacements())
+,replaceToken(tokenReplacementRules)
+{
+ foreach (const QString &headerName, PortingRules::instance()->getHeaderList(PortingRules::Qt4)) {
+ qt4HeaderNames.insert(headerName.toLatin1());
+ }
+}
+
+/*
+ Ports a file given by fileName, which should be an absolute file path.
+*/
+void FilePorter::port(QString fileName)
+{
+ // Get file tokens from cache.
+ TokenContainer sourceTokens = preprocessorCache.sourceTokens(fileName);
+ if(sourceTokens.count() == 0)
+ return;
+
+ Logger::instance()->beginSection();
+
+ // Get include directive replacements.
+ const Rpp::Source * source = preprocessorCache.sourceTree(fileName);
+ PreprocessReplace preprocessReplace(source, PortingRules::instance()->getHeaderReplacements());
+ TextReplacements sourceReplacements = preprocessReplace.getReplacements();
+
+ // Get token replacements.
+ sourceReplacements += replaceToken.getTokenTextReplacements(sourceTokens);
+
+ // Apply the replacements to the source text.
+ QByteArray portedContents = sourceReplacements.apply(sourceTokens.fullText());
+
+ // Add include directives for classes that are no longer implicitly
+ // included via other headers. This step needs to be done after the token
+ // replacements, since we need to know which new class names that has been
+ // inserted in the source.
+ portedContents = includeAnalyse(portedContents);
+
+ // Check if any changes has been made.
+ if(portedContents == sourceTokens.fullText()) {
+ Logger::instance()->addEntry(
+ new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), QLatin1String("No changes made to file ") + fileName));
+ Logger::instance()->commitSection();
+ return;
+ }
+
+ // Write file, commit log if write was successful.
+ FileWriter::WriteResult result = FileWriter::instance()->writeFileVerbously(fileName, portedContents);
+ Logger *logger = Logger::instance();
+ if (result == FileWriter::WriteSucceeded) {
+ logger->commitSection();
+ } else if (result == FileWriter::WriteFailed) {
+ logger->revertSection();
+ logger->addEntry(
+ new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), QLatin1String("Error writing to file ") + fileName));
+ } else if (result == FileWriter::WriteSkipped) {
+ logger->revertSection();
+ logger->addEntry(
+ new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), QLatin1String("User skipped file ") + fileName));
+ } else {
+ // Internal error.
+ logger->revertSection();
+ const QString errorString = QLatin1String("Internal error in qt3to4 - FileWriter returned invalid result code while writing to ") + fileName;
+ logger->addEntry(new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), errorString));
+ }
+}
+
+QSet<QByteArray> FilePorter::usedQtModules()
+{
+ return m_usedQtModules;
+}
+
+TextReplacements FilePorter::includeDirectiveReplacements()
+{
+ return TextReplacements();
+}
+
+QByteArray FilePorter::includeAnalyse(QByteArray fileContents)
+{
+ // Tokenize file contents agein, since it has changed.
+ QVector<TokenEngine::Token> tokens = tokenizer.tokenize(fileContents);
+ TokenEngine::TokenContainer tokenContainer(fileContents, tokens);
+ IncludeDirectiveAnalyzer includeDirectiveAnalyzer(tokenContainer);
+
+ // Get list of used classes.
+ QSet<QByteArray> classes = includeDirectiveAnalyzer.usedClasses();
+
+ // Iterate class list and find which modules are used. This info is used elswhere
+ // by when porting the .pro file.
+ const QHash<QByteArray, QByteArray> classLibraryList = PortingRules::instance()->getClassLibraryList();
+ foreach (const QByteArray &className, classes) {
+ m_usedQtModules.insert(classLibraryList.value(className));
+ }
+
+ // Get list of included headers.
+ QSet<QByteArray> headers = includeDirectiveAnalyzer.includedHeaders();
+
+ // Find classes that is missing an include directive and that has a needHeader rule.
+ const QHash<QByteArray, QByteArray> neededHeaders = PortingRules::instance()->getNeededHeaders();
+ QList<QByteArray> insertHeaders;
+ foreach (const QByteArray &className, classes) {
+ if (!headers.contains((className.toLower() + QByteArray(".h"))) &&
+ !headers.contains(className)) {
+ const QByteArray insertHeader = neededHeaders.value(className);
+ if (insertHeader != QByteArray())
+ insertHeaders.append((QByteArray("#include <") + insertHeader + QByteArray(">")));
+ }
+ }
+
+ const QByteArray lineEnding = detectLineEndings(fileContents);
+
+ // Insert include directives undeclared classes.
+ int insertCount = insertHeaders.count();
+ if (insertCount > 0) {
+ QByteArray insertText;
+ QByteArray logText;
+
+ insertText += QByteArray("//Added by qt3to4:") + lineEnding;
+ logText += QByteArray("In file ");
+ logText += Logger::instance()->globalState.value(QLatin1String("currentFileName")).toLocal8Bit();
+ logText += QByteArray(": Added the following include directives:\n");
+ foreach (const QByteArray &headerName, insertHeaders) {
+ insertText = insertText + headerName + lineEnding;
+ logText += QByteArray("\t");
+ logText += headerName + QByteArray(" ");
+ }
+
+ const int insertLine = 0;
+ Logger::instance()->updateLineNumbers(insertLine, insertCount + 1);
+ const int insertPos = includeDirectiveAnalyzer.insertPos();
+ fileContents.insert(insertPos, insertText);
+ Logger::instance()->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), QString::fromLatin1(logText.constData())));
+ }
+
+ return fileContents;
+}
+
+PreprocessReplace::PreprocessReplace(const Rpp::Source *source, const QHash<QByteArray, QByteArray> &headerReplacements)
+:headerReplacements(headerReplacements)
+{
+ // Walk preprocessor tree.
+ evaluateItem(source);
+}
+
+TextReplacements PreprocessReplace::getReplacements()
+{
+ return replacements;
+}
+/*
+ Replaces headers no longer present with support headers.
+*/
+void PreprocessReplace::evaluateIncludeDirective(const Rpp::IncludeDirective *directive)
+{
+ const QByteArray headerPathName = directive->filename();
+ const TokenEngine::TokenList headerPathTokens = directive->filenameTokens();
+
+ // Get the file name part of the file path.
+ const QByteArray headerFileName = QFileInfo(QString::fromLatin1(headerPathName.constData())).fileName().toUtf8();
+
+ // Check if we should replace the filename.
+ QByteArray replacement = headerReplacements.value(headerFileName);
+
+ // Also check lower-case version to catch incorrectly capitalized file names on Windows.
+ if (replacement.isEmpty())
+ replacement = headerReplacements.value(headerFileName.toLower());
+
+ const int numTokens = headerPathTokens.count();
+ if (numTokens > 0 && !replacement.isEmpty()) {
+ // Here we assume that the last token contains a part of the file name.
+ const TokenEngine::Token lastToken = headerPathTokens.token(numTokens -1);
+ int endPos = lastToken.start + lastToken.length;
+ // If the file name is specified in quotes, then the quotes will be a part
+ // of the token. Decrement endpos to leave out the ending quote when replacing.
+ if (directive->includeType() == IncludeDirective::QuoteInclude)
+ --endPos;
+ const int length = headerFileName.count();
+ const int startPos = endPos - length;
+ replacements.insert(replacement, startPos, length);
+ addLogSourceEntry(QString::fromLatin1((headerFileName + QByteArray(" -> ") + replacement).constData()),
+ headerPathTokens.tokenContainer(0), headerPathTokens.containerIndex(0));
+ }
+}
+
+/*
+ Replace line comments containing MOC_SKIP_BEGIN with #ifdef Q_MOC_RUN and MOC_SKIP_END with #endif
+*/
+void PreprocessReplace::evaluateText(const Rpp::Text *textLine)
+{
+ if (textLine->count() < 1)
+ return;
+
+ const TokenEngine::TokenContainer container = textLine->text().tokenContainer(0);
+ foreach (Rpp::Token *token, textLine->tokenList()) {
+ if (token->toLineComment()) {
+ const int tokenIndex = token->index();
+ const QByteArray text = container.text(tokenIndex);
+ const TokenEngine::Token containerToken = container.token(tokenIndex);
+
+ if (text.contains(QByteArray("MOC_SKIP_BEGIN"))) {
+ replacements.insert(QByteArray("#ifndef Q_MOC_RUN"), containerToken.start, containerToken.length);
+ addLogSourceEntry(QLatin1String("MOC_SKIP_BEGIN -> #ifndef Q_MOC_RUN"), container, tokenIndex);
+ }
+ if (text.contains(QByteArray("MOC_SKIP_END"))) {
+ replacements.insert(QByteArray("#endif"), containerToken.start, containerToken.length);
+ addLogSourceEntry(QLatin1String("MOC_SKIP_END -> #endif"), container, tokenIndex);
+ }
+ }
+ }
+}
+
+IncludeDirectiveAnalyzer::IncludeDirectiveAnalyzer(const TokenEngine::TokenContainer &fileContents)
+:fileContents(fileContents)
+{
+ const QVector<Type> lexical = RppLexer().lex(fileContents);
+ source = Preprocessor().parse(fileContents, lexical, &mempool);
+ foundInsertPos = false;
+ foundQtHeader = false;
+ ifSectionCount = 0;
+ insertTokenIndex = 0;
+
+ evaluateItem(source);
+}
+
+/*
+ Returns a position indicating where new include directives should be inserted.
+*/
+int IncludeDirectiveAnalyzer::insertPos()
+{
+ const TokenEngine::Token insertToken = fileContents.token(insertTokenIndex);
+ return insertToken.start;
+}
+
+/*
+ Returns a set of all headers included from this file.
+*/
+QSet<QByteArray> IncludeDirectiveAnalyzer::includedHeaders()
+{
+ return m_includedHeaders;
+}
+
+/*
+ Returns a list of used Qt classes.
+*/
+QSet<QByteArray> IncludeDirectiveAnalyzer::usedClasses()
+{
+ return m_usedClasses;
+}
+
+/*
+ Set insetionTokenindex to a token near other #include directives, preferably
+ just after a block of include directives that includes other Qt headers.
+*/
+void IncludeDirectiveAnalyzer::evaluateIncludeDirective(const IncludeDirective *directive)
+{
+ const QByteArray filename = directive->filename();
+ if (filename.isEmpty())
+ return;
+
+ m_includedHeaders.insert(filename);
+
+ if (foundInsertPos || ifSectionCount > 1)
+ return;
+
+ const bool isQtHeader = (filename.at(0) == 'q' || filename.at(0) == 'Q');
+ if (!isQtHeader && foundQtHeader) {
+ foundInsertPos = true;
+ return;
+ }
+
+ if (isQtHeader)
+ foundQtHeader = true;
+
+ // Get the last token for this directive.
+ TokenEngine::TokenSection tokenSection = directive->text();
+ const int newLineToken = 1;
+ insertTokenIndex = tokenSection.containerIndex(tokenSection.count() - 1) + newLineToken;
+}
+
+/*
+ Avoid inserting inside IfSections, except in the first one
+ we see, which probably is the header multiple inclusion guard.
+*/
+void IncludeDirectiveAnalyzer::evaluateIfSection(const IfSection *ifSection)
+{
+ ++ifSectionCount;
+ RppTreeWalker::evaluateIfSection(ifSection);
+ --ifSectionCount;
+}
+
+/*
+ Read all IdTokens and look for Qt class names. Also, on
+ the first IdToken set foundInsertPos to true
+
+*/
+void IncludeDirectiveAnalyzer::evaluateText(const Text *textLine)
+{
+ const int numTokens = textLine->count();
+ for (int t = 0; t < numTokens; ++t) {
+ Rpp::Token *token = textLine->token(t);
+ if (token->toIdToken()) {
+ foundInsertPos = true;
+ const int containerIndex = token->index();
+ const QByteArray tokenText = fileContents.text(containerIndex);
+ m_usedClasses.insert(tokenText);
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/fileporter.h b/tools/porting/src/fileporter.h
new file mode 100644
index 0000000..000e2fd
--- /dev/null
+++ b/tools/porting/src/fileporter.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILEPORTER_H
+#define FILEPORTER_H
+
+#include "portingrules.h"
+#include "replacetoken.h"
+#include "filewriter.h"
+#include "preprocessorcontrol.h"
+#include <QString>
+#include <QSet>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+
+class FilePorter
+{
+public:
+ FilePorter(PreprocessorCache &preprocessorCache);
+ void port(QString fileName);
+ QSet<QByteArray> usedQtModules();
+private:
+ QByteArray loadFile(const QString &fileName);
+ QByteArray includeAnalyse(QByteArray fileContents);
+ TextReplacements includeDirectiveReplacements();
+
+ PreprocessorCache &preprocessorCache;
+ const QList<TokenReplacement*> tokenReplacementRules;
+ const QHash<QByteArray, QByteArray> headerReplacements;
+
+ ReplaceToken replaceToken;
+ Tokenizer tokenizer; //used by includeAnalyse
+
+ QSet<QByteArray> qt4HeaderNames;
+ QSet<QByteArray> m_usedQtModules;
+};
+
+class PreprocessReplace : public Rpp::RppTreeWalker
+{
+public:
+ PreprocessReplace(const Rpp::Source *source, const QHash<QByteArray, QByteArray> &headerReplacements);
+ TextReplacements getReplacements();
+private:
+ void evaluateIncludeDirective(const Rpp::IncludeDirective *directive);
+ void evaluateText(const Rpp::Text *textLine);
+ const QHash<QByteArray, QByteArray> headerReplacements;
+ TextReplacements replacements;
+
+};
+
+class IncludeDirectiveAnalyzer : public Rpp::RppTreeWalker
+{
+public:
+ IncludeDirectiveAnalyzer(const TokenEngine::TokenContainer &fileContents);
+ int insertPos();
+ QSet<QByteArray> includedHeaders();
+ QSet<QByteArray> usedClasses();
+private:
+ void evaluateIncludeDirective(const Rpp::IncludeDirective *directive);
+ void evaluateIfSection(const Rpp::IfSection *ifSection);
+ void evaluateText(const Rpp::Text *textLine);
+
+ int insertTokenIndex;
+ bool foundInsertPos;
+ bool foundQtHeader;
+ int ifSectionCount;
+
+ const TokenEngine::TokenContainer &fileContents;
+ Rpp::Source *source;
+ TypedPool<Rpp::Item> mempool;
+ QSet<QByteArray> m_includedHeaders;
+ QSet<QByteArray> m_usedClasses;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/filewriter.cpp b/tools/porting/src/filewriter.cpp
new file mode 100644
index 0000000..e1ba0aa
--- /dev/null
+++ b/tools/porting/src/filewriter.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "filewriter.h"
+#include <QFile>
+#include <QFileInfo>
+#include <QDir>
+#include <ctype.h>
+
+QT_BEGIN_NAMESPACE
+
+FileWriter *FileWriter::theInstance = 0;
+
+FileWriter *FileWriter::instance()
+{
+ if(!theInstance)
+ theInstance = new FileWriter();
+
+ return theInstance;
+}
+
+void FileWriter::deleteInstance()
+{
+ if(theInstance) {
+ delete theInstance;
+ theInstance=0;
+ }
+}
+
+FileWriter::FileWriter(OverWriteFiles overWrite, QString overwriteMsg)
+:overWriteFiles(overWrite)
+,overwriteMessage(overwriteMsg)
+{
+ if(overwriteMessage.isEmpty())
+ overwriteMessage = QLatin1String("Convert file ");
+}
+
+FileWriter::WriteResult FileWriter::writeFileVerbously(QString filePath, QByteArray contents)
+{
+ const WriteResult result = writeFile(filePath, contents);
+ if (result == WriteSucceeded) {
+ QString cleanPath = QDir::cleanPath(filePath);
+ printf("Wrote to file: %s \n", QDir::toNativeSeparators(cleanPath).toLocal8Bit().constData());
+ }
+ return result;
+}
+
+FileWriter::WriteResult FileWriter::writeFile(QString filePath, QByteArray contents)
+{
+ if(filePath.isEmpty())
+ return WriteFailed;
+ QString path = QFileInfo(filePath).path();
+ if (!QDir().mkpath(path)){
+ printf("Error creating path %s \n", QDir::toNativeSeparators(path).toLocal8Bit().constData());
+ }
+
+ QString cleanPath = QDir::cleanPath(filePath);
+ QFile f(cleanPath);
+ if (f.exists()) {
+ if (overWriteFiles == DontOverWrite) {
+ printf("Error writing file %s: It already exists \n",
+ QDir::toNativeSeparators(cleanPath).toLatin1().constData());
+ return WriteFailed;
+ } else if(overWriteFiles == AskOnOverWrite) {
+ printf("%s%s? (Y)es, (N)o, (A)ll ", overwriteMessage.toLatin1().constData(),
+ QDir::toNativeSeparators(cleanPath).toLatin1().constData());
+
+ char answer = 0;
+ while (answer != 'y' && answer != 'n' && answer != 'a') {
+#if defined(Q_OS_WIN) && defined(_MSC_VER) && _MSC_VER >= 1400
+ scanf_s("%c", &answer);
+#else
+ scanf("%c", &answer);
+#endif
+ answer = tolower(answer);
+ }
+
+ if(answer == 'n')
+ return WriteSkipped;
+ else if(answer == 'a')
+ overWriteFiles=AlwaysOverWrite;
+ }
+ }
+
+ f.open(QFile::WriteOnly);
+ if (f.isOpen() && f.write(contents) == contents.size())
+ return WriteSucceeded;
+
+ printf("Could not write to to file: %s. Is it write protected?\n",
+ QDir::toNativeSeparators(filePath).toLatin1().constData());
+
+ return WriteFailed;
+}
+
+/*
+ Sets the write mode for the file writer. writeMode is one of
+ DontOverWrite, AlwaysOverWrite, AskOnOverWrite.
+*/
+void FileWriter::setOverwriteFiles(OverWriteFiles writeMode)
+{
+ overWriteFiles = writeMode;
+}
+
+QByteArray detectLineEndings(const QByteArray &array)
+{
+ if (array.contains("\r\n")) {
+ return "\r\n";
+ } else {
+ return "\n";
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/filewriter.h b/tools/porting/src/filewriter.h
new file mode 100644
index 0000000..a58e8e0
--- /dev/null
+++ b/tools/porting/src/filewriter.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILEWRITER_H
+#define FILEWRITER_H
+
+#include <QMap>
+#include <QString>
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+class FileWriter
+{
+public:
+ enum OverWriteFiles{DontOverWrite, AlwaysOverWrite, AskOnOverWrite};
+ enum WriteResult { WriteFailed = 0, WriteSucceeded = 1, WriteSkipped };
+ static FileWriter *instance();
+ static void deleteInstance();
+
+ FileWriter(OverWriteFiles overWRite = AskOnOverWrite,
+ QString overwriteMessage = QString());
+ WriteResult writeFile(QString filePath, QByteArray contents);
+ WriteResult writeFileVerbously(QString filePath, QByteArray contents);
+ void setOverwriteFiles(OverWriteFiles writeMode);
+private:
+ QMap<QString, int> processedFilesSet;
+ OverWriteFiles overWriteFiles;
+ QString overwriteMessage;
+ static FileWriter *theInstance;
+};
+
+QByteArray detectLineEndings(const QByteArray &array);
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/list.h b/tools/porting/src/list.h
new file mode 100644
index 0000000..0021f25
--- /dev/null
+++ b/tools/porting/src/list.h
@@ -0,0 +1,374 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LIST_H
+#define LIST_H
+
+#include "smallobject.h"
+#include <QtGlobal>
+
+QT_BEGIN_NAMESPACE
+
+template <typename T>
+class List
+{
+ struct Data
+ {
+ int alloc, size;
+ T array[1];
+ };
+ pool *p;
+ Data *d;
+
+public:
+ inline List(pool *_pool) : p(_pool), d(0) { d = malloc(16); d->size = 0; d->alloc = 16; }
+
+ inline List(const List &v) : d(0) { operator=(v); }
+ inline ~List() { d = 0; }
+ List &operator=(const List &v);
+
+ bool operator==(const List &v) const;
+ inline bool operator!=(const List &v) const { return !(*this == v); }
+
+ inline int size() const { return d->size; }
+ inline bool isEmpty() const { return d->size == 0; }
+
+ inline int capacity() const { return d->alloc; }
+ void reserve(int alloc);
+
+ inline T* data() { return d->array; }
+ inline const T* data() const { return d->array; }
+ void clear();
+
+ const T &at(int i) const;
+ T &operator[](int i);
+ const T &operator[](int i) const;
+ void append(const T &t);
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void insert(int i, int n, const T &t);
+ void replace(int i, const T &t);
+ void remove(int i);
+ void remove(int i, int n);
+
+ List &fill(const T &t, int size = -1);
+
+ int indexOf(const T &t, int from = 0) const;
+ int lastIndexOf(const T &t, int from = -1) const;
+ bool contains(const T &t) const;
+ int count(const T &t) const;
+
+ // STL-style
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ inline iterator begin() { return d->array; }
+ inline const_iterator begin() const { return d->array; }
+ inline iterator end() { return d->array + d->size; }
+ inline const_iterator end() const { return d->array + d->size; }
+ iterator insert(iterator before, int n, const T &x);
+ inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(iterator begin, iterator end);
+ inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+
+ // more Qt
+ inline int count() const { return d->size; }
+ inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); }
+ inline const T& first() const { Q_ASSERT(!isEmpty()); return *begin(); }
+ inline T& last() { Q_ASSERT(!isEmpty()); return *(end()-1); }
+ inline const T& last() const { Q_ASSERT(!isEmpty()); return *(end()-1); }
+
+ T value(int i) const;
+ T value(int i, const T &defaultValue) const;
+
+ // STL compatibility
+ typedef T value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ typedef int size_type;
+ inline void push_back(const T &t) { append(t); }
+ inline void push_front(const T &t) { prepend(t); }
+ void pop_back() { Q_ASSERT(!isEmpty()); erase(end()-1); }
+ void pop_front() { Q_ASSERT(!isEmpty()); erase(begin()); }
+ inline bool empty() const
+ { return d->size == 0; }
+ inline T& front() { return first(); }
+ inline const_reference front() const { return first(); }
+ inline reference back() { return last(); }
+ inline const_reference back() const { return last(); }
+
+ //comfort
+ List &operator+=(const List &l);
+ inline List operator+(const List &l) const
+ { List n = *this; n += l; return n; }
+ inline void operator+=(const T &t)
+ { append(t); }
+ inline List &operator<< (const T &t)
+ { append(t); return *this; }
+
+private:
+ Data *malloc(int alloc);
+};
+
+template <typename T>
+inline void List<T>::clear()
+{ d->size = 0; }
+
+template <typename T>
+inline const T &List<T>::at(int i) const
+{ Q_ASSERT_X(i >= 0 && i < d->size, "List<T>::at", "index out of range");
+ return d->array[i]; }
+template <typename T>
+inline const T &List<T>::operator[](int i) const
+{ Q_ASSERT_X(i >= 0 && i < d->size, "List<T>::operator[]", "index out of range");
+ return d->array[i]; }
+template <typename T>
+inline T &List<T>::operator[](int i)
+{ Q_ASSERT_X(i >= 0 && i < d->size, "List<T>::operator[]", "index out of range");
+ return d->array[i]; }
+template <typename T>
+inline void List<T>::insert(int i, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= d->size, "List<T>::insert", "index out of range");
+ insert(begin()+i, 1, t); }
+template <typename T>
+inline void List<T>::insert(int i, int n, const T &t)
+{ Q_ASSERT_X(i >= 0 && i <= d->size, "List<T>::insert", "index out of range");
+ insert(begin() + i, n, t); }
+template <typename T>
+inline void List<T>::remove(int i, int n)
+{ Q_ASSERT_X(i >= 0 && i + n <= d->size, "List<T>::remove", "index out of range");
+ erase(begin() + i, begin() + i + n); }
+template <typename T>
+inline void List<T>::remove(int i)
+{ Q_ASSERT_X(i >= 0 && i < d->size, "List<T>::remove", "index out of range");
+ erase(begin() + i, begin() + i + 1); }
+template <typename T>
+inline void List<T>::prepend(const T &t)
+{ insert(begin(), 1, t); }
+template <typename T>
+inline void List<T>::replace(int i, const T &t)
+{ Q_ASSERT_X(i >= 0 && i < d->size, "List<T>::replace", "index out of range");
+ data()[i] = t; }
+
+template <typename T>
+List<T> &List<T>::operator=(const List<T> &v)
+{
+ p = v.p;
+ d = malloc(v.d->alloc);
+ memcpy(d, v.d, sizeof(Data) + (v.d->size - 1) * sizeof(T));
+ return *this;
+}
+
+template <typename T>
+inline typename List<T>::Data *List<T>::malloc(int alloc)
+{
+ return static_cast<Data *>(p->allocate(sizeof(Data) + (alloc - 1) * sizeof(T)));
+}
+
+template <typename T>
+void List<T>::reserve(int alloc)
+{
+ if (alloc <= d->alloc)
+ return;
+ alloc <<= 2;
+ d = static_cast<Data *>(p->reallocate(d, sizeof(Data) + d->alloc * sizeof(T),
+ sizeof(Data) + (alloc - 1) * sizeof(T)));
+ d->alloc = alloc;
+}
+
+template<typename T>
+T List<T>::value(int i) const
+{
+ if(i < 0 || i >= d->size) {
+ return T();
+ }
+ return d->array[i];
+}
+template<typename T>
+T List<T>::value(int i, const T& defaultValue) const
+{
+ return ((i < 0 || i >= d->size) ? defaultValue : d->array[i]);
+}
+
+template <typename T>
+void List<T>::append(const T &t)
+{
+ reserve(d->size + 1);
+ d->array[d->size++] = t;
+}
+
+
+template <typename T>
+typename List<T>::iterator List<T>::insert(iterator before, size_type n, const T& t)
+{
+ int p = before - d->array;
+ if (n != 0) {
+ reserve(d->size + n);
+ T *b = d->array+p;
+ T *i = b+n;
+ memmove(i, b, (d->size-p)*sizeof(T));
+ while (i != b)
+ *(--i) = t;
+ }
+ d->size += n;
+ return d->array+p;
+}
+
+template <typename T>
+typename List<T>::iterator List<T>::erase(iterator begin, iterator end)
+{
+ int f = begin - d->array;
+ int l = end - d->array;
+ int n = l - f;
+ memmove(d->array + f, d->array + l, (d->size-l)*sizeof(T));
+ d->size -= n;
+ return d->array + f;
+}
+
+template <typename T>
+bool List<T>::operator==(const List<T> &v) const
+{
+ if (d->size != v.d->size)
+ return false;
+ T* b = d->array;
+ T* i = b + d->size;
+ T* j = v.d->array + d->size;
+ while (i != b)
+ if (!(*--i == *--j))
+ return false;
+ return true;
+}
+
+template <typename T>
+List<T> &List<T>::fill(const T &t, int size)
+{
+ resize(size < 0 ? d->size : size);
+ if (d->size) {
+ T* i = d->array + d->size;
+ T* b = d->array;
+ while (i != b)
+ *--i = t;
+ }
+ return *this;
+}
+
+template <typename T>
+List<T> &List<T>::operator+=(const List &l)
+{
+ int newSize = d->size + l.d->size;
+ reserve(newSize);
+
+ T *w = d->array + newSize;
+ T *i = l.d->array + l.d->size;
+ T *b = l.d->array;
+ while (i != b)
+ *--w = *--i;
+ d->size = newSize;
+ return *this;
+}
+
+template <typename T>
+int List<T>::indexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from = qMax(from + d->size, 0);
+ if (from < d->size) {
+ T* n = d->array + from - 1;
+ T* e = d->array + d->size;
+ while (++n != e)
+ if (*n == t)
+ return n - d->array;
+ }
+ return -1;
+}
+
+template <typename T>
+int List<T>::lastIndexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from += d->size;
+ else if (from >= d->size)
+ from = d->size-1;
+ if (from >= 0) {
+ T* b = d->array;
+ T* n = d->array + from + 1;
+ while (n != b) {
+ if (*--n == t)
+ return n - b;
+ }
+ }
+ return -1;
+}
+
+template <typename T>
+bool List<T>::contains(const T &t) const
+{
+ T* b = d->array;
+ T* i = d->array + d->size;
+ while (i != b)
+ if (*--i == t)
+ return true;
+ return false;
+}
+
+template <typename T>
+int List<T>::count(const T &t) const
+{
+ int c = 0;
+ T* b = d->array;
+ T* i = d->array + d->size;
+ while (i != b)
+ if (*--i == t)
+ ++c;
+ return c;
+}
+
+QT_END_NAMESPACE
+
+#endif // LIST_H
diff --git a/tools/porting/src/logger.cpp b/tools/porting/src/logger.cpp
new file mode 100644
index 0000000..fb44de7
--- /dev/null
+++ b/tools/porting/src/logger.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "logger.h"
+#include <QFile>
+#include <QDateTime>
+
+QT_BEGIN_NAMESPACE
+
+LogEntry::LogEntry(QString type, QString location)
+:type(type), location(location)
+{}
+
+PlainLogEntry::PlainLogEntry(QString type, QString location, QString text)
+:LogEntry(type, location), text(text)
+{}
+
+SourcePointLogEntry::SourcePointLogEntry(QString type, QString location, QString file, int line, int column, QString text)
+:LogEntry(type, location), file(file), line(line), column(column), text(text)
+{}
+
+QString SourcePointLogEntry::description() const
+{
+ return QLatin1String("In file ") + file +
+ QLatin1String(" at line ") + QString(QLatin1String("%1")).arg(line + 1) + //line count is zero based, adjust here.
+ QLatin1String(" column ") + QString(QLatin1String("%1")).arg(column) +
+ QLatin1String(": ") + text ;
+}
+
+void SourcePointLogEntry::updateLinePos(int threshold, int delta)
+{
+ if (line >= threshold)
+ line += delta;
+}
+
+/////////////////////////////////////////////////////
+
+
+Logger::~Logger()
+{
+ qDeleteAll(logEntries);
+}
+
+Logger *Logger::theInstance = 0;
+Logger *Logger::instance()
+{
+ if(!theInstance)
+ theInstance = new Logger();
+ return theInstance;
+}
+
+void Logger::deleteInstance()
+{
+ if(theInstance)
+ delete theInstance;
+}
+
+void Logger::addEntry(LogEntry *entry)
+{
+ Q_ASSERT(entry);
+ pendingLogEntries.append(entry);
+}
+
+void Logger::beginSection()
+{
+ commitSection();
+}
+
+void Logger::commitSection()
+{
+ logEntries += pendingLogEntries;
+ pendingLogEntries.clear();
+}
+
+void Logger::revertSection()
+{
+ qDeleteAll(pendingLogEntries);
+ pendingLogEntries.clear();
+}
+
+int Logger::numEntries()
+{
+ commitSection();
+ return logEntries.size();
+}
+
+QStringList Logger::fullReport()
+{
+ commitSection();
+ QStringList report;
+ report << QLatin1String("Log for qt3to4 on ") + QDateTime::currentDateTime().toString() +
+ QLatin1String(". Number of log entries: ") + QString(QLatin1String("%1")).arg(logEntries.size());
+ foreach(LogEntry *logEntry, logEntries) {
+ report << logEntry->description();
+ }
+ return report;
+}
+
+/*
+ Update the line for all SourcePointLogEntrys in the list of pending log
+ entries located on or after insertLine.
+*/
+void Logger::updateLineNumbers(int insertLine, int numLines)
+{
+ foreach(LogEntry *logEntry, pendingLogEntries) {
+ logEntry->updateLinePos(insertLine, numLines);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/logger.h b/tools/porting/src/logger.h
new file mode 100644
index 0000000..20e7dd5
--- /dev/null
+++ b/tools/porting/src/logger.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LOGGER_H
+#define LOGGER_H
+
+#include <QString>
+#include <QStringList>
+#include <QList>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+/*
+ Base class for logger entries;
+ description() should return a text for this entry,
+*/
+class LogEntry
+{
+public:
+ LogEntry(QString type, QString location);
+ virtual ~LogEntry(){};
+ virtual QString description() const =0;
+ virtual void updateLinePos(int threshold, int delta) {Q_UNUSED(threshold); Q_UNUSED(delta)};
+protected:
+ QString type; // Error, Warning, Info, etc
+ QString location;// preprocessor, c++parser, porting, etc
+};
+
+class PlainLogEntry: public LogEntry
+{
+public:
+ PlainLogEntry(QString type, QString lcation, QString text);
+ QString description() const {return text;};
+protected:
+ QString text;
+};
+
+/*
+ A log entry that stores a source point: file, line and column.
+*/
+class SourcePointLogEntry : public LogEntry
+{
+public:
+ SourcePointLogEntry(QString type, QString location, QString file, int line, int column, QString text);
+ QString description() const;
+ void updateLinePos(int threshold, int delta);
+protected:
+ QString file;
+ int line;
+ int column;
+ QString text;
+};
+
+
+class Logger
+{
+public:
+ Logger(){};
+ ~Logger();
+ static Logger *instance();
+ static void deleteInstance();
+
+ void beginSection();
+ void commitSection();
+ void revertSection();
+ void addEntry(LogEntry *entry);
+
+ QStringList fullReport();
+ int numEntries();
+ void updateLineNumbers(int insertLine, int numLines);
+ /*
+ glabalState can be used for storage of application state
+ together with the logger. This can be useful in some cases,
+ for example the current filename is stored here when processing
+ files.
+ */
+ QMap<QString, QString> globalState;
+private:
+ static Logger *theInstance;
+ QList<LogEntry*> logEntries;
+ QList<LogEntry*> pendingLogEntries;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/parser.cpp b/tools/porting/src/parser.cpp
new file mode 100644
index 0000000..a903ece
--- /dev/null
+++ b/tools/porting/src/parser.cpp
@@ -0,0 +1,4526 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "parser.h"
+#include "tokens.h"
+#include "errors.h"
+
+#include <QString>
+#include <QStringList>
+#include <QDateTime>
+
+QT_BEGIN_NAMESPACE
+
+#define TT (tokenStream->currentTokenText().data())
+
+#define ADVANCE(tk, descr) \
+{ \
+ if (tokenStream->lookAhead() != tk) { \
+ reportError(QString::fromLatin1("'%1' expected found '%2'").arg(QLatin1String(descr)).arg(QString::fromLatin1((tokenStream->currentTokenText().constData())))); \
+ return false; \
+ } \
+ advance(); \
+}
+
+#define ADVANCE_NR(tk, descr) \
+ do { \
+ if (tokenStream->lookAhead() != tk) { \
+ reportError(i18n("'%1' expected found '%2'").arg(QLatin1String(descr)).arg(QString::fromLatin1(tokenStream->currentTokenText().constData()))); \
+ } \
+ else \
+ advance(); \
+ } while (0)
+
+#define CHECK(tk, descr) \
+ do { \
+ if (tokenStream->lookAhead() != tk) { \
+ return false; \
+ } \
+ advance(); \
+ } while (0)
+
+#define MATCH(tk, descr) \
+ do { \
+ if (tokenStream->lookAhead() != tk) { \
+ reportError(Errors::SyntaxError); \
+ return false; \
+ } \
+ } while (0)
+
+#define UPDATE_POS(_node, start, end) \
+ do { \
+ (_node)->setPosition(start, end); \
+ } while (0)
+
+#define AST_FROM_TOKEN(node, tk) \
+ AST *node = CreateNode<AST>(m_pool); \
+ UPDATE_POS(node, (tk), (tk)+1);
+
+#define DUMP_AST(node) \
+ do { \
+ fprintf(stderr, "\n=================================================\n"); \
+ for (int i=node->startToken(); i<node->endToken(); ++i) \
+ fprintf(stderr, "%s", tokenStream->tokenText(i).constData()); \
+ fprintf(stderr, "\n=================================================\n"); \
+ } while (0)
+
+#define RXX_NO_ERROR
+
+QString i18n(const char *arg)
+{
+ return QLatin1String(arg);
+}
+
+
+//@todo remove me
+enum
+{
+ OBJC_CLASS,
+ OBJC_PROTOCOL,
+ OBJC_ALIAS
+};
+
+Parser::Parser()
+{
+ m_maxProblems = 5;
+ objcp = false;
+}
+
+Parser::~Parser()
+{
+}
+
+TranslationUnitAST *Parser::parse(TokenStreamAdapter::TokenStream *p_tokenStream, pool *p)
+{
+ //tokenStream->rewind(0);
+ m_pool = p;
+ tokenStream = p_tokenStream;
+ TranslationUnitAST *ast = 0;
+ parseTranslationUnit(ast);
+ return ast;
+}
+
+/*
+ Parses a part of the translation unit given by tokenStream. When the number
+ of nodes in the AST exeeds targetMaxASTnodes, this function will return as
+ soon as possible. The progress is stored by updating the cursor inside
+ tokenStream. done is set to true if the parser finished parsing the
+ tokenStream, and to false otherwise.
+*/
+TranslationUnitAST *Parser::parse(TokenStreamAdapter::TokenStream *p_tokenStream, pool *p, int targetMaxASTNodes, bool &done)
+{
+ m_pool = p;
+ tokenStream = p_tokenStream;
+ TranslationUnitAST *ast = 0;
+ // we always create one node, so target max nodes cannot be < 2.
+ if (targetMaxASTNodes < 2)
+ targetMaxASTNodes = 2;
+
+ // Advance past whitespace and comment tokens at the start.
+ while (tokenStream->isHidden(tokenStream->cursor())) {
+ tokenStream->nextToken();
+ }
+ int start = tokenStream->cursor();
+
+ AST::N = 0;
+ m_problems = 0;
+ ast = CreateNode<TranslationUnitAST>(m_pool);
+ while (tokenStream->lookAhead() && AST::N < targetMaxASTNodes) {
+ DeclarationAST *def = 0;
+ int startDecl = tokenStream->cursor();
+ if (!parseDeclaration(def)) {
+ // error recovery
+ if (startDecl == tokenStream->cursor())
+ advance(); // skip at least one token
+ skipUntilDeclaration();
+ }
+ ast->addDeclaration(def);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+
+ done = tokenStream->tokenAtEnd();
+ return ast;
+}
+
+
+bool Parser::reportError(const Error& err)
+{
+Q_UNUSED(err);
+#ifndef RXX_NO_ERROR
+ if (m_problems < m_maxProblems) {
+ ++m_problems;
+ int line=0, col=0;
+ QByteArray fileName;
+ tokenStream->getTokenStartPosition(tokenStream->cursor(), &line, &col, &fileName);
+
+ QString s = tokenStream->currentTokenText();
+ s = s.left(30).trimmed();
+ if (s.isEmpty())
+ s = i18n("<eof>");
+
+ if (fileName.isEmpty())
+ //fileName = m_file->fileName;
+ fileName = "implement me";
+
+ // m_driver->addProblem(m_driver->currentFileName(), Problem(err.text.arg(s), line, col));
+ fprintf(stderr, "%s: error %s at line %d column %d\n",
+ fileName.constData(),
+ err.text.arg(s).toLatin1().constData(), line, col);
+ }
+#endif // RXX_NO_ERROR
+ return true;
+}
+
+bool Parser::reportError(const QString& msg)
+{
+Q_UNUSED(msg);
+#ifndef RXX_NO_ERROR
+ if (m_problems < m_maxProblems) {
+ ++m_problems;
+ int line=0, col=0;
+ QByteArray fileName;
+ tokenStream->getTokenStartPosition(tokenStream->cursor(), &line, &col, &fileName);
+
+ if (fileName.isEmpty())
+ //fileName = m_file->fileName;
+ fileName = "implement me";
+
+ // m_driver->addProblem(m_driver->currentFileName(), Problem(msg, line, col));
+ fprintf(stderr, "%s: error %s at line %d column %d\n",
+ fileName.constData(),
+ msg.toLatin1().constData(), line, col);
+ }
+#endif // RXX_NO_ERROR
+ return true;
+}
+
+void Parser::syntaxError()
+{
+ (void) reportError(Errors::SyntaxError);
+}
+
+bool Parser::skipUntil(int token)
+{
+ while (tokenStream->lookAhead()) {
+ if (tokenStream->lookAhead() == token)
+ return true;
+
+ advance();
+ }
+
+ return false;
+}
+
+bool Parser::skipUntilDeclaration()
+{
+ while (tokenStream->lookAhead()) {
+
+ switch(tokenStream->lookAhead()) {
+ case ';':
+ case '~':
+ case Token_scope:
+ case Token_identifier:
+ case Token_operator:
+ case Token_char:
+ case Token_wchar_t:
+ case Token_bool:
+ case Token_short:
+ case Token_int:
+ case Token_long:
+ case Token_signed:
+ case Token_unsigned:
+ case Token_float:
+ case Token_double:
+ case Token_void:
+ case Token_extern:
+ case Token_namespace:
+ case Token_using:
+ case Token_typedef:
+ case Token_asm:
+ case Token_template:
+ case Token_export:
+
+ case Token_const: // cv
+ case Token_volatile: // cv
+
+ case Token_public:
+ case Token_protected:
+ case Token_private:
+ case Token_signals: // Qt
+ case Token_slots: // Qt
+ return true;
+
+ default:
+ advance();
+ }
+ }
+
+ return false;
+}
+
+bool Parser::skipUntilStatement()
+{
+ while (tokenStream->lookAhead()) {
+ switch(tokenStream->lookAhead()) {
+ case ';':
+ case '{':
+ case '}':
+ case Token_const:
+ case Token_volatile:
+ case Token_identifier:
+ case Token_case:
+ case Token_default:
+ case Token_if:
+ case Token_switch:
+ case Token_while:
+ case Token_do:
+ case Token_for:
+ case Token_break:
+ case Token_continue:
+ case Token_return:
+ case Token_goto:
+ case Token_try:
+ case Token_catch:
+ case Token_throw:
+ case Token_char:
+ case Token_wchar_t:
+ case Token_bool:
+ case Token_short:
+ case Token_int:
+ case Token_long:
+ case Token_signed:
+ case Token_unsigned:
+ case Token_float:
+ case Token_double:
+ case Token_void:
+ case Token_class:
+ case Token_struct:
+ case Token_union:
+ case Token_enum:
+ case Token_scope:
+ case Token_template:
+ case Token_using:
+ return true;
+
+ default:
+ advance();
+ }
+ }
+
+ return false;
+}
+
+bool Parser::skip(int l, int r)
+{
+ int count = 0;
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+
+ if (tk == l)
+ ++count;
+ else if (tk == r)
+ --count;
+ else if (l != '{' && (tk == '{' || tk == '}' || tk == ';'))
+ return false;
+
+ if (count == 0)
+ return true;
+
+ advance();
+ }
+
+ return false;
+}
+
+bool Parser::skipCommaExpression(AbstractExpressionAST *&node)
+{
+#ifndef RXX_NO_PARSE_EXPRESSION
+ return parseCommaExpression(node);
+#else
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *expr = 0;
+ if (!skipExpression(expr))
+ return false;
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!skipExpression(expr)) {
+ reportError(i18n("expression expected"));
+ return false;
+ }
+ }
+
+ AbstractExpressionAST *ast = CreateNode<AbstractExpressionAST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+#endif // RXX_NO_PARSE_EXPRESSION
+}
+
+bool Parser::skipExpression(AbstractExpressionAST *&node)
+{
+#ifndef RXX_NO_PARSE_EXPRESSION
+ return parseExpression(node);
+#else
+ int start = tokenStream->cursor();
+ int count = 0;
+
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+
+ switch(tk) {
+ case '(':
+ case '[':
+ case '{':
+ ++count;
+ advance();
+ break;
+
+ case ']':
+ case ')':
+ case '}':
+ if (count == 0) {
+ AbstractExpressionAST *ast = CreateNode<AbstractExpressionAST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+ --count;
+ advance();
+ break;
+
+ case Token_struct:
+ case Token_union:
+ case Token_class: {
+ int c = tokenStream->cursor();
+ TypeSpecifierAST *spec = 0;
+ if (!parseClassSpecifier(spec))
+ tokenStream->rewind(c + 1);
+ }
+ break;
+
+ case ',':
+ case ';':
+ case Token_case:
+ case Token_default:
+ case Token_if:
+ case Token_while:
+ case Token_do:
+ case Token_for:
+ case Token_break:
+ case Token_continue:
+ case Token_return:
+ case Token_goto:
+ {
+ if ((tk == ',' || tk == ';') && count > 0) {
+ advance();
+ break;
+ }
+
+ AbstractExpressionAST *ast = CreateNode<AbstractExpressionAST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ default:
+ advance();
+ }
+ }
+
+ return false;
+#endif // RXX_NO_PARSE_EXPRESSION
+}
+
+bool Parser::parseName(NameAST *&node, bool parseTemplateId)
+{
+ AST *winDeclSpec = 0;
+ parseWinDeclSpec(winDeclSpec);
+
+ int start = tokenStream->cursor();
+
+ NameAST *ast = CreateNode<NameAST>(m_pool);
+
+ if (tokenStream->lookAhead() == Token_scope) {
+ ast->setGlobal(true);
+ advance();
+ }
+
+ int idx = tokenStream->cursor();
+
+ while (true) {
+ ClassOrNamespaceNameAST *n = 0;
+ if (!parseUnqualifiedName(n))
+ return false;
+
+ if (tokenStream->lookAhead() == Token_scope) {
+ advance();
+ ast->addClassOrNamespaceName(n);
+ if (tokenStream->lookAhead() == Token_template)
+ advance(); /// skip optional template #### @todo CHECK
+ } else if (!parseTemplateId && n) {
+ tokenStream->rewind(n->startToken());
+ parseUnqualifiedName(n, parseTemplateId);
+ ast->setUnqualifiedName(n);
+ break;
+ } else {
+ ast->setUnqualifiedName(n);
+ break;
+ }
+ }
+
+ if (idx == tokenStream->cursor())
+ return false;
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
+{
+ QTime t;
+ t.start();
+
+ advance();
+ int start = tokenStream->cursor();
+
+ m_problems = 0;
+ TranslationUnitAST *tun = CreateNode<TranslationUnitAST>(m_pool);
+ node = tun;
+ while (tokenStream->lookAhead()) {
+ DeclarationAST *def = 0;
+ int startDecl = tokenStream->cursor();
+ if (!parseDeclaration(def)) {
+ // error recovery
+ if (startDecl == tokenStream->cursor())
+ advance(); // skip at least one token
+ skipUntilDeclaration();
+ }
+ node->addDeclaration(def);
+ }
+
+ UPDATE_POS(node, start, tokenStream->cursor());
+
+ return m_problems == 0;
+}
+
+bool Parser::parseDeclaration(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ switch(tokenStream->lookAhead()) {
+
+ case ';':
+ advance();
+ return true;
+
+ case Token_extern:
+ return parseLinkageSpecification(node);
+
+ case Token_namespace:
+ return parseNamespace(node);
+
+ case Token_using:
+ return parseUsing(node);
+
+ case Token_typedef:
+ return parseTypedef(node);
+
+ case Token_asm:
+ return parseAsmDefinition(node);
+
+ case Token_template:
+ case Token_export:
+ return parseTemplateDeclaration(node);
+
+ default:
+ {
+ // tokenStream->rewind(start);
+
+ if (objcp && parseObjcDef(node))
+ return true;
+
+ tokenStream->rewind(start);
+
+ AST *storageSpec = 0;
+ parseStorageClassSpecifier(storageSpec);
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ TypeSpecifierAST *spec = 0;
+ if (parseEnumSpecifier(spec) || parseClassSpecifier(spec)) {
+ spec->setCvQualify(cv);
+
+ AST *cv2 = 0;
+ parseCvQualify(cv2);
+ spec->setCv2Qualify(cv2);
+
+ InitDeclaratorListAST *declarators = 0;
+ parseInitDeclaratorList(declarators);
+ ADVANCE(';', ";");
+
+ SimpleDeclarationAST *ast = CreateNode<SimpleDeclarationAST>(m_pool);
+ ast->setStorageSpecifier(storageSpec);
+ ast->setTypeSpec(spec);
+ ast->setInitDeclaratorList(declarators);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+ }
+
+ tokenStream->rewind(start);
+ return parseDeclarationInternal(node);
+ }
+
+ } // end switch
+}
+
+bool Parser::parseLinkageSpecification(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_extern) {
+ return false;
+ }
+ advance();
+
+ LinkageSpecificationAST *ast = CreateNode<LinkageSpecificationAST>(m_pool);
+
+ int startExternType = tokenStream->cursor();
+ if (tokenStream->lookAhead() == Token_string_literal) {
+ advance();
+ AST *externType = CreateNode<AST>(m_pool);
+ UPDATE_POS(externType, startExternType, tokenStream->cursor());
+
+ ast->setExternType(externType);
+ }
+
+ if (tokenStream->lookAhead() == '{') {
+ LinkageBodyAST *linkageBody = 0;
+ parseLinkageBody(linkageBody);
+ ast->setLinkageBody(linkageBody);
+ } else {
+ DeclarationAST *decl = 0;
+ if (!parseDeclaration(decl)) {
+ reportError(i18n("Declaration syntax error"));
+ }
+ ast->setDeclaration(decl);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseLinkageBody(LinkageBodyAST *&node)
+{
+
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != '{') {
+ return false;
+ }
+ advance();
+
+ LinkageBodyAST *lba = CreateNode<LinkageBodyAST>(m_pool);
+ node = lba;
+
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+
+ if (tk == '}')
+ break;
+
+ DeclarationAST *def = 0;
+ int startDecl = tokenStream->cursor();
+ if (parseDeclaration(def)) {
+ node->addDeclaration(def);
+ } else {
+ // error recovery
+ if (startDecl == tokenStream->cursor())
+ advance(); // skip at least one token
+ skipUntilDeclaration();
+ }
+ }
+
+ if (tokenStream->lookAhead() != '}') {
+ reportError(i18n("} expected"));
+ } else
+ advance();
+
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+}
+
+bool Parser::parseNamespace(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_namespace) {
+ return false;
+ }
+ advance();
+
+ int startNamespaceName = tokenStream->cursor();
+ if (tokenStream->lookAhead() == Token_identifier) {
+ advance();
+ }
+ AST *namespaceName = CreateNode<AST>(m_pool);
+ UPDATE_POS(namespaceName, startNamespaceName, tokenStream->cursor());
+
+ if (tokenStream->lookAhead() == '=') {
+ // namespace alias
+ advance();
+
+ NameAST *name = 0;
+ if (parseName(name)) {
+ ADVANCE(';', ";");
+
+ NamespaceAliasAST *ast = CreateNode<NamespaceAliasAST>(m_pool);
+ ast->setNamespaceName(namespaceName);
+ ast->setAliasName(name);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ } else {
+ reportError(i18n("namespace expected"));
+ return false;
+ }
+ } else if (tokenStream->lookAhead() != '{') {
+ reportError(i18n("{ expected"));
+ return false;
+ }
+
+ NamespaceAST *ast = CreateNode<NamespaceAST>(m_pool);
+ ast->setNamespaceName(namespaceName);
+
+ LinkageBodyAST *linkageBody = 0;
+ parseLinkageBody(linkageBody);
+
+ ast->setLinkageBody(linkageBody);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseUsing(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_using) {
+ return false;
+ }
+ advance();
+
+ if (tokenStream->lookAhead() == Token_namespace) {
+ if (!parseUsingDirective(node)) {
+ return false;
+ }
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+
+ UsingAST *ast = CreateNode<UsingAST>(m_pool);
+
+ int startTypeName = tokenStream->cursor();
+ if (tokenStream->lookAhead() == Token_typename) {
+ advance();
+ AST *tn = CreateNode<AST>(m_pool);
+ UPDATE_POS(tn, startTypeName, tokenStream->cursor());
+ ast->setTypeName(tn);
+ }
+
+ NameAST *name = 0;
+ if (!parseName(name))
+ return false;
+
+ ast->setName(name);
+
+ ADVANCE(';', ";");
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseUsingDirective(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_namespace) {
+ return false;
+ }
+ advance();
+
+ NameAST *name = 0;
+ if (!parseName(name)) {
+ reportError(i18n("Namespace name expected"));
+ return false;
+ }
+
+ ADVANCE(';', ";");
+
+ UsingDirectiveAST *ast = CreateNode<UsingDirectiveAST>(m_pool);
+ ast->setName(name);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+
+bool Parser::parseOperatorFunctionId(AST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_operator) {
+ return false;
+ }
+ advance();
+
+ AST *op = 0;
+ if (parseOperator(op)) {
+ AST *asn = CreateNode<AST>(m_pool);
+ node = asn;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ } else {
+ // parse cast operator
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ TypeSpecifierAST *spec = 0;
+ if (!parseSimpleTypeSpecifier(spec)) {
+ syntaxError();
+ return false;
+ }
+ spec->setCvQualify(cv);
+
+ AST *cv2 = 0;
+ parseCvQualify(cv2);
+ spec->setCv2Qualify(cv2);
+
+ AST *ptrOp = 0;
+ while (parsePtrOperator(ptrOp))
+ ;
+
+ AST *asn = CreateNode<AST>(m_pool);
+ node = asn;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+}
+
+bool Parser::parseTemplateArgumentList(TemplateArgumentListAST *&node, bool reportError)
+{
+ int start = tokenStream->cursor();
+
+ TemplateArgumentListAST *ast = CreateNode<TemplateArgumentListAST>(m_pool);
+
+ AST *templArg = 0;
+ if (!parseTemplateArgument(templArg))
+ return false;
+ ast->addArgument(templArg);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseTemplateArgument(templArg)) {
+ if (reportError) {
+ syntaxError();
+ break;
+ } else
+ return false;
+ }
+ ast->addArgument(templArg);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTypedef(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_typedef) {
+ return false;
+ }
+ advance();
+
+ TypeSpecifierAST *spec = 0;
+ if (!parseTypeSpecifierOrClassSpec(spec)) {
+ reportError(i18n("Need a type specifier to declare"));
+ return false;
+ }
+
+ InitDeclaratorListAST *declarators = 0;
+ if (!parseInitDeclaratorList(declarators)) {
+ //reportError(i18n("Need an identifier to declare"));
+ //return false;
+ }
+
+ ADVANCE(';', ";");
+
+ TypedefAST *ast = CreateNode<TypedefAST>(m_pool);
+ ast->setTypeSpec(spec);
+ ast->setInitDeclaratorList(declarators);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseAsmDefinition(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ADVANCE(Token_asm, "asm");
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ skip('(', ')');
+ advance();
+ ADVANCE(';', ";");
+
+ DeclarationAST *ast = CreateNode<DeclarationAST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTemplateDeclaration(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AST *exp = 0;
+
+ int startExport = tokenStream->cursor();
+ if (tokenStream->lookAhead() == Token_export) {
+ advance();
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, startExport, tokenStream->cursor());
+ exp = n;
+ }
+
+ if (tokenStream->lookAhead() != Token_template) {
+ return false;
+ }
+ advance();
+
+ TemplateParameterListAST *params = 0;
+ if (tokenStream->lookAhead() == '<') {
+ advance();
+ parseTemplateParameterList(params);
+
+ ADVANCE('>', ">");
+ }
+
+ DeclarationAST *def = 0;
+ if (!parseDeclaration(def)) {
+ reportError(i18n("expected a declaration"));
+ }
+
+ TemplateDeclarationAST *ast = CreateNode<TemplateDeclarationAST>(m_pool);
+ ast->setExported(exp);
+ ast->setTemplateParameterList(params);
+ ast->setDeclaration(def);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseOperator(AST *&/*node*/)
+{
+ QString text(QString::fromLatin1(tokenStream->currentTokenText().constData()));
+
+ switch(tokenStream->lookAhead()) {
+ case Token_new:
+ case Token_delete:
+ advance();
+ if (tokenStream->lookAhead() == '[' && tokenStream->lookAhead(1) == ']') {
+ advance();
+ advance();
+ text += QLatin1String("[]");
+ }
+ return true;
+
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case '%':
+ case '^':
+ case '&':
+ case '|':
+ case '~':
+ case '!':
+ case '=':
+ case '<':
+ case '>':
+ case ',':
+ case Token_assign:
+ case Token_shift:
+ case Token_eq:
+ case Token_not_eq:
+ case Token_leq:
+ case Token_geq:
+ case Token_and:
+ case Token_or:
+ case Token_incr:
+ case Token_decr:
+ case Token_ptrmem:
+ case Token_arrow:
+ advance();
+ return true;
+
+ default:
+ if (tokenStream->lookAhead() == '(' && tokenStream->lookAhead(1) == ')') {
+ advance();
+ advance();
+ return true;
+ } else if (tokenStream->lookAhead() == '[' && tokenStream->lookAhead(1) == ']') {
+ advance();
+ advance();
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool Parser::parseCvQualify(AST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AST *ast = CreateNode<AST>(m_pool);
+
+ int n = 0;
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+ if (tk == Token_const || tk == Token_volatile) {
+ ++n;
+ int startWord = tokenStream->cursor();
+ advance();
+ AST *word = CreateNode<AST>(m_pool);
+ UPDATE_POS(word, startWord, tokenStream->cursor());
+ word->setParent(ast);
+ } else
+ break;
+ }
+
+ if (n == 0)
+ return false;
+
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+
+ node = ast;
+ return true;
+}
+
+bool Parser::parseSimpleTypeSpecifier(TypeSpecifierAST *&node, bool onlyIntegral)
+{
+ int start = tokenStream->cursor();
+ bool isIntegral = false;
+ bool done = false;
+
+ while (!done) {
+ switch(tokenStream->lookAhead()) {
+ case Token_char:
+ case Token_wchar_t:
+ case Token_bool:
+ case Token_short:
+ case Token_int:
+ case Token_long:
+ case Token_signed:
+ case Token_unsigned:
+ case Token_float:
+ case Token_double:
+ case Token_void:
+ isIntegral = true;
+ advance();
+ break;
+
+ default:
+ done = true;
+ }
+ }
+
+ TypeSpecifierAST *ast = CreateNode<TypeSpecifierAST>(m_pool);
+ if (isIntegral) {
+ ClassOrNamespaceNameAST *cl = CreateNode<ClassOrNamespaceNameAST>(m_pool);
+
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, start, tokenStream->cursor());
+ cl->setName(n);
+ UPDATE_POS(cl, start, tokenStream->cursor());
+
+ NameAST *name = CreateNode<NameAST>(m_pool);
+ name->setUnqualifiedName(cl);
+ UPDATE_POS(name, start, tokenStream->cursor());
+ ast->setName(name);
+ } else if (tokenStream->lookAhead() == Token___typeof) {
+ advance();
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+ TypeIdAST *typeId = 0;
+ parseTypeId(typeId);
+ ADVANCE(')', ")");
+ } else {
+ AbstractExpressionAST *e = 0;
+ parseUnaryExpression(e);
+ }
+ } else if (onlyIntegral) {
+ tokenStream->rewind(start);
+ return false;
+ } else {
+ NameAST *name = 0;
+ if (!parseName(name)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+ ast->setName(name);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parsePtrOperator(AST *&node)
+{
+ int start = tokenStream->cursor();
+ int tok = tokenStream->lookAhead();
+ AST *memPtr = 0;
+
+ switch (tok) {
+ case '&':
+ case '*':
+ advance();
+ break;
+
+ case Token_scope:
+ case Token_identifier:
+ if (!parsePtrToMember(memPtr)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+ break;
+
+ default:
+ return false;
+ }
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ AST *ast = CreateNode<AST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+
+bool Parser::parseTemplateArgument(AST *&node)
+{
+ int start = tokenStream->cursor();
+
+ TypeIdAST *typeId = 0;
+ if (parseTypeId(typeId)) {
+ if (tokenStream->lookAhead() == ',' || tokenStream->lookAhead() == '>') {
+ node = typeId;
+ return true;
+ }
+ }
+
+ tokenStream->rewind(start);
+ AbstractExpressionAST *expr = 0;
+ if (!parseLogicalOrExpression(expr, true)) {
+ return false;
+ }
+ node = expr;
+
+ return true;
+}
+
+bool Parser::parseTypeSpecifier(TypeSpecifierAST *&spec)
+{
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ if (parseElaboratedTypeSpecifier(spec) || parseSimpleTypeSpecifier(spec)) {
+ spec->setCvQualify(cv);
+
+ AST *cv2 = 0;
+ parseCvQualify(cv2);
+ spec->setCv2Qualify(cv2);
+
+ return true;
+ }
+
+ return false;
+}
+
+bool Parser::parseDeclarator(DeclaratorAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ DeclaratorAST *ast = CreateNode<DeclaratorAST>(m_pool);
+
+ DeclaratorAST *decl = 0;
+ NameAST *declId = 0;
+
+ AST *ptrOp = 0;
+ while (parsePtrOperator(ptrOp)) {
+ ast->addPtrOp(ptrOp);
+ }
+
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+
+ if (!parseDeclarator(decl)) {
+ return false;
+ }
+ ast->setSubDeclarator(decl);
+
+ if (tokenStream->lookAhead() != ')') {
+ return false;
+ }
+ advance();
+ } else {
+ if (tokenStream->lookAhead() == ':') {
+ // unnamed bitfield
+ } else if (parseDeclaratorId(declId)) {
+ ast->setDeclaratorId(declId);
+ } else {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ if (tokenStream->lookAhead() == ':') {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ if (!parseConstantExpression(expr)) {
+ reportError(i18n("Constant expression expected"));
+ }
+ goto update_pos;
+ }
+ }
+
+ {
+ bool isVector = false;
+
+ while (tokenStream->lookAhead() == '[') {
+ int startArray = tokenStream->cursor();
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+
+ ADVANCE(']', "]");
+ AST *array = CreateNode<AST>(m_pool);
+ UPDATE_POS(array, startArray, tokenStream->cursor());
+ ast->addArrayDimension(array);
+ isVector = true;
+ }
+
+ bool skipParen = false;
+ if (tokenStream->lookAhead() == Token_identifier
+ && tokenStream->lookAhead(1) == '('
+ && tokenStream->lookAhead(2) == '(') {
+ advance();
+ advance();
+ skipParen = true;
+ }
+
+ int tok = tokenStream->lookAhead();
+ if (ast->subDeclarator() && !(isVector || tok == '(' || tok == ',' || tok == ';' || tok == '=')) {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ int index = tokenStream->cursor();
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+
+ ParameterDeclarationClauseAST *params = 0;
+ if (!parseParameterDeclarationClause(params)) {
+ tokenStream->rewind(index);
+ goto update_pos;
+ }
+ ast->setParameterDeclarationClause(params);
+
+ if (tokenStream->lookAhead() != ')') {
+ tokenStream->rewind(index);
+ goto update_pos;
+ }
+
+ advance(); // skip ')'
+
+ AST *constant = 0;
+ parseCvQualify(constant);
+ ast->setConstant(constant);
+
+ AST *except = 0;
+ if (parseExceptionSpecification(except)) {
+ ast->setExceptionSpecification(except);
+ }
+ }
+
+ if (skipParen) {
+ if (tokenStream->lookAhead() != ')') {
+ reportError(i18n("')' expected"));
+ } else
+ advance();
+ }
+ }
+
+update_pos:
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseAbstractDeclarator(DeclaratorAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ DeclaratorAST *ast = CreateNode<DeclaratorAST>(m_pool);
+ DeclaratorAST *decl = 0;
+
+ AST *ptrOp = 0;
+ while (parsePtrOperator(ptrOp)) {
+ ast->addPtrOp(ptrOp);
+ }
+
+ int index = tokenStream->cursor();
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+
+ if (!parseAbstractDeclarator(decl)) {
+ tokenStream->rewind(index);
+ goto label1;
+ }
+
+ ast->setSubDeclarator(decl);
+
+ if (tokenStream->lookAhead() != ')'){
+ tokenStream->rewind(start);
+ return false;
+ }
+ advance();
+ } else if (tokenStream->lookAhead() == ':') {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ if (!parseConstantExpression(expr)) {
+ reportError(i18n("Constant expression expected"));
+ }
+ goto update_pos;
+ }
+
+label1:
+ {
+ bool isVector = false;
+
+ while (tokenStream->lookAhead() == '[') {
+ int startArray = tokenStream->cursor();
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+
+ ADVANCE(']', "]");
+ AST *array = CreateNode<AST>(m_pool);
+ UPDATE_POS(array, startArray, tokenStream->cursor());
+ ast->addArrayDimension(array);
+ isVector = true;
+ }
+
+ int tok = tokenStream->lookAhead();
+ if (ast->subDeclarator() && !(isVector || tok == '(' || tok == ',' || tok == ';' || tok == '=')) {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ int index = tokenStream->cursor();
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+
+ ParameterDeclarationClauseAST *params = 0;
+ if (!parseParameterDeclarationClause(params)) {
+ tokenStream->rewind(index);
+ goto update_pos;
+ }
+ ast->setParameterDeclarationClause(params);
+
+ if (tokenStream->lookAhead() != ')') {
+ tokenStream->rewind(index);
+ goto update_pos;
+ }
+
+ advance(); // skip ')'
+
+ AST *constant = 0;
+ parseCvQualify(constant);
+ ast->setConstant(constant);
+
+ AST *except = 0;
+ if (parseExceptionSpecification(except)) {
+ ast->setExceptionSpecification(except);
+ }
+ }
+ }
+
+update_pos:
+ if (tokenStream->cursor() == start)
+ return false;
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseEnumSpecifier(TypeSpecifierAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_enum) {
+ return false;
+ }
+
+ advance();
+
+ NameAST *name = 0;
+ parseName(name);
+
+ if (tokenStream->lookAhead() != '{') {
+ tokenStream->rewind(start);
+ return false;
+ }
+ advance();
+
+ EnumSpecifierAST *ast = CreateNode<EnumSpecifierAST>(m_pool);
+ ast->setName(name);
+
+ EnumeratorAST *enumerator = 0;
+ if (parseEnumerator(enumerator)) {
+ ast->addEnumerator(enumerator);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseEnumerator(enumerator)) {
+ //reportError(i18n("Enumerator expected"));
+ break;
+ }
+
+ ast->addEnumerator(enumerator);
+ }
+ }
+
+ if (tokenStream->lookAhead() != '}')
+ reportError(i18n("} missing"));
+ else
+ advance();
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTemplateParameterList(TemplateParameterListAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ TemplateParameterListAST *ast = CreateNode<TemplateParameterListAST>(m_pool);
+
+ TemplateParameterAST *param = 0;
+ if (!parseTemplateParameter(param)) {
+ return false;
+ }
+ ast->addTemplateParameter(param);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseTemplateParameter(param)) {
+ syntaxError();
+ break;
+ } else {
+ ast->addTemplateParameter(param);
+ }
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTemplateParameter(TemplateParameterAST *&node)
+{
+ int start = tokenStream->cursor();
+ TemplateParameterAST *ast = CreateNode<TemplateParameterAST>(m_pool);
+
+ TypeParameterAST *typeParameter = 0;
+ ParameterDeclarationAST *param = 0;
+
+ int tk = tokenStream->lookAhead();
+
+ if ((tk == Token_class || tk == Token_typename || tk == Token_template) && parseTypeParameter(typeParameter)) {
+ ast->setTypeParameter(typeParameter);
+ goto ok;
+ }
+
+ if (!parseParameterDeclaration(param))
+ return false;
+ ast->setTypeValueParameter(param);
+
+ok:
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTypeParameter(TypeParameterAST *&node)
+{
+ int start = tokenStream->cursor();
+ TypeParameterAST *ast = CreateNode<TypeParameterAST>(m_pool);
+
+ AST_FROM_TOKEN(kind, tokenStream->cursor());
+ ast->setKind(kind);
+
+ switch(tokenStream->lookAhead()) {
+
+ case Token_class:
+ case Token_typename:
+ {
+ advance(); // skip class
+
+ // parse optional name
+ NameAST *name = 0;
+ if(parseName(name)){
+ ast->setName(name);
+
+ if (tokenStream->lookAhead() == '='){
+ advance();
+
+ TypeIdAST *typeId = 0;
+ if(!parseTypeId(typeId)){
+ //syntaxError();
+ tokenStream->rewind(start);
+ return false;
+ }
+ ast->setTypeId(typeId);
+ } else if (!(tokenStream->lookAhead() == ',' || tokenStream->lookAhead() == '>')) {
+ tokenStream->rewind(start);
+ return false;
+ }
+ }
+ }
+ break;
+
+ case Token_template:
+ {
+ advance(); // skip template
+ ADVANCE('<', "<");
+
+ TemplateParameterListAST *params = 0;
+ if (!parseTemplateParameterList(params)) {
+ return false;
+ }
+ ast->setTemplateParameterList(params);
+
+ ADVANCE('>', ">");
+
+ if (tokenStream->lookAhead() == Token_class)
+ advance();
+
+ // parse optional name
+ NameAST *name = 0;
+ if (parseName(name)) {
+ ast->setName(name);
+ if (tokenStream->lookAhead() == '=') {
+ advance();
+
+ TypeIdAST *typeId = 0;
+ if (!parseTypeId(typeId)) {
+ syntaxError();
+ return false;
+ }
+ ast->setTypeId(typeId);
+ }
+ }
+
+ if (tokenStream->lookAhead() == '=') {
+ advance();
+
+ NameAST *templ_name = 0;
+ parseName(templ_name);
+ }
+ }
+ break;
+
+ default:
+ return false;
+
+ } // end switch
+
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseStorageClassSpecifier(AST *&node)
+{
+ int start = tokenStream->cursor();
+ AST *ast = CreateNode<AST>(m_pool);
+
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+ if (tk == Token_friend || tk == Token_auto || tk == Token_register || tk == Token_static ||
+ tk == Token_extern || tk == Token_mutable) {
+ int startNode = tokenStream->cursor();
+ advance();
+
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, startNode, tokenStream->cursor());
+ n->setParent(ast);
+ } else
+ break;
+ }
+
+ if (length(ast->children()) == 0)
+ return false;
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseFunctionSpecifier(AST *&node)
+{
+ int start = tokenStream->cursor();
+ AST *ast = CreateNode<AST>(m_pool);
+
+ while (tokenStream->lookAhead()) {
+ int tk = tokenStream->lookAhead();
+ if (tk == Token_inline || tk == Token_virtual || tk == Token_explicit) {
+ int startNode = tokenStream->cursor();
+ advance();
+
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, startNode, tokenStream->cursor());
+ n->setParent(ast);
+ } else {
+ break;
+ }
+ }
+
+ if (length(ast->children()) == 0)
+ return false;
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseTypeId(TypeIdAST *&node)
+{
+ /// @todo implement the AST for typeId
+ int start = tokenStream->cursor();
+
+ TypeSpecifierAST *spec = 0;
+ if (!parseTypeSpecifier(spec)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ DeclaratorAST *decl = 0;
+ parseAbstractDeclarator(decl);
+
+ TypeIdAST *ast = CreateNode<TypeIdAST>(m_pool);
+ ast->setTypeSpecifier(spec);
+ ast->setDeclarator(decl);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseInitDeclaratorList(InitDeclaratorListAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ InitDeclaratorListAST *ast = CreateNode<InitDeclaratorListAST>(m_pool);
+ InitDeclaratorAST *decl = 0;
+
+ if (!parseInitDeclarator(decl)) {
+ return false;
+ }
+ ast->addInitDeclarator(decl);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseInitDeclarator(decl)) {
+ syntaxError();
+ break;
+ }
+ ast->addInitDeclarator(decl);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseParameterDeclarationClause(ParameterDeclarationClauseAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ParameterDeclarationClauseAST *ast = CreateNode<ParameterDeclarationClauseAST>(m_pool);
+
+ ParameterDeclarationListAST *params = 0;
+ if (!parseParameterDeclarationList(params)) {
+
+ if (tokenStream->lookAhead() == ')')
+ goto good;
+
+ if (tokenStream->lookAhead() == Token_ellipsis && tokenStream->lookAhead(1) == ')') {
+ AST_FROM_TOKEN(ellipsis, tokenStream->cursor());
+ ast->setEllipsis(ellipsis);
+ advance();
+ goto good;
+ }
+ return false;
+ }
+
+ if (tokenStream->lookAhead() == Token_ellipsis) {
+ AST_FROM_TOKEN(ellipsis, tokenStream->cursor());
+ ast->setEllipsis(ellipsis);
+ advance();
+ }
+
+good:
+ ast->setParameterDeclarationList(params);
+
+ /// @todo add ellipsis
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseParameterDeclarationList(ParameterDeclarationListAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ParameterDeclarationListAST *ast = CreateNode<ParameterDeclarationListAST>(m_pool);
+
+ ParameterDeclarationAST *param = 0;
+ if (!parseParameterDeclaration(param)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+ ast->addParameter(param);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (tokenStream->lookAhead() == Token_ellipsis)
+ break;
+
+ if (!parseParameterDeclaration(param)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+ ast->addParameter(param);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseParameterDeclaration(ParameterDeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AST *storage = 0;
+ parseStorageClassSpecifier(storage);
+
+ // parse decl spec
+ TypeSpecifierAST *spec = 0;
+ if (!parseTypeSpecifier(spec)) {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ int index = tokenStream->cursor();
+
+ DeclaratorAST *decl = 0;
+ if (!parseDeclarator(decl)) {
+ tokenStream->rewind(index);
+
+ // try with abstract declarator
+ parseAbstractDeclarator(decl);
+ }
+
+ AbstractExpressionAST *expr = 0;
+ if (tokenStream->lookAhead() == '=') {
+ advance();
+ if (!parseLogicalOrExpression(expr,true)) {
+ //reportError(i18n("Expression expected"));
+ }
+ }
+
+ ParameterDeclarationAST *ast = CreateNode<ParameterDeclarationAST>(m_pool);
+ ast->setTypeSpec(spec);
+ ast->setDeclarator(decl);
+ ast->setExpression(expr);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseClassSpecifier(TypeSpecifierAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AST *classKey = 0;
+ int classKeyStart = tokenStream->cursor();
+
+ int kind = tokenStream->lookAhead();
+ if (kind == Token_class || kind == Token_struct || kind == Token_union) {
+ AST *asn = CreateNode<AST>(m_pool);
+ classKey = asn;
+ advance();
+ UPDATE_POS(classKey, classKeyStart, tokenStream->cursor());
+ } else {
+ return false;
+ }
+
+ AST *winDeclSpec = 0;
+ parseWinDeclSpec(winDeclSpec);
+
+ while (tokenStream->lookAhead() == Token_identifier && tokenStream->lookAhead(1) == Token_identifier)
+ advance();
+
+ NameAST *name = 0;
+ parseName(name);
+
+ BaseClauseAST *bases = 0;
+ if (tokenStream->lookAhead() == ':') {
+ if (!parseBaseClause(bases)) {
+ skipUntil('{');
+ }
+ }
+
+ if (tokenStream->lookAhead() != '{') {
+ tokenStream->rewind(start);
+ return false;
+ }
+
+ ADVANCE('{', "{");
+
+ ClassSpecifierAST *ast = CreateNode<ClassSpecifierAST>(m_pool);
+ ast->setWinDeclSpec(winDeclSpec);
+ ast->setClassKey(classKey);
+ ast->setName(name);
+ ast->setBaseClause(bases);
+
+ while (tokenStream->lookAhead()) {
+ if (tokenStream->lookAhead() == '}')
+ break;
+
+ DeclarationAST *memSpec = 0;
+ int startDecl = tokenStream->cursor();
+ if (!parseMemberSpecification(memSpec)) {
+ if (startDecl == tokenStream->cursor())
+ advance(); // skip at least one token
+ skipUntilDeclaration();
+ } else
+ ast->addDeclaration(memSpec);
+ }
+
+ if (tokenStream->lookAhead() != '}') {
+ reportError(i18n("} missing"));
+ } else
+ advance();
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseAccessSpecifier(AST *&node)
+{
+ int start = tokenStream->cursor();
+
+ switch(tokenStream->lookAhead()) {
+ case Token_public:
+ case Token_protected:
+ case Token_private: {
+ AST *asn = CreateNode<AST>(m_pool);
+ node = asn;
+ advance();
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool Parser::parseMemberSpecification(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AST *access = 0;
+
+ if (tokenStream->lookAhead() == ';') {
+ advance();
+ return true;
+ } else if (tokenStream->lookAhead() == Token_Q_OBJECT || tokenStream->lookAhead() == Token_K_DCOP) {
+ advance();
+ return true;
+ } else if (tokenStream->lookAhead() == Token_signals
+ || tokenStream->lookAhead() == Token_k_dcop
+ || tokenStream->lookAhead() == Token_k_dcop_signals) {
+ AccessDeclarationAST *ast = CreateNode<AccessDeclarationAST>(m_pool);
+ advance();
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, start, tokenStream->cursor());
+ ast->addAccess(n);
+ ADVANCE(':', ":");
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ } else if (parseTypedef(node)) {
+ return true;
+ } else if (parseUsing(node)) {
+ return true;
+ } else if (parseTemplateDeclaration(node)) {
+ return true;
+ } else if (parseAccessSpecifier(access)) {
+ AccessDeclarationAST *ast = CreateNode<AccessDeclarationAST>(m_pool);
+ ast->addAccess(access);
+
+ int startSlot = tokenStream->cursor();
+ if (tokenStream->lookAhead() == Token_slots) {
+ advance();
+ AST *sl = CreateNode<AST>(m_pool);
+ UPDATE_POS(sl, startSlot, tokenStream->cursor());
+ ast->addAccess(sl);
+ }
+ ADVANCE(':', ":");
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+
+ tokenStream->rewind(start);
+
+ AST *storageSpec = 0;
+ parseStorageClassSpecifier(storageSpec);
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ TypeSpecifierAST *spec = 0;
+ if (parseEnumSpecifier(spec) || parseClassSpecifier(spec)) {
+ spec->setCvQualify(cv);
+
+ AST *cv2 = 0;
+ parseCvQualify(cv2);
+ spec->setCv2Qualify(cv2);
+
+ InitDeclaratorListAST *declarators = 0;
+ parseInitDeclaratorList(declarators);
+ ADVANCE(';', ";");
+
+ SimpleDeclarationAST *ast = CreateNode<SimpleDeclarationAST>(m_pool);
+ ast->setTypeSpec(spec);
+ ast->setInitDeclaratorList(declarators);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+ }
+
+ tokenStream->rewind(start);
+ return parseDeclarationInternal(node);
+}
+
+bool Parser::parseCtorInitializer(AST *&/*node*/)
+{
+ if (tokenStream->lookAhead() != ':') {
+ return false;
+ }
+ advance();
+
+ AST *inits = 0;
+ if (!parseMemInitializerList(inits)) {
+ reportError(i18n("Member initializers expected"));
+ }
+
+ return true;
+}
+
+bool Parser::parseElaboratedTypeSpecifier(TypeSpecifierAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ int tk = tokenStream->lookAhead();
+ if (tk == Token_class ||
+ tk == Token_struct ||
+ tk == Token_union ||
+ tk == Token_enum ||
+ tk == Token_typename)
+ {
+ AST *kind = CreateNode<AST>(m_pool);
+ advance();
+ UPDATE_POS(kind, start, tokenStream->cursor());
+
+ NameAST *name = 0;
+
+ if (parseName(name)) {
+ ElaboratedTypeSpecifierAST *ast = CreateNode<ElaboratedTypeSpecifierAST>(m_pool);
+ ast->setKind(kind);
+ ast->setName(name);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+ }
+ }
+
+ tokenStream->rewind(start);
+ return false;
+}
+
+bool Parser::parseDeclaratorId(NameAST *&node)
+{
+ return parseName(node);
+}
+
+bool Parser::parseExceptionSpecification(AST *&node)
+{
+ if (tokenStream->lookAhead() != Token_throw) {
+ return false;
+ }
+ advance();
+
+ ADVANCE('(', "(");
+ if (tokenStream->lookAhead() == Token_ellipsis) {
+ // extension found in MSVC++ 7.x headers
+ int start = tokenStream->cursor();
+ AST *ast = CreateNode<AST>(m_pool);
+ AST_FROM_TOKEN(ellipsis, tokenStream->cursor());
+ ellipsis->setParent(ast);
+ advance();
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ } else {
+ parseTypeIdList(node);
+ }
+ ADVANCE(')', ")");
+
+ return true;
+}
+
+bool Parser::parseEnumerator(EnumeratorAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_identifier) {
+ return false;
+ }
+ advance();
+
+ EnumeratorAST *ena = CreateNode<EnumeratorAST>(m_pool);
+ node = ena;
+
+ AST *id = CreateNode<AST>(m_pool);
+ UPDATE_POS(id, start, tokenStream->cursor());
+ node->setId(id);
+
+ if (tokenStream->lookAhead() == '=') {
+ advance();
+
+ AbstractExpressionAST *expr = 0;
+ if (!parseConstantExpression(expr)) {
+ reportError(i18n("Constant expression expected"));
+ }
+ node->setExpression(expr);
+ }
+
+ UPDATE_POS(node, start, tokenStream->cursor());
+
+ return true;
+}
+
+bool Parser::parseInitDeclarator(InitDeclaratorAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ DeclaratorAST *decl = 0;
+ AST *init = 0;
+ if (!parseDeclarator(decl)) {
+ return false;
+ }
+
+ parseInitializer(init);
+
+ InitDeclaratorAST *ast = CreateNode<InitDeclaratorAST>(m_pool);
+ ast->setDeclarator(decl);
+ ast->setInitializer(init);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+
+
+bool Parser::parseBaseClause(BaseClauseAST *&node)
+{
+ int start = tokenStream->cursor();
+ if (tokenStream->lookAhead() != ':') {
+ return false;
+ }
+ advance();
+
+ BaseClauseAST *bca = CreateNode<BaseClauseAST>(m_pool);
+
+ BaseSpecifierAST *baseSpec = 0;
+ if (parseBaseSpecifier(baseSpec)) {
+ bca->addBaseSpecifier(baseSpec);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseBaseSpecifier(baseSpec)) {
+ reportError(i18n("Base class specifier expected"));
+ return false;
+ }
+ bca->addBaseSpecifier(baseSpec);
+ }
+ } else
+ return false;
+
+ UPDATE_POS(bca, start, tokenStream->cursor());
+ node = bca;
+
+ return true;
+}
+
+bool Parser::parseInitializer(AST *&node)
+{
+ if (tokenStream->lookAhead() == '=') {
+ advance();
+
+ if (!parseInitializerClause(node)) {
+ reportError(i18n("Initializer clause expected"));
+ return false;
+ }
+ return true;
+ } else if (tokenStream->lookAhead() == '(') {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ skipCommaExpression(expr);
+ CHECK(')', ")");
+ node = expr;
+ return true;
+ }
+
+ return false;
+}
+
+bool Parser::parseMemInitializerList(AST *&/*node*/)
+{
+ AST *init = 0;
+ if (!parseMemInitializer(init)) {
+ return false;
+ }
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+
+ if (!parseMemInitializer(init)) {
+ break;
+ }
+ }
+
+ return true;
+}
+
+bool Parser::parseMemInitializer(AST *&/*node*/)
+{
+ NameAST *initId = 0;
+ if (!parseMemInitializerId(initId)) {
+ reportError(i18n("Identifier expected"));
+ return false;
+ }
+ ADVANCE('(', "(");
+ AbstractExpressionAST *expr = 0;
+ skipCommaExpression(expr);
+ ADVANCE(')', ")");
+
+ return true;
+}
+
+bool Parser::parseTypeIdList(AST *&node)
+{
+
+ int start = tokenStream->cursor();
+
+ TypeIdAST *typeId = 0;
+ if (!parseTypeId(typeId)) {
+ return false;
+ }
+
+ AST *ast = CreateNode<AST>(m_pool);
+ typeId->setParent(ast);
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+ if (parseTypeId(typeId)) {
+ typeId->setParent(ast);
+ } else {
+ reportError(i18n("Type id expected"));
+ break;
+ }
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseBaseSpecifier(BaseSpecifierAST *&node)
+{
+ int start = tokenStream->cursor();
+ BaseSpecifierAST *ast = CreateNode<BaseSpecifierAST>(m_pool);
+
+ AST *access = 0;
+ if (tokenStream->lookAhead() == Token_virtual) {
+ AST_FROM_TOKEN(virt, tokenStream->cursor());
+ ast->setIsVirtual(virt);
+
+ advance();
+
+ parseAccessSpecifier(access);
+ } else {
+ parseAccessSpecifier(access);
+
+ if (tokenStream->lookAhead() == Token_virtual) {
+ AST_FROM_TOKEN(virt, tokenStream->cursor());
+ ast->setIsVirtual(virt);
+ advance();
+ }
+ }
+
+ NameAST *name = 0;
+ if (!parseName(name)) {
+ reportError(i18n("Class name expected"));
+ }
+
+ ast->setAccess(access);
+ ast->setName(name);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+
+bool Parser::parseInitializerClause(AST *&node)
+{
+ if (tokenStream->lookAhead() == '{') {
+ if (!skip('{','}')) {
+ reportError(i18n("} missing"));
+ } else
+ advance();
+ } else {
+ AbstractExpressionAST *expr = 0;
+ if (!parseAssignmentExpression(expr)) {
+ //reportError(i18n("Expression expected"));
+ }
+ node = expr;
+ }
+
+ return true;
+}
+
+bool Parser::parseMemInitializerId(NameAST *&node)
+{
+
+ return parseName(node);
+}
+
+bool Parser::parsePtrToMember(AST *&/*node*/) /// ### create the AST node
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() == Token_scope)
+ advance();
+
+ ClassOrNamespaceNameAST *name = 0;
+ while (tokenStream->lookAhead() == Token_identifier) {
+
+ if (!parseUnqualifiedName(name))
+ break;
+
+ if (tokenStream->lookAhead() == Token_scope
+ && tokenStream->lookAhead(1) == '*') {
+ advance();
+ advance();
+ return true;
+ }
+
+ if (tokenStream->lookAhead() == Token_scope)
+ advance();
+ }
+
+ tokenStream->rewind(start);
+ return false;
+}
+
+bool Parser::parseUnqualifiedName(ClassOrNamespaceNameAST *&node, bool parseTemplateId)
+{
+ int start = tokenStream->cursor();
+ bool isDestructor = false;
+
+ ClassOrNamespaceNameAST *ast = CreateNode<ClassOrNamespaceNameAST>(m_pool);
+
+ if (tokenStream->lookAhead() == Token_identifier) {
+ int startName = tokenStream->cursor();
+ AST *n = CreateNode<AST>(m_pool);
+ advance();
+ UPDATE_POS(n, startName, tokenStream->cursor());
+ ast->setName(n);
+ } else if (tokenStream->lookAhead() == '~' && tokenStream->lookAhead(1) == Token_identifier) {
+ int startName = tokenStream->cursor();
+ AST *n = CreateNode<AST>(m_pool);
+ advance(); // skip ~
+ advance(); // skip classname
+ UPDATE_POS(n, startName, tokenStream->cursor());
+ ast->setName(n);
+ isDestructor = true;
+ } else if (tokenStream->lookAhead() == Token_operator) {
+ AST *n = 0;
+ if (!parseOperatorFunctionId(n))
+ return false;
+ ast->setName(n);
+ } else {
+ return false;
+ }
+
+ if (parseTemplateId && !isDestructor) {
+
+ int index = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() == '<') {
+ advance();
+
+ // optional template arguments
+ TemplateArgumentListAST *args = 0;
+ parseTemplateArgumentList(args);
+
+ if (tokenStream->lookAhead() != '>') {
+ tokenStream->rewind(index);
+ } else {
+ advance();
+ ast->setTemplateArgumentList(args);
+ }
+ }
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseStringLiteral(AST *&node)
+{
+ int start = tokenStream->cursor();
+
+ while (tokenStream->lookAhead()) {
+ if (tokenStream->lookAhead() == Token_identifier &&
+ tokenStream->currentTokenText() == "L" && tokenStream->lookAhead(1) == Token_string_literal) {
+
+ advance();
+ advance();
+ } else if (tokenStream->lookAhead() == Token_string_literal) {
+ advance();
+ } else
+ return false;
+ }
+
+ AST *ast = CreateNode<AST>(m_pool);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::skipExpressionStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *expr = 0;
+ skipCommaExpression(expr);
+
+ ADVANCE(';', ";");
+
+ ExpressionStatementAST *ast = CreateNode<ExpressionStatementAST>(m_pool);
+ ast->setExpression(expr);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ switch(tokenStream->lookAhead()) {
+
+ case Token_while:
+ return parseWhileStatement(node);
+
+ case Token_do:
+ return parseDoStatement(node);
+
+ case Token_for:
+ return parseForStatement(node);
+
+ case Token_if:
+ return parseIfStatement(node);
+
+ case Token_switch:
+ return parseSwitchStatement(node);
+
+ case Token_try:
+ return parseTryBlockStatement(node);
+
+ case Token_case:
+ case Token_default:
+ return parseLabeledStatement(node);
+
+ case Token_break:
+ case Token_continue:
+ advance();
+ ADVANCE(';', ";");
+ return true;
+
+ case Token_goto:
+ advance();
+ ADVANCE(Token_identifier, "identifier");
+ ADVANCE(';', ";");
+ return true;
+
+ case Token_return:
+ {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ skipCommaExpression(expr);
+
+ ADVANCE(';', ";");
+
+ ReturnStatementAST *ast = CreateNode<ReturnStatementAST>(m_pool);
+ ast->setExpression(expr);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ case '{':
+ return parseCompoundStatement(node);
+
+ case Token_identifier:
+ if (parseLabeledStatement(node))
+ return true;
+ break;
+ }
+
+ if (parseDeclarationStatement(node))
+ return true;
+
+ return skipExpressionStatement(node);
+}
+
+bool Parser::parseCondition(ConditionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ConditionAST *ast = CreateNode<ConditionAST>(m_pool);
+ TypeSpecifierAST *spec = 0;
+
+ if (parseTypeSpecifier(spec)) {
+ DeclaratorAST *decl = 0;
+ if (parseDeclarator(decl) && tokenStream->lookAhead() == '=') {
+ advance();
+
+ AbstractExpressionAST *expr = 0;
+ if (parseExpression(expr)) {
+ ast->setTypeSpec(spec);
+ ast->setDeclarator(decl);
+ ast->setExpression(expr);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+ }
+ }
+ }
+
+ tokenStream->rewind(start);
+
+ AbstractExpressionAST *expr = 0;
+ if (!skipCommaExpression(expr)) {
+ return false;
+ }
+
+ ast->setExpression(expr);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+
+bool Parser::parseWhileStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ADVANCE(Token_while, "while");
+ ADVANCE('(' , "(");
+
+ ConditionAST *cond = 0;
+ if (!parseCondition(cond)) {
+ reportError(i18n("condition expected"));
+ return false;
+ }
+ ADVANCE(')', ")");
+
+ StatementAST *body = 0;
+ if (!parseStatement(body)) {
+ reportError(i18n("statement expected"));
+ return false;
+ }
+
+ WhileStatementAST *ast = CreateNode<WhileStatementAST>(m_pool);
+ ast->setCondition(cond);
+ ast->setStatement(body);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseDoStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ADVANCE(Token_do, "do");
+
+ StatementAST *body = 0;
+ if (!parseStatement(body)) {
+ reportError(i18n("statement expected"));
+ //return false;
+ }
+
+ ADVANCE_NR(Token_while, "while");
+ ADVANCE_NR('(' , "(");
+
+ AbstractExpressionAST *expr = 0;
+ if (!skipCommaExpression(expr)) {
+ reportError(i18n("expression expected"));
+ //return false;
+ }
+
+ ADVANCE_NR(')', ")");
+ ADVANCE_NR(';', ";");
+
+ DoStatementAST *ast = CreateNode<DoStatementAST>(m_pool);
+ ast->setStatement(body);
+ //ast->setCondition(condition);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseForStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ADVANCE(Token_for, "for");
+ ADVANCE('(', "(");
+
+ StatementAST *init = 0;
+ if (!parseForInitStatement(init)) {
+ reportError(i18n("for initialization expected"));
+ return false;
+ }
+
+ ConditionAST *cond = 0;
+ parseCondition(cond);
+ ADVANCE(';', ";");
+
+ AbstractExpressionAST *expr = 0;
+ skipCommaExpression(expr);
+ ADVANCE(')', ")");
+
+ StatementAST *body = 0;
+ if (!parseStatement(body))
+ return false;
+
+ ForStatementAST *ast = CreateNode<ForStatementAST>(m_pool);
+ ast->setInitStatement(init);
+ ast->setCondition(cond);
+ // ast->setExpression(expression);
+ ast->setStatement(body);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseForInitStatement(StatementAST *&node)
+{
+ if (parseDeclarationStatement(node))
+ return true;
+
+ return skipExpressionStatement(node);
+}
+
+bool Parser::parseCompoundStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != '{') {
+ return false;
+ }
+ advance();
+
+ StatementListAST *ast = CreateNode<StatementListAST>(m_pool);
+
+ while (tokenStream->lookAhead()) {
+ if (tokenStream->lookAhead() == '}')
+ break;
+
+ StatementAST *stmt = 0;
+ int startStmt = tokenStream->cursor();
+ if (!parseStatement(stmt)) {
+ if (startStmt == tokenStream->cursor())
+ advance();
+ skipUntilStatement();
+ } else {
+ ast->addStatement(stmt);
+ }
+ }
+
+ if (tokenStream->lookAhead() != '}') {
+ reportError(i18n("} expected"));
+ } else {
+ advance();
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseIfStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ ADVANCE(Token_if, "if");
+
+ ADVANCE('(' , "(");
+
+ IfStatementAST *ast = CreateNode<IfStatementAST>(m_pool);
+
+ ConditionAST *cond = 0;
+ if (!parseCondition(cond)) {
+ reportError(i18n("condition expected"));
+ return false;
+ }
+ ADVANCE(')', ")");
+
+ StatementAST *stmt = 0;
+ if (!parseStatement(stmt)) {
+ reportError(i18n("statement expected"));
+ return false;
+ }
+
+ ast->setCondition(cond);
+ ast->setStatement(stmt);
+
+ if (tokenStream->lookAhead() == Token_else) {
+ advance();
+ StatementAST *elseStmt = 0;
+ if (!parseStatement(elseStmt)) {
+ reportError(i18n("statement expected"));
+ return false;
+ }
+ ast->setElseStatement(elseStmt);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseSwitchStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+ ADVANCE(Token_switch, "switch");
+
+ ADVANCE('(' , "(");
+
+ ConditionAST *cond = 0;
+ if (!parseCondition(cond)) {
+ reportError(i18n("condition expected"));
+ return false;
+ }
+ ADVANCE(')', ")");
+
+ StatementAST *stmt = 0;
+ if (!parseStatement(stmt)) {
+ syntaxError();
+ return false;
+ }
+
+ SwitchStatementAST *ast = CreateNode<SwitchStatementAST>(m_pool);
+ ast->setCondition(cond);
+ ast->setStatement(stmt);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseLabeledStatement(StatementAST *&node)
+{
+ switch(tokenStream->lookAhead()) {
+ case Token_identifier:
+ case Token_default:
+ if (tokenStream->lookAhead(1) == ':') {
+ advance();
+ advance();
+
+ StatementAST *stmt = 0;
+ LabeledStatementAST *ast = CreateNode<LabeledStatementAST>(m_pool);
+ node = ast;
+ if (parseStatement(stmt)) {
+ ast->setStatement(stmt);
+ return true;
+ }
+ }
+ break;
+
+ case Token_case:
+ {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ if (!parseConstantExpression(expr)) {
+ reportError(i18n("expression expected"));
+ } else if (tokenStream->lookAhead() == Token_ellipsis) {
+ advance();
+
+ AbstractExpressionAST *expr2 = 0;
+ if (!parseConstantExpression(expr2)) {
+ reportError(i18n("expression expected"));
+ }
+ }
+ ADVANCE(':', ":");
+
+ StatementAST *stmt = 0;
+ LabeledStatementAST *ast = CreateNode<LabeledStatementAST>(m_pool);
+ node = ast;
+ ast->setExpression(expr);
+
+ if (parseStatement(stmt)) {
+ ast->setStatement(stmt);
+ return true;
+ }
+ }
+ break;
+
+ }
+ return false;
+}
+
+bool Parser::parseBlockDeclaration(DeclarationAST *&node)
+{
+ switch(tokenStream->lookAhead()) {
+ case Token_typedef:
+ return parseTypedef(node);
+ case Token_using:
+ return parseUsing(node);
+ case Token_asm:
+ return parseAsmDefinition(node);
+ case Token_namespace:
+ return parseNamespaceAliasDefinition(node);
+ }
+
+ int start = tokenStream->cursor();
+
+ AST *storageSpec = 0;
+ parseStorageClassSpecifier(storageSpec);
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ TypeSpecifierAST *spec = 0;
+ if (!parseTypeSpecifierOrClassSpec(spec)) { // replace with simpleTypeSpecifier?!?!
+ tokenStream->rewind(start);
+ return false;
+ }
+ spec->setCvQualify(cv);
+
+ AST *cv2 = 0;
+ parseCvQualify(cv2);
+ spec->setCv2Qualify(cv2);
+
+ InitDeclaratorListAST *declarators = 0;
+ parseInitDeclaratorList(declarators);
+
+ if (tokenStream->lookAhead() != ';') {
+ tokenStream->rewind(start);
+ return false;
+ }
+ advance();
+
+ SimpleDeclarationAST *ast = CreateNode<SimpleDeclarationAST>(m_pool);
+ ast->setTypeSpec(spec);
+ ast->setInitDeclaratorList(declarators);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseNamespaceAliasDefinition(DeclarationAST *&/*node*/)
+{
+ if (tokenStream->lookAhead() != Token_namespace) {
+ return false;
+ }
+ advance();
+
+ ADVANCE(Token_identifier, "identifier");
+ ADVANCE('=', "=");
+
+ NameAST *name = 0;
+ if (!parseName(name)) {
+ reportError(i18n("Namespace name expected"));
+ }
+
+ ADVANCE(';', ";");
+
+ return true;
+
+}
+
+bool Parser::parseDeclarationStatement(StatementAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ DeclarationAST *decl = 0;
+ if (!parseBlockDeclaration(decl))
+ return false;
+
+ DeclarationStatementAST *ast = CreateNode<DeclarationStatementAST>(m_pool);
+ ast->setDeclaration(decl);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseDeclarationInternal(DeclarationAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ // that is for the case '__declspec(dllexport) int ...' or
+ // '__declspec(dllexport) inline int ...', etc.
+ AST *winDeclSpec = 0;
+ parseWinDeclSpec(winDeclSpec);
+
+ AST *funSpec = 0;
+ bool hasFunSpec = parseFunctionSpecifier(funSpec);
+
+ AST *storageSpec = 0;
+ bool hasStorageSpec = parseStorageClassSpecifier(storageSpec);
+
+ if (hasStorageSpec && !hasFunSpec)
+ hasFunSpec = parseFunctionSpecifier(funSpec);
+
+ // that is for the case 'friend __declspec(dllexport) ....'
+ AST *winDeclSpec2 = 0;
+ parseWinDeclSpec(winDeclSpec2);
+
+ AST *cv = 0;
+ parseCvQualify(cv);
+
+ int index = tokenStream->cursor();
+ NameAST *name = 0;
+ if (parseName(name) && tokenStream->lookAhead() == '(') {
+ // no type specifier, maybe a constructor or a cast operator??
+
+ tokenStream->rewind(index);
+
+ InitDeclaratorAST *declarator = 0;
+ if (parseInitDeclarator(declarator)) {
+ switch(tokenStream->lookAhead()) {
+ case ';':
+ {
+ advance();
+
+ InitDeclaratorListAST *declarators = CreateNode<InitDeclaratorListAST>(m_pool);
+
+ // update declarators position
+ if (declarator)
+ declarators->setPosition(declarator->startToken(), declarator->endToken());
+ declarators->addInitDeclarator(declarator);
+
+ SimpleDeclarationAST *ast = CreateNode<SimpleDeclarationAST>(m_pool);
+ ast->setInitDeclaratorList(declarators);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+
+ }
+ break;
+
+ case ':':
+ {
+ AST *ctorInit = 0;
+ StatementListAST *funBody = 0;
+ if (parseCtorInitializer(ctorInit) && parseFunctionBody(funBody)) {
+ FunctionDefinitionAST *ast = CreateNode<FunctionDefinitionAST>(m_pool);
+ ast->setStorageSpecifier(storageSpec);
+ ast->setFunctionSpecifier(funSpec);
+ ast->setInitDeclarator(declarator);
+ ast->setFunctionBody(funBody);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+ }
+ break;
+
+ case '{':
+ {
+ StatementListAST *funBody = 0;
+ if (parseFunctionBody(funBody)) {
+ FunctionDefinitionAST *ast = CreateNode<FunctionDefinitionAST>(m_pool);
+ ast->setStorageSpecifier(storageSpec);
+ ast->setFunctionSpecifier(funSpec);
+ ast->setInitDeclarator(declarator);
+ ast->setFunctionBody(funBody);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+ }
+ break;
+
+ case '(':
+ case '[':
+ // ops!! it seems a declarator
+ goto start_decl;
+ break;
+ }
+
+ }
+ }
+
+start_decl:
+ tokenStream->rewind(index);
+
+ if (tokenStream->lookAhead() == Token_const && tokenStream->lookAhead(1) == Token_identifier && tokenStream->lookAhead(2) == '=') {
+ // constant definition
+ advance();
+ InitDeclaratorListAST *declarators = 0;
+ if (parseInitDeclaratorList(declarators)) {
+ ADVANCE(';', ";");
+ DeclarationAST *ast = CreateNode<DeclarationAST>(m_pool);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+ syntaxError();
+ return false;
+ }
+
+ TypeSpecifierAST *spec = 0;
+ if (parseTypeSpecifier(spec)) {
+ if (!hasFunSpec)
+ parseFunctionSpecifier(funSpec); // e.g. "void inline"
+ spec->setCvQualify(cv);
+
+ InitDeclaratorListAST *declarators = 0;
+
+ InitDeclaratorAST *decl = 0;
+ int startDeclarator = tokenStream->cursor();
+ bool maybeFunctionDefinition = false;
+
+ if (tokenStream->lookAhead() != ';') {
+ if (parseInitDeclarator(decl) && tokenStream->lookAhead() == '{') {
+ // function definition
+ maybeFunctionDefinition = true;
+ } else {
+ tokenStream->rewind(startDeclarator);
+ if (!parseInitDeclaratorList(declarators)) {
+ syntaxError();
+ return false;
+ }
+ }
+ }
+
+ switch(tokenStream->lookAhead()) {
+ case ';':
+ {
+ advance();
+ SimpleDeclarationAST *ast = CreateNode<SimpleDeclarationAST>(m_pool);
+ ast->setStorageSpecifier(storageSpec);
+ ast->setFunctionSpecifier(funSpec);
+ ast->setTypeSpec(spec);
+ ast->setWinDeclSpec(winDeclSpec);
+ ast->setInitDeclaratorList(declarators);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ }
+ return true;
+
+ case '{':
+ {
+ if (!maybeFunctionDefinition) {
+ syntaxError();
+ return false;
+ }
+ StatementListAST *funBody = 0;
+ if (parseFunctionBody(funBody)) {
+ FunctionDefinitionAST *ast = CreateNode<FunctionDefinitionAST>(m_pool);
+ ast->setWinDeclSpec(winDeclSpec);
+ ast->setStorageSpecifier(storageSpec);
+ ast->setFunctionSpecifier(funSpec);
+ ast->setTypeSpec(spec);
+ ast->setInitDeclarator(decl);
+ ast->setFunctionBody(funBody);
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+ }
+ break;
+
+ }
+ }
+
+ syntaxError();
+ return false;
+}
+
+bool Parser::parseFunctionBody(StatementListAST *&node)
+{
+ int start = tokenStream->cursor();
+ if (tokenStream->lookAhead() != '{') {
+ return false;
+ }
+ advance();
+
+ StatementListAST *ast = CreateNode<StatementListAST>(m_pool);
+
+ while (tokenStream->lookAhead()) {
+ if (tokenStream->lookAhead() == '}')
+ break;
+
+ StatementAST *stmt = 0;
+ int startStmt = tokenStream->cursor();
+ if (!parseStatement(stmt)) {
+ syntaxError();
+ if (startStmt == tokenStream->cursor())
+ advance();
+ skipUntilStatement();
+ } else
+ ast->addStatement(stmt);
+ }
+
+ if (tokenStream->lookAhead() != '}') {
+ reportError(i18n("} expected"));
+ } else
+ advance();
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+bool Parser::parseTypeSpecifierOrClassSpec(TypeSpecifierAST *&node)
+{
+ if (parseClassSpecifier(node))
+ return true;
+ else if (parseEnumSpecifier(node))
+ return true;
+ else if (parseTypeSpecifier(node))
+ return true;
+
+ return false;
+}
+
+bool Parser::parseTryBlockStatement(StatementAST *&node)
+{
+ if (tokenStream->lookAhead() != Token_try) {
+ return false;
+ }
+ advance();
+
+ StatementAST *stmt = 0;
+ if (!parseCompoundStatement(stmt)) {
+ syntaxError();
+ return false;
+ }
+
+ if (tokenStream->lookAhead() != Token_catch) {
+ reportError(i18n("catch expected"));
+ return false;
+ }
+
+ while (tokenStream->lookAhead() == Token_catch) {
+ advance();
+ ADVANCE('(', "(");
+ ConditionAST *cond = 0;
+ if (tokenStream->lookAhead() == Token_ellipsis) {
+ advance();
+ } else if (!parseCondition(cond)) {
+ reportError(i18n("condition expected"));
+ return false;
+ }
+ ADVANCE(')', ")");
+
+ StatementAST *body = 0;
+ if (!parseCompoundStatement(body)) {
+ syntaxError();
+ return false;
+ }
+ }
+
+ node = stmt;
+ return true;
+}
+
+bool Parser::parsePrimaryExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_PrimaryExpression>(m_pool);
+
+ switch(tokenStream->lookAhead()) {
+ case Token_string_literal:
+ {
+ AST *lit = 0;
+ parseStringLiteral(lit);
+ if (lit)
+ lit->setParent(ast);
+ }
+ break;
+
+ case Token_number_literal:
+ case Token_char_literal:
+ case Token_true:
+ case Token_false:
+ case Token_this:
+ {
+ AST_FROM_TOKEN(opNode, tokenStream->cursor());
+ opNode->setParent(ast);
+ advance();
+ }
+ break;
+
+ case '(':
+ {
+ advance();
+
+ if (tokenStream->lookAhead() == '{') {
+ StatementAST *stmt = 0;
+ if (!parseCompoundStatement(stmt))
+ return false;
+ if (stmt)
+ stmt->setParent(ast);
+ } else {
+ AbstractExpressionAST *expr = 0;
+ if (!parseExpression(expr)) {
+ return false;
+ }
+ if (expr)
+ expr->setParent(ast);
+ }
+ CHECK(')', ")");
+ }
+ break;
+
+ default:
+ {
+/* ### reenable me
+ TypeSpecifierAST *typeSpec = 0;
+ if (parseSimpleTypeSpecifier(typeSpec) && tokenStream->lookAhead() == '(') {
+ Q_ASSERT (0);
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+ CHECK(')', ")");
+ break;
+
+ if (typeSpec)
+ typeSpec->setParent(ast);
+
+ if (expr)
+ expr->setParent(ast);
+ }
+
+ tokenStream->rewind(start);
+*/
+
+ NameAST *name = 0;
+ if (!parseName(name, false))
+ return false;
+
+ if (name)
+ name->setParent(ast);
+
+ break;
+ }
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+
+/*
+ postfix-expression-internal:
+ [ expression ]
+ ( expression-list [opt] )
+ (.|->) template [opt] id-expression
+ (.|->) pseudo-destructor-name
+ ++
+ --
+*/
+bool Parser::parsePostfixExpressionInternal(AbstractExpressionAST *postfixExpr, AbstractExpressionAST *&node)
+{
+ Q_ASSERT (postfixExpr);
+
+ int start = tokenStream->cursor();
+
+ switch (tokenStream->lookAhead()) {
+ case '[':
+ {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseExpression(expr);
+ CHECK(']', "]");
+
+ SubscriptingAST *ast = CreateNode<SubscriptingAST>(m_pool);
+ ast->setExpression(postfixExpr);
+ ast->setSubscript(expr);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ case '(':
+ {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseExpression(expr);
+ CHECK(')', ")");
+
+ FunctionCallAST *ast = CreateNode<FunctionCallAST>(m_pool);
+ ast->setExpression(postfixExpr);
+ ast->setArguments(expr);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ case '.':
+ case Token_arrow:
+ {
+ AST_FROM_TOKEN(op, tokenStream->cursor());
+
+ advance();
+ if (tokenStream->lookAhead() == Token_template)
+ advance();
+
+ NameAST *name = 0;
+ if (!parseName(name))
+ return false;
+
+ ClassMemberAccessAST *ast = CreateNode<ClassMemberAccessAST>(m_pool);
+ ast->setOp(op);
+ ast->setExpression(postfixExpr);
+ ast->setName(name);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ case Token_incr:
+ case Token_decr:
+ {
+ AST_FROM_TOKEN(op, tokenStream->cursor());
+ advance();
+
+ IncrDecrAST *ast = CreateNode<IncrDecrAST>(m_pool);
+ ast->setExpression(postfixExpr);
+ ast->setOp(op);
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/*
+ postfix-expression:
+ simple-type-specifier ( expression-list [opt] )
+ primary-expression postfix-expression-internal*
+*/
+bool Parser::parsePostfixExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ switch (tokenStream->lookAhead()) {
+ case Token_dynamic_cast:
+ case Token_static_cast:
+ case Token_reinterpret_cast:
+ case Token_const_cast:
+ {
+ AST_FROM_TOKEN(castOp, tokenStream->cursor());
+
+ advance();
+ CHECK('<', "<");
+ TypeIdAST *typeId = 0;
+ parseTypeId(typeId);
+ CHECK('>', ">");
+
+ CHECK('(', ")");
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+ CHECK(')', ")");
+
+ CppCastExpressionAST *tmp = CreateNode<CppCastExpressionAST>(m_pool);
+ tmp->setCastOp(castOp);
+ tmp->setTypeId(typeId);
+ tmp->setExpression(expr);
+
+ AbstractExpressionAST *ast = tmp;
+ AbstractExpressionAST *e = 0;
+ while (parsePostfixExpressionInternal(ast, e)) {
+ ast = e;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ }
+ return true;
+
+ case Token_typename:
+ {
+ advance();
+
+ NameAST* name = 0;
+ if (!parseName(name))
+ return false;
+
+ CHECK('(', "(");
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+ CHECK(')', ")");
+
+ // ### AST
+ }
+ return true;
+
+ case Token_typeid:
+ {
+ advance();
+
+ CHECK('(', "(");
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+ CHECK(')', ")");
+
+ // ### AST
+ }
+ return true;
+
+ default:
+ break;
+ }
+
+ TypeSpecifierAST *typeSpec = 0;
+ AbstractExpressionAST *expr = 0;
+
+ if (parseSimpleTypeSpecifier(typeSpec/*, true*/) && tokenStream->lookAhead() == '(') {
+ advance(); // skip '('
+ parseCommaExpression(expr);
+ CHECK(')', ")");
+ } else {
+ tokenStream->rewind(start);
+
+ if (!parsePrimaryExpression(expr))
+ return false;
+ }
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_PostfixExpression>(m_pool);
+ if (typeSpec)
+ typeSpec->setParent(ast);
+
+ if (expr)
+ expr->setParent(ast);
+
+ AbstractExpressionAST *e = 0;
+ while (parsePostfixExpressionInternal(ast, e)) {
+ ast = e;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseUnaryExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ switch(tokenStream->lookAhead()) {
+ case Token_incr:
+ case Token_decr:
+ case '*':
+ case '&':
+ case '+':
+ case '-':
+ case '!':
+ case '~':
+ {
+ AST_FROM_TOKEN(opNode, tokenStream->cursor());
+
+ advance();
+ AbstractExpressionAST *expr = 0;
+ if (!parseCastExpression(expr))
+ return false;
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_UnaryExpression>(m_pool);
+
+ opNode->setParent(ast);
+ if (expr)
+ expr->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+
+ case Token_sizeof:
+ {
+ AbstractExpressionAST *ast = CreateExpression<NodeType_UnaryExpression>(m_pool);
+
+ AST_FROM_TOKEN(opNode, tokenStream->cursor());
+ opNode->setParent(ast);
+
+ advance();
+ int index = tokenStream->cursor();
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+ TypeIdAST *typeId = 0;
+ if (parseTypeId(typeId) && tokenStream->lookAhead() == ')') {
+ if (typeId)
+ typeId->setParent(ast);
+
+ advance();
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+ tokenStream->rewind(index);
+ }
+ AbstractExpressionAST *expr = 0;
+ if (!parseUnaryExpression(expr))
+ return false;
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+
+ case Token_new:
+ return parseNewExpression(node);
+
+ case Token_delete:
+ return parseDeleteExpression(node);
+ }
+
+ return parsePostfixExpression(node);
+}
+
+bool Parser::parseNewExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_NewExpression>(m_pool);
+
+ if (tokenStream->lookAhead() == Token_scope && tokenStream->lookAhead(1) == Token_new) {
+ AST_FROM_TOKEN(scopeNode, tokenStream->cursor());
+ scopeNode->setParent(ast);
+ advance();
+ }
+
+ AST_FROM_TOKEN(newNode, tokenStream->cursor());
+ newNode->setParent(ast);
+
+ CHECK(Token_new, "new");
+
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+ if (expr)
+ expr->setParent(ast);
+ CHECK(')', ")");
+ }
+
+ if (tokenStream->lookAhead() == '(') {
+ advance();
+ TypeIdAST *typeId = 0;
+ parseTypeId(typeId);
+ if (typeId)
+ typeId->setParent(ast);
+ CHECK(')', ")");
+ } else {
+ AbstractExpressionAST *typeId = 0;
+ parseNewTypeId(typeId);
+ if (typeId)
+ typeId->setParent(ast);
+ }
+
+ AbstractExpressionAST *init = 0;
+ parseNewInitializer(init);
+ if (init)
+ init->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseNewTypeId(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ TypeSpecifierAST *typeSpec = 0;
+ if (!parseTypeSpecifier(typeSpec))
+ return false;
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_NewTypeId>(m_pool);
+
+ if (typeSpec)
+ typeSpec->setParent(ast);
+
+ AbstractExpressionAST *declarator = 0;
+ parseNewDeclarator(declarator);
+ if (declarator)
+ declarator->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseNewDeclarator(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_NewInitializer>(m_pool);
+
+ AST *ptrOp = 0;
+ if (parsePtrOperator(ptrOp)) {
+ if (ptrOp)
+ ptrOp->setParent(ast);
+
+ AbstractExpressionAST *declarator = 0;
+ parseNewDeclarator(declarator);
+
+ if (declarator)
+ declarator->setParent(ast);
+ }
+
+ while (tokenStream->lookAhead() == '[') {
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseExpression(expr);
+ ADVANCE(']', "]");
+
+ if (expr)
+ expr->setParent(ast);
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseNewInitializer(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != '(')
+ return false;
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_NewInitializer>(m_pool);
+
+ advance();
+ AbstractExpressionAST *expr = 0;
+ parseCommaExpression(expr);
+
+ if (expr)
+ expr->setParent(ast);
+
+ CHECK(')', ")");
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseDeleteExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_DeleteExpression>(m_pool);
+
+ if (tokenStream->lookAhead() == Token_scope && tokenStream->lookAhead(1) == Token_delete) {
+ AST_FROM_TOKEN(scopeNode, tokenStream->cursor());
+ scopeNode->setParent(ast);
+ advance();
+ }
+
+ AST_FROM_TOKEN(deleteNode, tokenStream->cursor());
+ deleteNode->setParent(ast);
+
+ CHECK(Token_delete, "delete");
+
+ if (tokenStream->lookAhead() == '[') {
+ int beg = tokenStream->cursor();
+ advance();
+ CHECK(']', "]");
+
+ AST *n = CreateNode<AST>(m_pool);
+ UPDATE_POS(n, beg, tokenStream->cursor());
+ n->setParent(ast);
+ }
+
+ AbstractExpressionAST *expr = 0;
+ if (!parseCastExpression(expr))
+ return false;
+
+ if (expr)
+ expr->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseCastExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() == '(') {
+ AbstractExpressionAST *ast = CreateExpression<NodeType_CastExpression>(m_pool);
+
+ advance();
+ TypeIdAST *typeId = 0;
+ if (parseTypeId(typeId)) {
+
+ if (typeId)
+ typeId->setParent(ast);
+
+ if (tokenStream->lookAhead() == ')') {
+ advance();
+
+ AbstractExpressionAST *expr = 0;
+ if (parseCastExpression(expr)) {
+ if (expr)
+ expr->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+ }
+ }
+ }
+ }
+
+ tokenStream->rewind(start);
+ return parseUnaryExpression(node);
+}
+
+bool Parser::parsePmExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseCastExpression(ast) || !ast) // ### fixme
+ return false;
+
+ while (tokenStream->lookAhead() == Token_ptrmem) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseCastExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseMultiplicativeExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parsePmExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == '*' || tokenStream->lookAhead() == '/' || tokenStream->lookAhead() == '%') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parsePmExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+
+bool Parser::parseAdditiveExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseMultiplicativeExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == '+' || tokenStream->lookAhead() == '-') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseMultiplicativeExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseShiftExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseAdditiveExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == Token_shift) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseAdditiveExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseRelationalExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseShiftExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == '<' || (tokenStream->lookAhead() == '>' && !templArgs) ||
+ tokenStream->lookAhead() == Token_leq || tokenStream->lookAhead() == Token_geq) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseShiftExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseEqualityExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseRelationalExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == Token_eq || tokenStream->lookAhead() == Token_not_eq) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseRelationalExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseAndExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseEqualityExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == '&') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseEqualityExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseExclusiveOrExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseAndExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == '^') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseAndExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseInclusiveOrExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseExclusiveOrExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == '|') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseExclusiveOrExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseLogicalAndExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseInclusiveOrExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == Token_and) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseInclusiveOrExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseLogicalOrExpression(AbstractExpressionAST *&node, bool templArgs)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseLogicalAndExpression(ast, templArgs))
+ return false;
+
+ while (tokenStream->lookAhead() == Token_or) {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseLogicalAndExpression(rightExpr, templArgs))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseConditionalExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+ AbstractExpressionAST *ast = 0;
+ if (!parseLogicalOrExpression(ast))
+ return false;
+
+ if (tokenStream->lookAhead() == '?') {
+ advance();
+
+ AbstractExpressionAST *leftExpr = 0;
+ if (!parseExpression(leftExpr))
+ return false;
+
+ CHECK(':', ":");
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseAssignmentExpression(rightExpr))
+ return false;
+
+ ConditionalExpressionAST *tmp = CreateNode<ConditionalExpressionAST>(m_pool);
+ tmp->setCondition(ast);
+ tmp->setLeftExpression(leftExpr);
+ tmp->setRightExpression(rightExpr);
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseAssignmentExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (tokenStream->lookAhead() == Token_throw && !parseThrowExpression(ast))
+ return false;
+ else if (!parseConditionalExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == Token_assign || tokenStream->lookAhead() == '=') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseConditionalExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseConstantExpression(AbstractExpressionAST *&node)
+{
+ return parseConditionalExpression(node);
+}
+
+bool Parser::parseExpression(AbstractExpressionAST *&node)
+{
+ return parseCommaExpression(node);
+}
+
+bool Parser::parseCommaExpression(AbstractExpressionAST *&node)
+{
+ int start = tokenStream->cursor();
+
+ AbstractExpressionAST *ast = 0;
+ if (!parseAssignmentExpression(ast))
+ return false;
+
+ while (tokenStream->lookAhead() == ',') {
+ int startOp = tokenStream->cursor();
+ AST_FROM_TOKEN(op, startOp);
+ advance();
+
+ AbstractExpressionAST *rightExpr = 0;
+ if (!parseAssignmentExpression(rightExpr))
+ return false;
+
+ BinaryExpressionAST *tmp = CreateNode<BinaryExpressionAST>(m_pool);
+ tmp->setOp(op);
+ tmp->setLeftExpression(ast);
+ tmp->setRightExpression(rightExpr);
+ UPDATE_POS(tmp, startOp, tokenStream->cursor());
+ ast = tmp;
+ }
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+ return true;
+}
+
+bool Parser::parseThrowExpression(AbstractExpressionAST *&node)
+{
+ if (tokenStream->lookAhead() != Token_throw)
+ return false;
+
+ int start = tokenStream->cursor();
+
+ AST_FROM_TOKEN(throwNode, tokenStream->cursor());
+ CHECK(Token_throw, "throw");
+ AbstractExpressionAST *expr = 0;
+ if (!parseAssignmentExpression(expr))
+ return false;
+
+ AbstractExpressionAST *ast = CreateExpression<NodeType_ThrowExpression>(m_pool);
+ throwNode->setParent(ast);
+ if (expr)
+ expr->setParent(ast);
+
+ UPDATE_POS(ast, start, tokenStream->cursor());
+ node = ast;
+
+ return true;
+}
+
+
+// ### Objective C++
+bool Parser::parseIvarDeclList(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseIvarDecls(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseIvarDecl(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseIvars(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseIvarDeclarator(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseMethodDecl(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseUnarySelector(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordSelector(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseSelector(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordDecl(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseReceiver(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcMessageExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseMessageArgs(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordArgList(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordArg(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseReservedWord(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseMyParms(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseMyParm(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseOptParmList(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcSelectorExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseSelectorArg(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordNameList(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseKeywordName(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcEncodeExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcString(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseProtocolRefs(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseIdentifierList(AST *& node)
+{
+ int start = tokenStream->cursor();
+
+ if (tokenStream->lookAhead() != Token_identifier)
+ return false;
+
+ AST *ast = CreateNode<AST>(m_pool);
+
+ AST_FROM_TOKEN(tk, tokenStream->cursor());
+ tk->setParent(ast);
+ advance();
+
+ while (tokenStream->lookAhead() == ',') {
+ advance();
+ if (tokenStream->lookAhead() == Token_identifier) {
+ AST_FROM_TOKEN(tk, tokenStream->cursor());
+ tk->setParent(ast);
+ advance();
+ }
+ ADVANCE(Token_identifier, "identifier");
+ }
+
+ node = ast;
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+}
+
+bool Parser::parseIdentifierColon(AST *& node)
+{
+ Q_UNUSED(node);
+
+ if (tokenStream->lookAhead() == Token_identifier && tokenStream->lookAhead(1) == ':') {
+ advance();
+ advance();
+ return true;
+ } // ### else if PTYPENAME -> return true ;
+
+ return false;
+}
+
+bool Parser::parseObjcProtocolExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcOpenBracketExpr(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcCloseBracket(AST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcDef(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcClassDef(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcClassDecl(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+
+ ADVANCE(OBJC_CLASS, "@class");
+
+ AST *idList = 0;
+ parseIdentifierList(idList);
+ ADVANCE(';', ";");
+
+ return true;
+}
+
+bool Parser::parseObjcProtocolDecl(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+
+ ADVANCE(OBJC_PROTOCOL, "@protocol");
+
+ AST *idList = 0;
+ parseIdentifierList(idList);
+ ADVANCE(';', ";");
+
+ return true;
+}
+
+bool Parser::parseObjcAliasDecl(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+
+ ADVANCE(OBJC_ALIAS, "@alias");
+
+ AST *idList = 0;
+ parseIdentifierList(idList);
+ ADVANCE(';', ";");
+
+ return true;
+}
+
+bool Parser::parseObjcProtocolDef(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseObjcMethodDef(DeclarationAST *& node)
+{
+ Q_UNUSED(node);
+ return false;
+}
+
+bool Parser::parseWinDeclSpec(AST *& node)
+{
+ if (tokenStream->lookAhead() == Token_identifier
+ && tokenStream->lookAhead(1) == '('
+ && tokenStream->currentTokenText() == "__declspec") {
+ int start = tokenStream->cursor();
+ advance();
+ advance(); // skip '('
+
+ parseIdentifierList(node);
+ ADVANCE(')', ")");
+
+ UPDATE_POS(node, start, tokenStream->cursor());
+ return true;
+ }
+
+ return false;
+}
+
+void Parser::advance()
+{
+ for (;;) {
+ tokenStream->nextToken();
+ if (!tokenStream->isHidden(tokenStream->cursor()))
+ break;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/parser.h b/tools/porting/src/parser.h
new file mode 100644
index 0000000..45278d4
--- /dev/null
+++ b/tools/porting/src/parser.h
@@ -0,0 +1,247 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include "ast.h"
+#include "tokenstreamadapter.h"
+
+#include <QString>
+#include <QStringList>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+
+class FileSymbol;
+class TokenStream;
+class Error;
+
+class Parser
+{
+public:
+ Parser();
+ ~Parser();
+
+// TranslationUnitAST *parse(FileSymbol *file, pool *p);
+ TranslationUnitAST *parse(TokenStreamAdapter::TokenStream *tokenStream, pool *p);
+ TranslationUnitAST *parse(TokenStreamAdapter::TokenStream *tokenStream, pool *p, int targetMaxASTnodes, bool &done);
+private:
+ bool reportError(const Error& err);
+ /** @todo remove*/ bool reportError(const QString& msg);
+ /** @todo remove*/ void syntaxError();
+
+public /*rules*/ :
+
+ bool parseTranslationUnit(TranslationUnitAST *&node);
+
+ bool parseDeclaration(DeclarationAST *&node);
+ bool parseBlockDeclaration(DeclarationAST *&node);
+ bool parseLinkageSpecification(DeclarationAST *&node);
+ bool parseLinkageBody(LinkageBodyAST *&node);
+ bool parseNamespace(DeclarationAST *&node);
+ bool parseNamespaceAliasDefinition(DeclarationAST *&node);
+ bool parseUsing(DeclarationAST *&node);
+ bool parseUsingDirective(DeclarationAST *&node);
+ bool parseTypedef(DeclarationAST *&node);
+ bool parseAsmDefinition(DeclarationAST *&node);
+ bool parseTemplateDeclaration(DeclarationAST *&node);
+ bool parseDeclarationInternal(DeclarationAST *&node);
+
+ bool parseStringLiteral(AST *&node);
+ bool parseUnqualifiedName(ClassOrNamespaceNameAST *&node, bool parseTemplateId = true);
+ bool parseName(NameAST *&node, bool parseTemplateId = true);
+ bool parseOperatorFunctionId(AST *&node);
+ bool parseTemplateArgumentList(TemplateArgumentListAST *&node, bool reportError = true);
+ bool parseOperator(AST *&node);
+ bool parseCvQualify(AST *&node);
+ bool parseSimpleTypeSpecifier(TypeSpecifierAST *&node, bool onlyIntegral = false);
+ bool parsePtrOperator(AST *&node);
+ bool parseTemplateArgument(AST *&node);
+ bool parseTypeSpecifier(TypeSpecifierAST *&node);
+ bool parseTypeSpecifierOrClassSpec(TypeSpecifierAST *&node);
+ bool parseDeclarator(DeclaratorAST *&node);
+ bool parseTemplateParameterList(TemplateParameterListAST *&node);
+ bool parseTemplateParameter(TemplateParameterAST *&node);
+ bool parseStorageClassSpecifier(AST *&node);
+ bool parseFunctionSpecifier(AST *&node);
+ bool parseInitDeclaratorList(InitDeclaratorListAST *&node);
+ bool parseInitDeclarator(InitDeclaratorAST *&node);
+ bool parseParameterDeclarationClause(ParameterDeclarationClauseAST *&node);
+ bool parseCtorInitializer(AST *&node);
+ bool parsePtrToMember(AST *&node);
+ bool parseEnumSpecifier(TypeSpecifierAST *&node);
+ bool parseClassSpecifier(TypeSpecifierAST *&node);
+ bool parseWinDeclSpec(AST *&node);
+ bool parseElaboratedTypeSpecifier(TypeSpecifierAST *&node);
+ bool parseDeclaratorId(NameAST *&node);
+ bool parseExceptionSpecification(AST *&node);
+ bool parseEnumerator(EnumeratorAST *&node);
+ bool parseTypeParameter(TypeParameterAST *&node);
+ bool parseParameterDeclaration(ParameterDeclarationAST *&node);
+ bool parseTypeId(TypeIdAST *&node);
+ bool parseAbstractDeclarator(DeclaratorAST *&node);
+ bool parseParameterDeclarationList(ParameterDeclarationListAST *&node);
+ bool parseMemberSpecification(DeclarationAST *&node);
+ bool parseAccessSpecifier(AST *&node);
+ bool parseTypeIdList(AST *&node);
+ bool parseMemInitializerList(AST *&node);
+ bool parseMemInitializer(AST *&node);
+ bool parseInitializer(AST *&node);
+ bool parseBaseClause(BaseClauseAST *&node);
+ bool parseBaseSpecifier(BaseSpecifierAST *&node);
+ bool parseInitializerClause(AST *&node);
+ bool parseMemInitializerId(NameAST *&node);
+ bool parseFunctionBody(StatementListAST *&node);
+
+ // expression
+ bool skipExpression(AbstractExpressionAST *&node);
+ bool skipCommaExpression(AbstractExpressionAST *&node);
+ bool skipExpressionStatement(StatementAST *&node);
+
+ bool parseExpression(AbstractExpressionAST *&node);
+ bool parsePrimaryExpression(AbstractExpressionAST *&node);
+ bool parsePostfixExpression(AbstractExpressionAST *&node);
+ bool parsePostfixExpressionInternal(AbstractExpressionAST *expr, AbstractExpressionAST *&node);
+ bool parseUnaryExpression(AbstractExpressionAST *&node);
+ bool parseNewExpression(AbstractExpressionAST *&node);
+ bool parseNewTypeId(AbstractExpressionAST *&node);
+ bool parseNewDeclarator(AbstractExpressionAST *&node);
+ bool parseNewInitializer(AbstractExpressionAST *&node);
+ bool parseDeleteExpression(AbstractExpressionAST *&node);
+ bool parseCastExpression(AbstractExpressionAST *&node);
+ bool parsePmExpression(AbstractExpressionAST *&node);
+ bool parseMultiplicativeExpression(AbstractExpressionAST *&node);
+ bool parseAdditiveExpression(AbstractExpressionAST *&node);
+ bool parseShiftExpression(AbstractExpressionAST *&node);
+ bool parseRelationalExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseEqualityExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseAndExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseExclusiveOrExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseInclusiveOrExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseLogicalAndExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseLogicalOrExpression(AbstractExpressionAST *&node, bool templArgs = false);
+ bool parseConditionalExpression(AbstractExpressionAST *&node);
+ bool parseAssignmentExpression(AbstractExpressionAST *&node);
+ bool parseConstantExpression(AbstractExpressionAST *&node);
+ bool parseCommaExpression(AbstractExpressionAST *&node);
+ bool parseThrowExpression(AbstractExpressionAST *&node);
+
+ // statement
+ bool parseCondition(ConditionAST *&node);
+ bool parseStatement(StatementAST *&node);
+ bool parseWhileStatement(StatementAST *&node);
+ bool parseDoStatement(StatementAST *&node);
+ bool parseForStatement(StatementAST *&node);
+ bool parseCompoundStatement(StatementAST *&node);
+ bool parseForInitStatement(StatementAST *&node);
+ bool parseIfStatement(StatementAST *&node);
+ bool parseSwitchStatement(StatementAST *&node);
+ bool parseLabeledStatement(StatementAST *&node);
+ bool parseDeclarationStatement(StatementAST *&node);
+ bool parseTryBlockStatement(StatementAST *&node);
+
+ // objective c
+ bool parseObjcDef(DeclarationAST *&node);
+ bool parseObjcClassDef(DeclarationAST *&node);
+ bool parseObjcClassDecl(DeclarationAST *&node);
+ bool parseObjcProtocolDecl(DeclarationAST *&node);
+ bool parseObjcAliasDecl(DeclarationAST *&node);
+ bool parseObjcProtocolDef(DeclarationAST *&node);
+ bool parseObjcMethodDef(DeclarationAST *&node);
+
+ bool parseIvarDeclList(AST *&node);
+ bool parseIvarDecls(AST *&node);
+ bool parseIvarDecl(AST *&node);
+ bool parseIvars(AST *&node);
+ bool parseIvarDeclarator(AST *&node);
+ bool parseMethodDecl(AST *&node);
+ bool parseUnarySelector(AST *&node);
+ bool parseKeywordSelector(AST *&node);
+ bool parseSelector(AST *&node);
+ bool parseKeywordDecl(AST *&node);
+ bool parseReceiver(AST *&node);
+ bool parseObjcMessageExpr(AST *&node);
+ bool parseMessageArgs(AST *&node);
+ bool parseKeywordExpr(AST *&node);
+ bool parseKeywordArgList(AST *&node);
+ bool parseKeywordArg(AST *&node);
+ bool parseReservedWord(AST *&node);
+ bool parseMyParms(AST *&node);
+ bool parseMyParm(AST *&node);
+ bool parseOptParmList(AST *&node);
+ bool parseObjcSelectorExpr(AST *&node);
+ bool parseSelectorArg(AST *&node);
+ bool parseKeywordNameList(AST *&node);
+ bool parseKeywordName(AST *&node);
+ bool parseObjcEncodeExpr(AST *&node);
+ bool parseObjcString(AST *&node);
+ bool parseProtocolRefs(AST *&node);
+ bool parseIdentifierList(AST *&node);
+ bool parseIdentifierColon(AST *&node);
+ bool parseObjcProtocolExpr(AST *&node);
+ bool parseObjcOpenBracketExpr(AST *&node);
+ bool parseObjcCloseBracket(AST *&node);
+
+ bool skipUntil(int token);
+ bool skipUntilDeclaration();
+ bool skipUntilStatement();
+ bool skip(int l, int r);
+
+ void advance();
+
+private:
+ int m_problems;
+ int m_maxProblems;
+ bool objcp;
+ TokenStreamAdapter::TokenStream *tokenStream;
+ pool *m_pool;
+ FileSymbol *m_file;
+
+private:
+ Parser(const Parser& source);
+ void operator = (const Parser& source);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/port.cpp b/tools/porting/src/port.cpp
new file mode 100644
index 0000000..eeb1f2e
--- /dev/null
+++ b/tools/porting/src/port.cpp
@@ -0,0 +1,297 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "projectporter.h"
+#include "fileporter.h"
+#include "logger.h"
+#include "preprocessorcontrol.h"
+
+#include <QString>
+#include <QFile>
+#include <QFileInfo>
+#include <QDir>
+#include <QByteArray>
+#include <QBuffer>
+#include <QTextStream>
+#include <QCoreApplication>
+#include <QLibraryInfo>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+QString rulesFilePath;
+QString applicationDirPath;
+
+QString findRulesFile(const QString &fileName)
+{
+ // Check QLibraryInfo::DataPath/filename
+ QString filePath;
+ filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::DataPath) + QLatin1String("/") + fileName) ;
+ if (QFile::exists(filePath))
+ return QFileInfo(filePath).canonicalFilePath();
+
+ // Check QLibraryInfo::PrefixPath/tools/porting/src/filename
+ filePath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::PrefixPath) + QLatin1String("/tools/porting/src/") + fileName);
+ if (QFile::exists(filePath))
+ return QFileInfo(filePath).canonicalFilePath();
+
+ //no luck
+ return QString();
+}
+
+/*
+ A option contains an argument and its help text.
+*/
+class Option
+{
+public:
+ Option(const QString &argument, const QString &description)
+ :argument(argument), description(description) {}
+
+ /*
+ Checks if candidateArgument matches the options argument.
+ */
+ bool checkArgument(const QString &candidateArgument) const
+ {
+ return (candidateArgument == argument) ||
+ (candidateArgument.toLower() == argument.toLower());
+ }
+
+ QString argument;
+ QString description;
+};
+
+typedef QList<Option> OptionList;
+
+void usage(const OptionList &optionList)
+{
+ printf("Tool for porting Qt 3 applications to Qt 4, using the compatibility library\n");
+ printf("and compatibility functions in the core library.\n");
+ printf("Usage: qt3to4 [options] <Infile>, [Infile], ...\n");
+ printf("\n");
+ printf("Infile can be a source file or a project file.\n");
+ printf("If you specify a project file, ending with .pro or .pri,\n");
+ printf("qt3to4 will port all files specified in that project.\n");
+ printf("\n");
+ printf("Options:\n");
+
+ // Find the length of the longest argument.
+ int argumentMaxLenght = 0;
+ foreach (const Option option, optionList) {
+ if (option.argument.count() > argumentMaxLenght)
+ argumentMaxLenght = option.argument.count();
+ }
+
+ // Print the options, pad with spaces between the argument and description where needed.
+ const int extraSpaces = 5;
+ foreach (const Option option, optionList) {
+ printf("%s", option.argument.toLocal8Bit().constData());
+ for (int i = 0; i < argumentMaxLenght - option.argument.count() + extraSpaces; ++i)
+ printf(" ");
+ puts(option.description.toLocal8Bit().constData());
+ }
+
+ printf("\n");
+ printf("The porting documentation contains more information on how\n");
+ printf("to use qt3to4 as well as general porting information.\n");
+}
+
+int runPort(int argc, char**argv)
+{
+ QCoreApplication app(argc, argv);
+ applicationDirPath = app.applicationDirPath();
+ QString defaultRulesFileName = QLatin1String("q3porting.xml");
+ QStringList inFileNames;
+ QStringList includeSearchDirectories;
+ bool enableCppParsing = true;
+ bool useBuildtinQt3Headers = true;
+ bool showMissingFilesWarnings = false;
+ bool alwaysOverwrite = false;
+ int currentArg = 1;
+
+ const Option helpOption(QLatin1String("-h"), QLatin1String("Display this help."));
+ const Option rulesFileOption(QLatin1String("-rulesFile"), QLatin1String("Specify the location for the rules file."));
+ const Option includeDirectoryOption(QLatin1String("-I"), QLatin1String("Add directory to the list of directories to be searched for header files."));
+ const Option disableCppParsingOption(QLatin1String("-disableCppParsing"), QLatin1String("Disable the C++ parsing component."));
+ const Option disableBuiltinQt3HeadersOption(QLatin1String("-disableBuiltinQt3Headers"), QLatin1String("Do not use the built-in Qt 3 headers."));
+ const Option missingFileWarningsOption(QLatin1String("-missingFileWarnings"), QLatin1String("Warn about files not found while searching for header files."));
+ const Option alwaysOverwriteOption(QLatin1String("-alwaysOverwrite"), QLatin1String("Port all files without prompting."));
+ const Option strictOption(QLatin1String("-strict"), QLatin1String("Be stricter when selecting which tokens to replace."));
+
+ const OptionList optionList = OptionList() << helpOption << alwaysOverwriteOption << rulesFileOption
+ << includeDirectoryOption << disableCppParsingOption
+ << disableBuiltinQt3HeadersOption << missingFileWarningsOption
+ << strictOption;
+
+ if (argc == 1) {
+ usage(optionList);
+ return 0;
+ }
+
+ // Read arguments.
+ while (currentArg < argc) {
+ QString argText = QLatin1String(argv[currentArg]);
+ if(argText.isEmpty()) {
+ continue;
+ } else if (argText == QLatin1String("--help") || argText == QLatin1String("/h") || argText == QLatin1String("-help")
+ || argText == QLatin1String("-h") || argText == QLatin1String("-?") || argText == QLatin1String("/?")) {
+ usage(optionList);
+ return 0;
+ } else if (rulesFileOption.checkArgument(argText)) {
+ ++currentArg;
+ if (currentArg >= argc) {
+ printf("You must specify a file name along with %s \n", argText.toLocal8Bit().constData());
+ return 0;
+ }
+ rulesFilePath = QLatin1String(argv[currentArg]);
+
+ if (!QFile::exists(rulesFilePath)) {
+ printf("File not found: %s\n", rulesFilePath.toLocal8Bit().constData());
+ return 0;
+ }
+ } else if (includeDirectoryOption.checkArgument(argText)) {
+ ++currentArg;
+ if (currentArg >= argc) {
+ printf("You must specify a directory name along with %s\n",
+ argText.toLocal8Bit().constData());
+ return 0;
+ }
+ includeSearchDirectories += QLatin1String(argv[currentArg]);
+ } else if (disableCppParsingOption.checkArgument(argText)) {
+ enableCppParsing = false;
+ } else if (strictOption.checkArgument(argText)) {
+ // Enable strict mode, this is used by the ScopedTokenReplacement constructor.
+ Logger::instance()->globalState.insert(QLatin1String("strictMode"), QLatin1String(""));
+ } else if (disableBuiltinQt3HeadersOption.checkArgument(argText)) {
+ useBuildtinQt3Headers = false;
+ } else if (missingFileWarningsOption.checkArgument(argText)) {
+ showMissingFilesWarnings = true;
+ } else if (alwaysOverwriteOption.checkArgument(argText)) {
+ alwaysOverwrite = true;
+ FileWriter::instance()->setOverwriteFiles(FileWriter::AlwaysOverWrite);
+ } else if (argText[0] == QLatin1Char('-')) {
+ printf("Unknown option %s\n", argText.toLocal8Bit().constData());
+ return 0;
+ } else {
+ inFileNames.append(argText);
+ }
+ ++currentArg;
+ }
+
+ if (rulesFilePath.isEmpty())
+ rulesFilePath = findRulesFile(defaultRulesFileName);
+
+ // Check if we have a rule file.
+ if (!QFile::exists(rulesFilePath)) {
+ printf("Error: Could not find the %s rule file: ", defaultRulesFileName.toLocal8Bit().constData());
+ printf("Please try specifying the location of the file with the %s option \n",
+ rulesFileOption.argument.toLocal8Bit().constData());
+ return 0;
+ }
+
+ // Check if we have any infiles
+ if (inFileNames.isEmpty()) {
+ printf("You must specify a file name. \n");
+ return 0;
+ }
+
+ // Read rule file and create PortingRules instance.
+ printf("Using rules file: ");
+ puts(QDir::toNativeSeparators(rulesFilePath).toLocal8Bit().constData());
+ PortingRules::createInstance(rulesFilePath);
+
+
+ // Construct a ProjectPorter object add pass it the options.
+ QStringList builtinQtheaders;
+ if (useBuildtinQt3Headers) {
+ builtinQtheaders += QLatin1String(":qt3headers0.resource");
+ builtinQtheaders += QLatin1String(":qt3headers1.resource");
+ builtinQtheaders += QLatin1String(":qt3headers2.resource");
+ builtinQtheaders += QLatin1String(":qt3headers3.resource");
+ }
+
+ ProjectPorter porter(QDir::currentPath(), includeSearchDirectories, builtinQtheaders);
+ porter.enableCppParsing(enableCppParsing);
+ porter.enableMissingFilesWarnings(showMissingFilesWarnings);
+
+ // Determine mode based on file exstesions and port.
+ // (The ProjectPorter class is also used for porting single files :)
+ foreach (QString inFileName, inFileNames) {
+ const QString canonicalFileName = QFileInfo(inFileName).canonicalFilePath();
+ if (QFile::exists(canonicalFileName)) {
+ if (canonicalFileName.endsWith(QLatin1String(".pro")) || canonicalFileName.endsWith(QLatin1String(".pri")))
+ porter.portProject(canonicalFileName);
+ else
+ porter.portFile(canonicalFileName);
+ } else {
+ printf("File not found: %s \n", QDir::toNativeSeparators(inFileName).toLocal8Bit().constData());
+ }
+ }
+
+ // Write log
+ if (Logger::instance()->numEntries() > 0) {
+ QStringList report = Logger::instance()->fullReport();
+ QString logFileName = QLatin1String("portinglog.txt");
+ printf("Writing log to %s \n", logFileName.toLocal8Bit().constData());
+ QByteArray logContents;
+ QBuffer logBuffer(&logContents);
+ logBuffer.open(QIODevice::Text | QIODevice::WriteOnly);
+ QTextStream logStream(&logBuffer);
+ foreach (QString logLine, report) {
+ logStream << logLine << endl;
+ }
+ logStream << endl;
+
+ QFile logFile(logFileName);
+ logFile.open(QIODevice::WriteOnly | QIODevice::Append);
+ logFile.write(logContents);
+ }
+ Logger::deleteInstance();
+ PortingRules::deleteInstance();
+ return 0;
+}
+
+QT_END_NAMESPACE
+
+int main(int argc, char**argv)
+{
+ return QT_PREPEND_NAMESPACE(runPort)(argc, argv);
+}
diff --git a/tools/porting/src/portingrules.cpp b/tools/porting/src/portingrules.cpp
new file mode 100644
index 0000000..4931064
--- /dev/null
+++ b/tools/porting/src/portingrules.cpp
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "portingrules.h"
+#include "logger.h"
+#include "qtsimplexml.h"
+#include <QFile>
+#include <QFileInfo>
+#include <QDir>
+
+QT_BEGIN_NAMESPACE
+
+PortingRules *PortingRules::theInstance = 0;
+
+void PortingRules::createInstance(QString xmlFilePath)
+{
+ deleteInstance();
+ theInstance = new PortingRules(xmlFilePath);
+}
+
+PortingRules *PortingRules::instance()
+{
+ if(theInstance) {
+ return theInstance;
+ } else {
+ qWarning("Error: must create a PortingRules instance with createInstance() before calling instance()\n");
+ return 0;
+ }
+}
+
+void PortingRules::deleteInstance()
+{
+ if(theInstance) {
+ delete theInstance;
+ theInstance = 0;
+ }
+}
+
+PortingRules::PortingRules(QString xmlFilePath)
+{
+ parseXml(xmlFilePath);
+}
+
+QList<TokenReplacement*> PortingRules::getTokenReplacementRules()
+{
+ if(tokenRules.isEmpty())
+ addLogWarning(QLatin1String("Warning: token rules list is empty"));
+ return tokenRules;
+}
+
+QStringList PortingRules::getHeaderList(QtVersion qtVersion)
+{
+ if(qt3Headers.isEmpty() || qt4Headers.isEmpty())
+ addLogWarning(QLatin1String("Warning: headers list is empty"));
+
+ if (qtVersion==Qt3)
+ return qt3Headers;
+ else //Qt4
+ return qt4Headers;
+}
+
+QHash<QByteArray, QByteArray> PortingRules::getNeededHeaders()
+{
+ if(neededHeaders.isEmpty())
+ addLogWarning(QLatin1String("Warning: needed headers list is empty"));
+ return neededHeaders;
+}
+
+QStringList PortingRules::getInheritsQt()
+{
+ if(tokenRules.isEmpty())
+ addLogWarning(QLatin1String("Warning: inheritsQtClass list is empty"));
+ return inheritsQtClass;
+}
+
+QHash<QByteArray, QByteArray> PortingRules::getClassLibraryList()
+{
+ if(classLibraryList.isEmpty())
+ addLogWarning(QLatin1String("Warning: classLibraryList list is empty"));
+ return classLibraryList;
+}
+
+QHash<QByteArray, QByteArray> PortingRules::getHeaderReplacements()
+{
+ return headerReplacements;
+}
+
+/*
+ Loads rule xml file given by fileName, and sets up data structures.
+ The rules can generally be divided into to types, replacement rules and
+ info rules.
+
+ Replacement rules has the form Qt3Symobl -> Qt4Symbol
+ Info rules includes the NeedHeader, Qt3Header, Qt4Header, InhertitsQt
+ rule types.
+*/
+void PortingRules::parseXml(QString fileName)
+{
+ QtSimpleXml *xmlPointer = loadXml(fileName);
+ QtSimpleXml &xml = *xmlPointer;
+
+ int ruleCount = xml[QLatin1String("Rules")].numChildren();
+ ++ruleCount;
+
+ for(int rule=0; rule<ruleCount; ++rule) {
+ QtSimpleXml &currentRule = xml[QLatin1String("Rules")][rule];
+ QString ruleType = currentRule.attribute(QLatin1String("Type"));
+
+ if(isReplacementRule(ruleType)) {
+ QString qt3Symbol = currentRule[QLatin1String("Qt3")].text();
+ QString qt4Symbol = currentRule[QLatin1String("Qt4")].text();
+
+ QString disable = currentRule.attribute(QLatin1String("Disable"));
+ if(disable == QLatin1String("True") || disable == QLatin1String("true")) {
+ disableRule(currentRule);
+ continue;
+ }
+
+ if (isRuleDisabled(currentRule))
+ continue;
+
+ if(ruleType == QLatin1String("RenamedHeader")) {
+ headerReplacements.insert(qt3Symbol.toLatin1(), qt4Symbol.toLatin1());
+ } else if(ruleType == QLatin1String("RenamedClass") || ruleType == QLatin1String("RenamedToken") ) {
+ tokenRules.append(new ClassNameReplacement(
+ qt3Symbol.toLatin1(), qt4Symbol.toLatin1()));
+ } else if(ruleType == QLatin1String("RenamedEnumvalue") || ruleType == QLatin1String("RenamedType") ||
+ ruleType == QLatin1String("RenamedQtSymbol") ) {
+ checkScopeAddRule(currentRule);
+ }
+ } else if(ruleType == QLatin1String("NeedHeader")) {
+ const QByteArray className = currentRule[QLatin1String("Class")].text().toLatin1();
+ const QByteArray headerName = currentRule[QLatin1String("Header")].text().toLatin1();
+ neededHeaders.insert(className, headerName);
+ }
+ else if(ruleType == QLatin1String("qt3Header")) {
+ qt3Headers += currentRule.text();
+ }
+ else if(ruleType == QLatin1String("qt4Header")) {
+ qt4Headers += currentRule.text();
+ }
+ else if(ruleType == QLatin1String("InheritsQt")) {
+ inheritsQtClass += currentRule.text();
+ }
+ else if(ruleType == QLatin1String("Qt4Class")) {
+ // Get library name, make it lowercase and chop of the "Qt" prefix.
+ const QByteArray libraryName = currentRule[QLatin1String("Library")].text().toLatin1().toLower().mid(2);
+ classLibraryList.insert(currentRule[QLatin1String("Name")].text().toLatin1(), libraryName);
+ }
+ }
+
+ QString includeFile = xml[QLatin1String("Rules")][QLatin1String("Include")].text();
+
+ if(includeFile != QString()) {
+ QString resolvedIncludeFile = resolveFileName(fileName, includeFile);
+ if (!resolvedIncludeFile.isEmpty())
+ parseXml(resolvedIncludeFile);
+ }
+
+ delete xmlPointer;
+}
+
+/*
+ Check if the rule in currentRule describes a qualified name
+ (like QButton::ToggleState). If so, create a scoped ScopedTokenReplacement,
+ else create a GenericTokenReplacement
+*/
+void PortingRules::checkScopeAddRule(/*const */QtSimpleXml &currentRule)
+{
+ QByteArray oldToken = currentRule[QLatin1String("Qt3")].text().toLatin1();
+ QByteArray newToken = currentRule[QLatin1String("Qt4")].text().toLatin1();
+
+ if (oldToken.contains(QByteArray("::")))
+ tokenRules.append(new ScopedTokenReplacement(oldToken, newToken));
+ else
+ tokenRules.append(new GenericTokenReplacement(oldToken, newToken));
+}
+
+/*
+ Loads the xml-file given by fileName into a new'ed QtSimpleXml, which is
+ returned by pointer.
+*/
+QtSimpleXml *PortingRules::loadXml(const QString fileName) const
+{
+ QFile f(fileName);
+ if(!f.open(QIODevice::ReadOnly)) {
+ qFatal("Could not find rule file %s", fileName.toLatin1().constData());
+ }
+ QtSimpleXml *xml = new QtSimpleXml();
+ if(!xml->setContent(&f))
+ addLogError(QLatin1String("Xml parsing failed: ") + xml->errorString());
+
+ return xml;
+}
+
+/*
+ Resolves includeFilePath against currentFilePath. If currentFilePath
+ contains foo/bar.xml, and includeFilePath contains bar2.xml, the returned
+ result will be foo/bar2.xml. If includeFilePath is absolute, it is returned
+ unmodified.
+*/
+QString PortingRules::resolveFileName(const QString currentFilePath,
+ const QString includeFilePath) const
+{
+ if(QFileInfo(includeFilePath).isAbsolute())
+ return includeFilePath;
+ QString relativeDirectory = QFileInfo(currentFilePath).dir().dirName();
+ QString testFileName = relativeDirectory + QLatin1String("/") + includeFilePath;
+ if (QFile::exists(testFileName))
+ return testFileName;
+
+ return QString();
+}
+/*
+ Checks if a rule is a replacement rule.
+*/
+bool PortingRules::isReplacementRule(const QString ruleType) const
+{
+ return (ruleType == QLatin1String("RenamedHeader") || ruleType == QLatin1String("RenamedClass") ||
+ ruleType == QLatin1String("RenamedToken") || ruleType == QLatin1String("RenamedEnumvalue") ||
+ ruleType == QLatin1String("RenamedType") || ruleType == QLatin1String("RenamedQtSymbol") );
+}
+
+/*
+ Disables a replacement rule given by the replacementRule parameter
+*/
+void PortingRules::disableRule(QtSimpleXml &replacementRule)
+{
+ RuleDescription ruleDescription(replacementRule);
+ disabledRules.append(ruleDescription);
+}
+
+/*
+ Checks if a replacement rule is disabled or not
+*/
+bool PortingRules::isRuleDisabled(QtSimpleXml &replacementRule) const
+{
+ RuleDescription ruleDescription(replacementRule);
+ return disabledRules.contains(ruleDescription);
+}
+
+/*
+ Adds a warning to the global logger.
+*/
+void PortingRules::addLogWarning(const QString text) const
+{
+ Logger::instance()->addEntry(new PlainLogEntry(QLatin1String("Warning"), QLatin1String("Porting"), text));
+}
+
+/*
+ Adds an error to the global logger.
+*/
+void PortingRules::addLogError(const QString text) const
+{
+ Logger::instance()->addEntry(new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), text));
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/portingrules.h b/tools/porting/src/portingrules.h
new file mode 100644
index 0000000..ac9064b
--- /dev/null
+++ b/tools/porting/src/portingrules.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PORTINGRULES_H
+#define PORTINGRULES_H
+
+#include "qtsimplexml.h"
+#include "tokenreplacements.h"
+#include <QList>
+#include <QPair>
+#include <QHash>
+#include <QSet>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+
+class RuleDescription
+{
+public:
+ explicit RuleDescription(QtSimpleXml &replacementRule) {
+ qt3 = replacementRule[QLatin1String("Qt3")].text();
+ qt4 = replacementRule[QLatin1String("Qt4")].text();
+ ruleType = replacementRule.attribute(QLatin1String("Type"));
+ }
+ QString qt3;
+ QString qt4;
+ QString ruleType;
+ bool operator==(const RuleDescription &other) const
+ {
+ return (qt3 == other.qt3 && qt4 == other.qt4 && ruleType == other.ruleType);
+ }
+};
+
+class PortingRules
+{
+public:
+ static void createInstance(QString xmlFilePath);
+ static PortingRules *instance();
+ static void deleteInstance();
+
+ enum QtVersion{Qt3, Qt4};
+ PortingRules(QString xmlFilePath);
+ QList<TokenReplacement*> getTokenReplacementRules();
+ QStringList getHeaderList(QtVersion qtVersion);
+ QHash<QByteArray, QByteArray> getNeededHeaders();
+ QStringList getInheritsQt();
+ QHash<QByteArray, QByteArray> getClassLibraryList();
+ QHash<QByteArray, QByteArray> getHeaderReplacements();
+private:
+ static PortingRules *theInstance;
+
+ QList<TokenReplacement*> tokenRules;
+ QStringList qt3Headers;
+ QStringList qt4Headers;
+ QHash<QByteArray, QByteArray> neededHeaders;
+ QStringList inheritsQtClass;
+ QList<RuleDescription> disabledRules;
+ QHash<QByteArray, QByteArray> classLibraryList;
+ QHash<QByteArray, QByteArray> headerReplacements;
+
+
+ void parseXml(const QString fileName);
+ void checkScopeAddRule(/*const */QtSimpleXml &currentRule);
+ QtSimpleXml *loadXml(const QString fileName) const ;
+ QString resolveFileName(const QString currentFileName,
+ const QString includeFileName) const;
+ bool isReplacementRule(const QString ruleType) const;
+ void disableRule(QtSimpleXml &replacementRule);
+ bool isRuleDisabled(QtSimpleXml &replacementRule) const;
+ void addLogWarning(const QString text) const;
+ void addLogError(const QString text) const;
+};
+
+QT_END_NAMESPACE
+
+#endif // PORTINGRULES_H
diff --git a/tools/porting/src/preprocessorcontrol.cpp b/tools/porting/src/preprocessorcontrol.cpp
new file mode 100644
index 0000000..4bfe197
--- /dev/null
+++ b/tools/porting/src/preprocessorcontrol.cpp
@@ -0,0 +1,430 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "preprocessorcontrol.h"
+#include <QDir>
+#include <QFile>
+#include <QFileInfo>
+#include <QTemporaryFile>
+
+QT_BEGIN_NAMESPACE
+using namespace TokenEngine;
+using namespace Rpp;
+
+IncludeFiles::IncludeFiles(const QString &basePath, const QStringList &searchPaths)
+:m_basePath(basePath)
+{
+ //prepend basePath to all relative paths in searchPaths
+ foreach (QString path, searchPaths) {
+ QString finalPath;
+ if (QDir::isAbsolutePath(path))
+ finalPath = QDir::cleanPath(path);
+ else
+ finalPath = QDir::cleanPath(m_basePath + QLatin1String("/") + path);
+
+ if(QFile::exists(finalPath))
+ m_searchPaths.append(finalPath);
+ }
+}
+
+/*
+ Performs an #include "..." style file lookup.
+ Aboslute filenames are checked directly. Relative filenames are first
+ looked for relative to the current file path, then the includepaths
+ are searched if not found.
+*/
+QString IncludeFiles::quoteLookup(const QString &currentFile,
+ const QString &includeFile) const
+{
+ //if includeFile is absolute, check if it exists
+ if (QDir::isAbsolutePath(includeFile)) {
+ if(QFile::exists(includeFile))
+ return includeFile;
+ else
+ return QString();
+ }
+
+ //If currentFile is not an absolute file path, make it one by
+ //prepending m_baspath
+ QString currentFilePath;
+ if(QDir::isAbsolutePath(currentFile))
+ currentFilePath = currentFile;
+ else
+ currentFilePath = QDir::cleanPath(m_basePath + QLatin1String("/") + currentFile);
+
+ //Check if it includeFile exists in the same dir as currentFilePath
+ const QString currentPath = QFileInfo(currentFilePath).path();
+ QString localFile = QDir::cleanPath(currentPath + QLatin1String("/") + includeFile);
+ if(QFile::exists(localFile))
+ return localFile;
+
+ return searchIncludePaths(includeFile);
+}
+
+/*
+ Performs an #include <...> style file lookup.
+ Aboslute filenames are checked directly.
+ Relative paths are searched for in the includepaths.
+*/
+QString IncludeFiles::angleBracketLookup(const QString &includeFile) const
+{
+ //if includeFile is absolute, check if it exists
+ if (QDir::isAbsolutePath(includeFile)) {
+ if(QFile::exists(includeFile))
+ return includeFile;
+ else
+ return QString();
+ }
+
+ return searchIncludePaths(includeFile);
+}
+
+QString IncludeFiles::resolve(const QString &filename) const
+{
+ if(QDir::isAbsolutePath(filename))
+ return filename;
+
+ QString prepended = QDir::cleanPath(m_basePath + QLatin1String("/") + filename);
+ if(QFile::exists(prepended))
+ return prepended;
+ else
+ return QString();
+}
+
+
+/*
+ Searches for includeFile paths by appending it to all includePaths
+ and checking if the file exists. Returns QString() if the file is not
+ found.
+*/
+QString IncludeFiles::searchIncludePaths(const QString &includeFile) const
+{
+ QString foundFile;
+ foreach(QString includePath, m_searchPaths) {
+ QString testFile = includePath + QLatin1String("/") + includeFile;
+ if(QFile::exists(testFile)){
+ foundFile = testFile;
+ break;
+ }
+ }
+ return foundFile;
+}
+
+QByteArray PreprocessorCache::readFile(const QString &filename) const
+{
+ // If anybody is connected to the readFile signal we tell them to
+ // read the file for us.
+ if (receivers(SIGNAL(readFile(QByteArray&,QString))) > 0) {
+ QByteArray array;
+ // Workaround for "not beeing able to emit from const function"
+ PreprocessorCache *cache = const_cast<PreprocessorCache *>(this);
+ emit cache->readFile(array, filename);
+ return array;
+ }
+
+ QFile f(filename);
+ if (!f.exists())
+ return QByteArray();
+ f.open(QIODevice::ReadOnly);
+ if (!f.isOpen())
+ return QByteArray();
+ return f.readAll();
+}
+
+PreprocessorCache::PreprocessorCache()
+{
+ connect(&m_preprocessor, SIGNAL(error(QString,QString)),
+ this, SIGNAL(error(QString,QString)));
+}
+
+
+/*
+ Return a TokenSequence with the contents of filname.
+ Assumens filename exists and is readable, returns a empty
+ TokenSequence if not.
+
+ The result is cached.
+*/
+TokenContainer PreprocessorCache::sourceTokens(const QString &filename)
+{
+ // Check if the source tokens are already in the cache.
+ if(m_sourceTokens.contains(filename))
+ return m_sourceTokens.value(filename);
+
+ // Read and tokenize file.
+ QByteArray fileContents = readFile(filename);
+ if(fileContents == QByteArray())
+ return TokenContainer();
+
+ QVector<TokenEngine::Token> tokenList = m_tokenizer.tokenize(fileContents);
+
+ // Create a FileInfo object that holds the filename for this container.
+ FileInfo *containterFileInfo = new FileInfo;
+ containterFileInfo->filename = filename;
+
+ // Create container.
+ TokenContainer tokenContainer(fileContents, tokenList, containterFileInfo);
+
+ // Insert into cache.
+ m_sourceTokens.insert(filename, tokenContainer);
+ return tokenContainer;
+}
+
+/*
+ Return a Source* tree representing the contents of filename.
+ Assumens filename exists and is readable, returns a empty
+ Source object if not.
+
+ The result is cached.
+*/
+Source *PreprocessorCache::sourceTree(const QString &filename)
+{
+ // Check if the Rpp tree for this file is already in the cache.
+ if(m_sourceTrees.contains(filename))
+ return m_sourceTrees.value(filename);
+
+ // Get the tokens for the contents of this file.
+ TokenContainer tokenContainer = sourceTokens(filename);
+
+ // Run lexer and the preprocessor-parser.
+ QVector<Type> tokenTypes = m_lexer.lex(tokenContainer);
+ Source *source = m_preprocessor.parse(tokenContainer, tokenTypes, &m_memoryPool);
+ source->setFileName(filename);
+
+ // Insert into cache.
+ if(tokenContainer.count() > 0) //don't cache empty files.
+ m_sourceTrees.insert(filename, source);
+
+ return source;
+}
+
+
+/*
+ Returns whether the cache contains a TokenContainer for the given filename.
+*/
+bool PreprocessorCache::containsSourceTokens(const QString &filename)
+{
+ return m_sourceTokens.contains(filename);
+}
+
+/*
+ Returns whether the cache contains a Preprocessor tree for the given filename.
+*/
+bool PreprocessorCache::containsSourceTree(const QString &filename)
+{
+ return m_sourceTrees.contains(filename);
+}
+
+PreprocessorController::PreprocessorController(IncludeFiles includeFiles,
+ PreprocessorCache &preprocessorCache,
+ QStringList preLoadFilesFilenames)
+:m_includeFiles(includeFiles),
+ m_preprocessorCache(preprocessorCache)
+ {
+ // Load qt3 headers from resources. The headers are stored as
+ // QHash<QString, QByteArray>, serialized using QDataStream. The hash
+ // maps filename -> contents.
+ if (preLoadFilesFilenames != QStringList()) {
+ foreach (QString filename, preLoadFilesFilenames) {
+ QFile f(filename);
+ if (f.open(QIODevice::ReadOnly)) {
+ QByteArray buffer = f.readAll();
+ f.close();
+ QDataStream stream(buffer);
+ QHash<QString, QByteArray> files;
+ stream >> files;
+ m_preLoadFiles.unite(files);
+ }
+ }
+ }
+
+ //connect include callback
+ connect(&m_rppTreeEvaluator,
+ SIGNAL(includeCallback(Rpp::Source *&, const Rpp::Source *,
+ const QString &, Rpp::RppTreeEvaluator::IncludeType)),
+ SLOT(includeSlot(Rpp::Source *&, const Rpp::Source *,
+ const QString &, Rpp::RppTreeEvaluator::IncludeType)));
+
+ // connect readFile callback
+ connect(&m_preprocessorCache, SIGNAL(readFile(QByteArray&,QString)),
+ SLOT(readFile(QByteArray&,QString)));
+
+ //connect error handlers
+ connect(&m_preprocessorCache , SIGNAL(error(QString,QString)),
+ this, SIGNAL(error(QString,QString)));
+}
+
+/*
+ Callback from RppTreeEvaluator, called when we evaluate an #include
+ directive. We do a filename lookup based on the type of include, and then ask
+ the cache to give us the source tree for that file.
+*/
+void PreprocessorController::includeSlot(Source *&includee,
+ const Source *includer,
+ const QString &filename,
+ RppTreeEvaluator::IncludeType includeType)
+{
+ QString newFilename;
+ if(includeType == RppTreeEvaluator::QuoteInclude)
+ newFilename = m_includeFiles.quoteLookup(includer->fileName(), filename);
+ else //AngleBracketInclude
+ newFilename = m_includeFiles.angleBracketLookup(filename);
+
+ if (QFile::exists(newFilename)) {
+ includee = m_preprocessorCache.sourceTree(newFilename);
+ return;
+ }
+
+ if (m_preLoadFiles.contains(filename)) {
+ includee = m_preprocessorCache.sourceTree(filename);
+ return;
+ }
+
+ includee = m_preprocessorCache.sourceTree(newFilename);
+ emit error(QLatin1String("Error"), QLatin1String("Could not find file ") + filename);
+}
+
+/*
+ Callback connected to preprocessorCache. Tries to load a file from
+ m_preLoadFiles before going to disk.
+*/
+void PreprocessorController::readFile(QByteArray &contents, QString filename)
+{
+ if (m_preLoadFiles.contains(filename)) {
+ contents = m_preLoadFiles.value(filename);
+ return;
+ }
+
+ QFile f(filename);
+ if (!f.exists())
+ return;
+ f.open(QIODevice::ReadOnly);
+ if (!f.isOpen())
+ return;
+ contents = f.readAll();
+}
+
+/*
+ Preprocess file give by filename. Filename is resloved agains the basepath
+ set in IncludeFiles.
+*/
+TokenSectionSequence PreprocessorController::evaluate(const QString &filename, Rpp::DefineMap *activedefinitions)
+{
+ QString resolvedFilename = m_includeFiles.resolve(filename);
+ if(!QFile::exists(resolvedFilename))
+ emit error(QLatin1String("Error"), QLatin1String("Could not find file: ") + filename);
+ Source *source = m_preprocessorCache.sourceTree(resolvedFilename);
+
+ return m_rppTreeEvaluator.evaluate(source, activedefinitions);
+}
+
+QByteArray defaultDefines =
+ "#define __attribute__(a...) \n \
+ #define __attribute__ \n \
+ #define __extension \n \
+ #define __extension__ \n \
+ #define __restrict \n \
+ #define __restrict__ \n \
+ #define __volatile volatile\n \
+ #define __volatile__ volatile\n \
+ #define __inline inline\n \
+ #define __inline__ inline\n \
+ #define __const const\n \
+ #define __const__ const\n \
+ #define __asm asm\n \
+ #define __asm__ asm\n \
+ #define __GNUC__ 2\n \
+ #define __GNUC_MINOR__ 95\n \
+ #define __cplusplus \n \
+ #define __linux__ \n";
+
+
+/*
+ Returns a DefineMap containing the above macro definitions. The DefineMap
+ will contain pointers to data stored in the provided cache object.
+*/
+Rpp::DefineMap *defaultMacros(PreprocessorCache &cache)
+{
+ DefineMap *defineMap = new DefineMap();
+ //write out default macros to a temp file
+ QTemporaryFile tempfile;
+ tempfile.open();
+ tempfile.write(defaultDefines);
+ tempfile.flush();
+
+ IncludeFiles *includeFiles = new IncludeFiles(QString(), QStringList());
+ PreprocessorController preprocessorController(*includeFiles, cache);
+ //evaluate default macro file.
+ preprocessorController.evaluate(tempfile.fileName(), defineMap);
+ delete includeFiles;
+ return defineMap;
+}
+
+void StandardOutErrorHandler::error(QString type, QString text)
+{
+ Q_UNUSED(type);
+ puts(qPrintable(text));
+}
+
+/*
+ RppPreprocessor is a convenience class that contains all the components
+ needed to preprocess files. Error messages are printed to standard out.
+*/
+RppPreprocessor::RppPreprocessor(QString basePath, QStringList includePaths, QStringList preLoadFilesFilenames)
+:m_includeFiles(basePath, includePaths)
+,m_activeDefinitions(defaultMacros(m_cache))
+,m_controller(m_includeFiles, m_cache, preLoadFilesFilenames)
+{
+ QObject::connect(&m_controller, SIGNAL(error(QString,QString)), &m_errorHandler, SLOT(error(QString,QString)));
+}
+
+RppPreprocessor::~RppPreprocessor()
+{
+ delete m_activeDefinitions;
+}
+
+TokenEngine::TokenSectionSequence RppPreprocessor::evaluate(const QString &filename)
+{
+ DefineMap defMap = *m_activeDefinitions;
+ return m_controller.evaluate(filename, &defMap);
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/preprocessorcontrol.h b/tools/porting/src/preprocessorcontrol.h
new file mode 100644
index 0000000..0c1c2f9
--- /dev/null
+++ b/tools/porting/src/preprocessorcontrol.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PREPROCESSORCONTROL_H
+#define PREPROCESSORCONTROL_H
+
+#include "tokenengine.h"
+#include "tokenizer.h"
+#include "rpplexer.h"
+#include "rpptreeevaluator.h"
+#include "rpp.h"
+#include <QString>
+#include <QStringList>
+#include <QHash>
+
+QT_BEGIN_NAMESPACE
+
+class IncludeFiles
+{
+public:
+ IncludeFiles(const QString &basePath, const QStringList &searchPaths);
+ QString quoteLookup(const QString &currentFile,
+ const QString &includeFile)const;
+ QString angleBracketLookup(const QString &includeFile) const;
+ QString resolve(const QString &filename) const;
+private:
+ QString searchIncludePaths(const QString &includeFile)const;
+ QStringList m_searchPaths;
+ QString m_basePath;
+};
+
+class PreprocessorCache: public QObject
+{
+Q_OBJECT
+public:
+ PreprocessorCache();
+ TokenEngine::TokenContainer sourceTokens(const QString &filename);
+ Rpp::Source *sourceTree(const QString &filename);
+ bool containsSourceTokens(const QString &filename);
+ bool containsSourceTree(const QString &filename);
+signals:
+ void error(QString type, QString text);
+ void readFile(QByteArray &contents, QString filename);
+private:
+ QByteArray readFile(const QString & filename) const;
+ Tokenizer m_tokenizer;
+ Rpp::RppLexer m_lexer;
+ Rpp::Preprocessor m_preprocessor;
+ TypedPool<Rpp::Item> m_memoryPool;
+ QHash<QString, Rpp::Source *> m_sourceTrees;
+ QHash<QString, TokenEngine::TokenContainer> m_sourceTokens;
+};
+
+class PreprocessorController: public QObject
+{
+Q_OBJECT
+public:
+ PreprocessorController(IncludeFiles includefiles,
+ PreprocessorCache &preprocessorCache,
+ QStringList preLoadFilesFilenames = QStringList());
+
+ TokenEngine::TokenSectionSequence evaluate(const QString &filename, Rpp::DefineMap *activedefinitions);
+public slots:
+ void includeSlot(Rpp::Source *&includee, const Rpp::Source *includer,
+ const QString &filename, Rpp::RppTreeEvaluator::IncludeType includeType);
+ void readFile(QByteArray &contents, QString filename);
+signals:
+ void error(QString type, QString text);
+private:
+ IncludeFiles m_includeFiles;
+ Rpp::RppTreeEvaluator m_rppTreeEvaluator;
+ PreprocessorCache &m_preprocessorCache;
+ QHash<QString, QByteArray> m_preLoadFiles;
+};
+
+Rpp::DefineMap *defaultMacros(PreprocessorCache &preprocessorCache);
+
+class StandardOutErrorHandler : public QObject
+{
+Q_OBJECT
+public slots:
+ void error(QString type, QString text);
+};
+
+class RppPreprocessor
+{
+public:
+ RppPreprocessor(QString basePath, QStringList includePaths, QStringList preLoadFilesFilename = QStringList());
+ ~RppPreprocessor();
+ TokenEngine::TokenSectionSequence evaluate(const QString &filename);
+private:
+ IncludeFiles m_includeFiles;
+ PreprocessorCache m_cache;
+ Rpp::DefineMap *m_activeDefinitions;
+ PreprocessorController m_controller;
+ StandardOutErrorHandler m_errorHandler;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/projectporter.cpp b/tools/porting/src/projectporter.cpp
new file mode 100644
index 0000000..404c6726
--- /dev/null
+++ b/tools/porting/src/projectporter.cpp
@@ -0,0 +1,414 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "projectporter.h"
+#include "proparser.h"
+#include "textreplacement.h"
+#include "fileporter.h"
+#include "logger.h"
+#include "translationunit.h"
+#include "codemodelattributes.h"
+#include <QtDebug>
+#include <QFile>
+#include <QDir>
+#include <QStringList>
+#include <QFileInfo>
+#include <QBuffer>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+
+ProjectPorter::ProjectPorter(QString basePath, QStringList includeDirectories, QStringList qt3HeadersFilenames)
+:basePath(basePath)
+,includeDirectories(includeDirectories)
+,defaultDefinitions(defaultMacros(preprocessorCache))
+,filePorter(preprocessorCache)
+,qt3HeadersFilenames(qt3HeadersFilenames)
+,analyze(true)
+,warnings(false)
+{}
+
+void ProjectPorter::enableCppParsing(bool enable)
+{
+ analyze = enable;
+}
+
+void ProjectPorter::enableMissingFilesWarnings(bool enable)
+{
+ warnings = enable;
+}
+
+void ProjectPorter::portProject(QString fileName)
+{
+ QFileInfo fileInfo(fileName);
+ portProject(fileInfo.path(), fileInfo.fileName());
+}
+
+/*
+ Port a single file
+*/
+void ProjectPorter::portFile(QString fileName)
+{
+ if (analyze) {
+ IncludeFiles includeFiles(basePath, includeDirectories);
+
+ PreprocessorController preprocessor(includeFiles, preprocessorCache, qt3HeadersFilenames);
+ connect(&preprocessor, SIGNAL(error(QString,QString)), SLOT(error(QString,QString)));
+
+ Rpp::DefineMap definitionsCopy = *defaultDefinitions;
+ // Preprocess
+ TokenSectionSequence translationUnit = preprocessor.evaluate(fileName, &definitionsCopy);
+ // Parse
+ TranslationUnit translationUnitData = TranslationUnitAnalyzer().analyze(translationUnit);
+
+ // Enable attribute generation for this file.
+ enableAttributes(includeFiles, fileName);
+ // Generate attributes.
+ CodeModelAttributes().createAttributes(translationUnitData);
+ }
+
+ portFiles(QString(), QStringList() << fileName);
+}
+
+void ProjectPorter::error(QString type, QString text)
+{
+ if (warnings && type == QLatin1String("Error"))
+ printf("Warning: %s\n", text.toLocal8Bit().constData());
+}
+
+void ProjectPorter::portProject(QString basePath, QString proFileName)
+{
+ QString fullInFileName = basePath + QLatin1String("/") + proFileName;
+ QFileInfo infileInfo(fullInFileName);
+ if (!infileInfo.exists()) {
+ printf("Could not open file: %s\n", QDir::toNativeSeparators(fullInFileName).toLocal8Bit().constData());
+ return;
+ }
+
+ QString proFileContents = loadFile(fullInFileName);
+ QMap<QString, QString> proFileMap = proFileTagMap(proFileContents, QDir(basePath).absolutePath());
+
+
+ // Check if this is a TEMPLATE = subdirs .pro file, in that case we
+ // process each subdir (recursively).
+
+ QString templateTag = proFileMap[QLatin1String("TEMPLATE")];
+ if (templateTag == QLatin1String("subdirs")) {
+ QStringList subdirs = proFileMap[QLatin1String("SUBDIRS")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ foreach(QString subdir, subdirs) {
+ QString newBasePath = basePath + QLatin1String("/") + subdir;
+ QStringList dirsInSubdir = subdir.split(QRegExp(QLatin1String("/|\\\\")), QString::SkipEmptyParts);
+ QString newProFileName = dirsInSubdir.last() + QLatin1String(".pro");
+ portProject(newBasePath, newProFileName);
+ }
+ return;
+ }
+
+ // Get headers and sources file names from .pro file.
+ QStringList sources = proFileMap[QLatin1String("SOURCES")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ QStringList headers = proFileMap[QLatin1String("HEADERS")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ QStringList forms = proFileMap[QLatin1String("FORMS")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ QStringList uidoth;
+ for (int i = 0; i < forms.size(); ++i) {
+ QString ui_h = forms.at(i) + QLatin1String(".h");
+ if (QFile::exists(basePath + QLatin1String("/") + ui_h))
+ uidoth += ui_h;
+ }
+
+ if (analyze) {
+ printf("Parsing");
+ // Get include paths from the pro file.
+ QStringList includeProPaths = proFileMap[QLatin1String("INCLUDEPATH")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ QStringList dependProPaths = proFileMap[QLatin1String("DEPENDPATH")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ IncludeFiles includeFiles(basePath, includeDirectories + includeProPaths + dependProPaths);
+
+ PreprocessorController preprocessorController(includeFiles, preprocessorCache, qt3HeadersFilenames);
+ connect(&preprocessorController, SIGNAL(error(QString,QString)), SLOT(error(QString,QString)));
+
+ TranslationUnitAnalyzer translationUnitAnalyzer;
+ CodeModelAttributes codeModelAttributes;
+
+ // Enable attribute generation for header files.
+ foreach(QString headerFile, headers)
+ enableAttributes(includeFiles, headerFile);
+
+ // Enable attribute generation for ui.h files.
+ foreach(QString headerFile, uidoth)
+ enableAttributes(includeFiles, headerFile);
+
+ // Analyze each translation unit. (one per cpp file)
+ foreach(QString sourceFile, sources) {
+ printf(".");
+ fflush(stdout);
+ Rpp::DefineMap definitionsCopy = *defaultDefinitions;
+ TokenSectionSequence translationUnit =
+ preprocessorController.evaluate(sourceFile, &definitionsCopy);
+ TranslationUnit translationUnitData =
+ translationUnitAnalyzer.analyze(translationUnit);
+
+ // Enable attribute generation for this file.
+ enableAttributes(includeFiles, sourceFile);
+
+ codeModelAttributes.createAttributes(translationUnitData);
+ }
+ puts("");
+ }
+
+
+ // Port files.
+ portFiles(basePath, sources);
+ portFiles(basePath, headers);
+ if (!uidoth.isEmpty())
+ portFiles(basePath, uidoth);
+
+ Logger::instance()->globalState[QLatin1String("currentFileName")] = proFileName;
+ Logger::instance()->beginSection();
+ portProFile(fullInFileName, proFileMap);
+}
+
+/*
+ Port each file given in the fileNames list. If a file name is relative
+ it is assumed to be relative to basePath.
+*/
+void ProjectPorter::portFiles(QString basePath, QStringList fileNames)
+{
+ foreach(QString fileName, fileNames) {
+ QString fullFilePath;
+ QFileInfo fileInfo(fileName);
+ if (fileInfo.isAbsolute()) {
+ fullFilePath = QDir::cleanPath(fileName);
+ } else {
+ fullFilePath = QDir::cleanPath(basePath + QLatin1String("/") + fileName);
+ }
+
+ QFileInfo fullFilePathInfo(fullFilePath);
+ if (!fullFilePathInfo.exists()) {
+ printf("Could not find file: %s\n", QDir::toNativeSeparators(fullFilePath).toLocal8Bit().constData());
+ continue;
+ }
+
+ if (!processedFilesSet.contains(fullFilePath)){
+ Logger::instance()->globalState[QLatin1String("currentFileName")] = fullFilePath;
+ filePorter.port(fullFilePath);
+ processedFilesSet.insert(fullFilePath);
+ }
+ }
+}
+
+void ProjectPorter::portProFile(QString fileName, QMap<QString, QString> tagMap)
+{
+ // Read pro file.
+ QFile proFile(fileName);
+ if (!proFile.open(QIODevice::ReadOnly))
+ return;
+
+ const QByteArray contents = proFile.readAll();
+ const QByteArray lineEnding = detectLineEndings(contents);
+ proFile.seek(0);
+
+ QTextStream proTextStream(&proFile);
+ QStringList lines;
+ while (!proTextStream.atEnd())
+ lines += proTextStream.readLine();
+
+ proFile.close();
+
+ // Find out what modules we should add to the QT variable.
+ QSet<QByteArray> qtModules;
+
+ // Add qt3support to the Qt tag
+ qtModules.insert(QByteArray("qt3support"));
+
+ // Read CONFIG and add other modules.
+ QStringList config = tagMap[QLatin1String("CONFIG")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ if (config.contains(QLatin1String("opengl")))
+ qtModules.insert(QByteArray("opengl"));
+ if (config.contains(QLatin1String("xml")))
+ qtModules.insert(QByteArray("xml"));
+ if (config.contains(QLatin1String("sql")))
+ qtModules.insert(QByteArray("sql"));
+ if (config.contains(QLatin1String("network")))
+ qtModules.insert(QByteArray("network"));
+
+ // Get set of used modules from the file porter.
+ qtModules += filePorter.usedQtModules();
+
+ // Remove gui and core.
+ qtModules.remove(QByteArray("gui"));
+ qtModules.remove(QByteArray("core"));
+
+ // Qt3Support is already added.
+ qtModules.remove(QByteArray("3support"));
+
+ // Remove modules already present in the QT variable.
+ QStringList qt = tagMap[QLatin1String("QT")].split(QLatin1String(" "), QString::SkipEmptyParts);
+ foreach(QString name, qt) {
+ qtModules.remove(name.toLatin1());
+ }
+
+ Logger *logger = Logger::instance();
+ bool changesMade = false;
+
+ if (!qtModules.isEmpty()) {
+ changesMade = true;
+ QString insertText = QLatin1String("QT += ");
+ foreach(QByteArray module, qtModules) {
+ insertText += QString::fromLatin1(module) + QLatin1Char(' ');
+ }
+ lines += QString(QLatin1String("#The following line was inserted by qt3to4"));
+ lines += insertText;
+ QString logText = QLatin1String("In file ")
+ + logger->globalState.value(QLatin1String("currentFileName"))
+ + QLatin1String(": Added entry ")
+ + insertText;
+ logger->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), logText));
+ }
+
+ // Add uic3 if we have forms, and change FORMS and INTERFACES to FORMS3
+ if (!tagMap[QLatin1String("FORMS")].isEmpty() || !tagMap[QLatin1String("INTERFACES")].isEmpty()) {
+ changesMade = true;
+ lines += QString(QLatin1String("#The following line was inserted by qt3to4"));
+ QString insertText = QLatin1String("CONFIG += uic3") + QString::fromLatin1(lineEnding.constData());
+ lines += insertText;
+ QString logText = QLatin1String("In file ")
+ + logger->globalState.value(QLatin1String("currentFileName"))
+ + QLatin1String(": Added entry ")
+ + insertText;
+ logger->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), logText));
+
+ const QString formsToForms3(QLatin1String("#The following line was changed from FORMS to FORMS3 by qt3to4"));
+ const QString interfacesToForms3(QLatin1String("#The following line was changed from INTERFACES to FORMS3 by qt3to4"));
+ for (int i = 0; i < lines.count(); ++i) {
+ QString cLine = lines.at(i);
+ cLine = cLine.trimmed();
+ if (cLine.startsWith(QLatin1String("FORMS"))) {
+ lines[i].replace(QLatin1String("FORMS"), QLatin1String("FORMS3"));
+ lines.insert(i, formsToForms3);
+ ++i;
+ QString logText = QLatin1String("In file ")
+ + logger->globalState.value(QLatin1String("currentFileName"))
+ + QLatin1String(": Renamed FORMS to FORMS3");
+ logger->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), logText));
+ } else if (cLine.startsWith(QLatin1String("INTERFACES"))) {
+ lines[i].replace(QLatin1String("INTERFACES"), QLatin1String("FORMS3"));
+ lines.insert(i, interfacesToForms3);
+ ++i;
+ QString logText = QLatin1String("In file ")
+ + logger->globalState.value(QLatin1String("currentFileName"))
+ + QLatin1String(": Renamed INTERFACES to FORMS3");
+ logger->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), logText));
+ }
+ }
+ }
+
+ // Comment out any REQUIRES tag.
+ if (!tagMap[QLatin1String("REQUIRES")].isEmpty()) {
+ changesMade = true;
+ QString insertText(QLatin1String("#The following line was commented out by qt3to4"));
+ for (int i = 0; i < lines.count(); ++i) {
+ if (lines.at(i).startsWith(QLatin1String("REQUIRES"))) {
+ QString lineCopy = lines.at(i);
+ lineCopy.prepend(QLatin1Char('#'));
+ lines[i] = lineCopy;
+ lines.insert(i, insertText);
+ ++i; //skip ahead, we just insertet a line at i.
+ QString logText = QLatin1String("In file ")
+ + logger->globalState.value(QLatin1String("currentFileName"))
+ + QLatin1String(": Commented out REQUIRES section");
+ logger->addEntry(new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), logText));
+ }
+ }
+ }
+
+ // Check if any changes has been made.
+ if (!changesMade) {
+ Logger::instance()->addEntry(
+ new PlainLogEntry(QLatin1String("Info"), QLatin1String("Porting"), QLatin1String("No changes made to file ") + fileName));
+ Logger::instance()->commitSection();
+ return;
+ }
+
+ // Write lines to array.
+ QByteArray bob;
+ QTextStream outProFileStream(&bob);
+ foreach(QString line, lines)
+ outProFileStream << line << lineEnding;
+ outProFileStream.flush();
+
+ // Write array to file, commit log if write was successful.
+ FileWriter::WriteResult result = FileWriter::instance()->writeFileVerbously(fileName, bob);
+ if (result == FileWriter::WriteSucceeded) {
+ logger->commitSection();
+ } else if (result == FileWriter::WriteFailed) {
+ logger->revertSection();
+ logger->addEntry(
+ new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), QLatin1String("Error writing to file ") + fileName));
+ } else if (result == FileWriter::WriteSkipped) {
+ logger->revertSection();
+ logger->addEntry(
+ new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), QLatin1String("User skipped file ") + fileName));
+ } else {
+ // Internal error.
+ logger->revertSection();
+ const QString errorString = QLatin1String("Internal error in qt3to4 - FileWriter returned invalid result code while writing to ") + fileName;
+ logger->addEntry(new PlainLogEntry(QLatin1String("Error"), QLatin1String("Porting"), errorString));
+ }
+}
+
+/*
+ Enables attribute generation for fileName. The file is looked up using the
+ provied includeFiles object.
+*/
+void ProjectPorter::enableAttributes(const IncludeFiles &includeFiles, const QString &fileName)
+{
+ QString resolvedFilePath = includeFiles.resolve(fileName);
+ if (!QFile::exists(resolvedFilePath))
+ resolvedFilePath = includeFiles.angleBracketLookup(fileName);
+ if (!QFile::exists(resolvedFilePath))
+ return;
+
+ TokenContainer tokenContainer = preprocessorCache.sourceTokens(resolvedFilePath);
+ TokenAttributes *attributes = tokenContainer.tokenAttributes();
+ attributes->addAttribute("CreateAttributes", "True");
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/projectporter.h b/tools/porting/src/projectporter.h
new file mode 100644
index 0000000..e86c29a
--- /dev/null
+++ b/tools/porting/src/projectporter.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PROJECTPORTER_H
+#define PROJECTPORTER_H
+
+#include "fileporter.h"
+#include "preprocessorcontrol.h"
+#include <QString>
+#include <QSet>
+
+QT_BEGIN_NAMESPACE
+
+class ProjectPorter : public QObject
+{
+Q_OBJECT
+public:
+ ProjectPorter(QString basePath, QStringList includeDirectories, QStringList qt3HeadersFilenames = QStringList());
+ void enableCppParsing(bool enable);
+ void enableMissingFilesWarnings(bool enable);
+ void portProject(QString filePath);
+ void portFile(QString filePath);
+private slots:
+ void error(QString type, QString text);
+private:
+ void portProject(QString inPath, QString proFileName);
+ void portProFile(QString fileName, QMap<QString, QString> tagMap);
+ void portFiles(QString basePath, QStringList fileNames);
+ void enableAttributes(const IncludeFiles &includeFiles, const QString &fileName);
+
+ QSet<QString> processedFilesSet;
+ QString basePath;
+ QStringList includeDirectories;
+ PreprocessorCache preprocessorCache;
+ Rpp::DefineMap *defaultDefinitions;
+ FilePorter filePorter;
+ QStringList qt3HeadersFilenames;
+ bool analyze;
+ bool warnings;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/proparser.cpp b/tools/porting/src/proparser.cpp
new file mode 100644
index 0000000..db3876d
--- /dev/null
+++ b/tools/porting/src/proparser.cpp
@@ -0,0 +1,193 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "proparser.h"
+
+#include <QDir>
+#include <QFile>
+#include <QFileInfo>
+#include <QRegExp>
+#include <QStringList>
+#include <QTextStream>
+
+#ifdef Q_OS_UNIX
+#include <unistd.h>
+#endif
+
+#ifdef Q_OS_WIN32
+#define QT_POPEN _popen
+#else
+#define QT_POPEN popen
+#endif
+
+QT_BEGIN_NAMESPACE
+
+QString loadFile( const QString &fileName )
+{
+ QFile file( fileName );
+ if ( !file.open(QIODevice::ReadOnly) ) {
+ fprintf( stderr, "error: Cannot load '%s': %s\n",
+ file.fileName().toLocal8Bit().constData(),
+ file.errorString().toLatin1().constData() );
+ return QString();
+ }
+
+ QTextStream in( &file );
+ return in.readAll();
+}
+
+QMap<QString, QString> proFileTagMap( const QString& text, QString currentPath )
+{
+ QString t = text;
+ if (currentPath.isEmpty())
+ currentPath = QDir::currentPath();
+
+
+ QMap<QString, QString> tagMap;
+ /*
+ Strip any commments before we try to include. We
+ still need to do it after we include to make sure the
+ included file does not have comments
+ */
+ t.replace( QRegExp(QLatin1String("#[^\n]*\n")), QLatin1String(" ") );
+ /*
+ Strip comments, merge lines ending with backslash, add
+ spaces around '=' and '+=', replace '\n' with ';', and
+ simplify white spaces.
+ */
+ t.replace( QRegExp(QLatin1String("#[^\n]*\n")), QLatin1String(" ") );
+ t.replace( QRegExp(QLatin1String("\\\\[^\n\\S]*\n")), QLatin1String(" ") );
+ t.replace( QLatin1String("="), QLatin1String(" = ") );
+ t.replace( QLatin1String("+ ="), QLatin1String(" += ") );
+ t.replace( QLatin1String("\n"), QLatin1String(";") );
+ t = t.simplified();
+
+ /*
+ Populate tagMap with 'key = value' entries.
+ */
+ QStringList lines = t.split(QLatin1Char(';'));
+ QStringList::Iterator line;
+ for ( line = lines.begin(); line != lines.end(); ++line ) {
+ QStringList toks = (*line).split(QLatin1Char(' '), QString::SkipEmptyParts);
+
+ if ( toks.count() >= 3 &&
+ (toks[1] == QLatin1String("=") || toks[1] == QLatin1String("+=") ||
+ toks[1] == QLatin1String("*=")) ) {
+ QString tag = toks.first();
+ int k = tag.lastIndexOf( QLatin1Char(':') ); // as in 'unix:'
+ if ( k != -1 )
+ tag = tag.mid( k + 1 );
+ toks.erase( toks.begin() );
+
+ QString action = toks.first();
+ toks.erase( toks.begin() );
+
+ if ( tagMap.contains(tag) ) {
+ if ( action == QLatin1String("=") )
+ tagMap.insert( tag, toks.join(QLatin1String(" ")) );
+ else
+ tagMap[tag] += QLatin1Char( ' ' ) + toks.join( QLatin1String(" ") );
+ } else {
+ tagMap[tag] = toks.join( QLatin1String(" ") );
+ }
+ }
+ }
+ /*
+ Expand $$variables within the 'value' part of a 'key = value'
+ pair.
+ */
+ QRegExp var( QLatin1String("\\$\\$[({]?([a-zA-Z0-9_]+)[)}]?") );
+ QMap<QString, QString>::Iterator it;
+ for ( it = tagMap.begin(); it != tagMap.end(); ++it ) {
+ int i = 0;
+ while ( (i = var.indexIn((*it), i)) != -1 ) {
+ int len = var.matchedLength();
+ QString invocation = var.cap(1);
+ QString after;
+
+ if ( invocation == QLatin1String("system") ) {
+ // skip system(); it will be handled in the next pass
+ ++i;
+ } else {
+ if ( tagMap.contains(invocation) )
+ after = tagMap[invocation];
+ else if (invocation.toLower() == QLatin1String("pwd"))
+ after = currentPath;
+ (*it).replace( i, len, after );
+ i += after.length();
+ }
+ }
+ }
+
+ /*
+ Execute system() calls.
+ */
+ QRegExp callToSystem( QLatin1String("\\$\\$system\\s*\\(([^()]*)\\)") );
+ for ( it = tagMap.begin(); it != tagMap.end(); ++it ) {
+ int i = 0;
+ while ( (i = callToSystem.indexIn((*it), i)) != -1 ) {
+ /*
+ This code is stolen from qmake's project.cpp file.
+ Ideally we would use the same parser, so we wouldn't
+ have this code duplication.
+ */
+ QString after;
+ char buff[256];
+ FILE *proc = QT_POPEN( callToSystem.cap(1).toLatin1().constData(), "r" );
+ while ( proc && !feof(proc) ) {
+ int read_in = int(fread( buff, 1, 255, proc ));
+ if ( !read_in )
+ break;
+ for ( int i = 0; i < read_in; i++ ) {
+ if ( buff[i] == '\n' || buff[i] == '\t' )
+ buff[i] = ' ';
+ }
+ buff[read_in] = '\0';
+ after += QLatin1String(buff);
+ }
+ (*it).replace( i, callToSystem.matchedLength(), after );
+ i += after.length();
+ }
+ }
+ return tagMap;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/proparser.h b/tools/porting/src/proparser.h
new file mode 100644
index 0000000..8fdf46b
--- /dev/null
+++ b/tools/porting/src/proparser.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PROPARSER_H
+#define PROPARSER_H
+
+#include <QMap>
+#include <QString>
+
+QT_BEGIN_NAMESPACE
+
+QMap<QString, QString> proFileTagMap( const QString& text, QString currentPath = QString() );
+QString loadFile( const QString &fileName );
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/q3porting.xml b/tools/porting/src/q3porting.xml
new file mode 100644
index 0000000..42a9ae6
--- /dev/null
+++ b/tools/porting/src/q3porting.xml
@@ -0,0 +1,10567 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+**************************************************************************-->
+<Rules>
+ <Count>3796</Count>
+ <item Type="RenamedHeader" >
+ <Qt4>q3buttongroup.h</Qt4>
+ <Qt3>qvbuttongroup.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qcombobox.h</Qt4>
+ <Qt3>qcombo.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qtextstream.h</Qt4>
+ <Qt3>qtstream.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3objectdict.h</Qt4>
+ <Qt3>qobjcoll.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3accel.h</Qt4>
+ <Qt3>qaccel.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3asciicache.h</Qt4>
+ <Qt3>qasciicache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3asciidict.h</Qt4>
+ <Qt3>qasciidict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3buttongroup.h</Qt4>
+ <Qt3>qbuttongroup.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cache.h</Qt4>
+ <Qt3>qcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3canvas.h</Qt4>
+ <Qt3>qcanvas.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cleanuphandler.h</Qt4>
+ <Qt3>qcleanuphandler.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cstring.h</Qt4>
+ <Qt3>qcstring.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3databrowser.h</Qt4>
+ <Qt3>qdatabrowser.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3datatable.h</Qt4>
+ <Qt3>qdatatable.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dataview.h</Qt4>
+ <Qt3>qdataview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3datetimeedit.h</Qt4>
+ <Qt3>qdatetimeedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3deepcopy.h</Qt4>
+ <Qt3>qdeepcopy.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dict.h</Qt4>
+ <Qt3>qdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dns.h</Qt4>
+ <Qt3>qdns.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dockarea.h</Qt4>
+ <Qt3>qdockarea.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dockwindow.h</Qt4>
+ <Qt3>qdockwindow.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dragobject.h</Qt4>
+ <Qt3>qdragobject.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dropsite.h</Qt4>
+ <Qt3>qdropsite.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3editorfactory.h</Qt4>
+ <Qt3>qeditorfactory.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3filedialog.h</Qt4>
+ <Qt3>qfiledialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3frame.h</Qt4>
+ <Qt3>qframe.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ftp.h</Qt4>
+ <Qt3>qftp.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3garray.h</Qt4>
+ <Qt3>qgarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gcache.h</Qt4>
+ <Qt3>qgcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gdict.h</Qt4>
+ <Qt3>qgdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3glist.h</Qt4>
+ <Qt3>qglist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3grid.h</Qt4>
+ <Qt3>qgrid.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gridview.h</Qt4>
+ <Qt3>qgridview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3groupbox.h</Qt4>
+ <Qt3>qgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gvector.h</Qt4>
+ <Qt3>qgvector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3hbox.h</Qt4>
+ <Qt3>qhbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3header.h</Qt4>
+ <Qt3>qheader.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3hgroupbox.h</Qt4>
+ <Qt3>qhgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3http.h</Qt4>
+ <Qt3>qhttp.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3iconview.h</Qt4>
+ <Qt3>qiconview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3intcache.h</Qt4>
+ <Qt3>qintcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3intdict.h</Qt4>
+ <Qt3>qintdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3listbox.h</Qt4>
+ <Qt3>qlistbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3listview.h</Qt4>
+ <Qt3>qlistview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3localfs.h</Qt4>
+ <Qt3>qlocalfs.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3mainwindow.h</Qt4>
+ <Qt3>qmainwindow.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3memarray.h</Qt4>
+ <Qt3>qmemarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3multilineedit.h</Qt4>
+ <Qt3>qmultilineedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3network.h</Qt4>
+ <Qt3>qnetwork.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3networkprotocol.h</Qt4>
+ <Qt3>qnetworkprotocol.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3objectdict.h</Qt4>
+ <Qt3>qobjectdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3paintdevicemetrics.h</Qt4>
+ <Qt3>qpaintdevicemetrics.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3picture.h</Qt4>
+ <Qt3>qpicture.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3pointarray.h</Qt4>
+ <Qt3>qpointarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3polygonscanner.h</Qt4>
+ <Qt3>qpolygonscanner.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3popupmenu.h</Qt4>
+ <Qt3>qpopupmenu.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3process.h</Qt4>
+ <Qt3>qprocess.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3progressbar.h</Qt4>
+ <Qt3>qprogressbar.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3progressdialog.h</Qt4>
+ <Qt3>qprogressdialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrcollection.h</Qt4>
+ <Qt3>qptrcollection.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrdict.h</Qt4>
+ <Qt3>qptrdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrlist.h</Qt4>
+ <Qt3>qptrlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrqueue.h</Qt4>
+ <Qt3>qptrqueue.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrstack.h</Qt4>
+ <Qt3>qptrstack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrvector.h</Qt4>
+ <Qt3>qptrvector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3rangecontrol.h</Qt4>
+ <Qt3>qrangecontrol.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3scrollview.h</Qt4>
+ <Qt3>qscrollview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3semaphore.h</Qt4>
+ <Qt3>qsemaphore.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3serversocket.h</Qt4>
+ <Qt3>qserversocket.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3shared.h</Qt4>
+ <Qt3>qshared.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3signal.h</Qt4>
+ <Qt3>qsignal.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3simplerichtext.h</Qt4>
+ <Qt3>qsimplerichtext.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3socket.h</Qt4>
+ <Qt3>qsocket.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3socketdevice.h</Qt4>
+ <Qt3>qsocketdevice.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sortedlist.h</Qt4>
+ <Qt3>qsortedlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlcursor.h</Qt4>
+ <Qt3>qsqlcursor.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqleditorfactory.h</Qt4>
+ <Qt3>qsqleditorfactory.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlform.h</Qt4>
+ <Qt3>qsqlform.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlpropertymap.h</Qt4>
+ <Qt3>qsqlpropertymap.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlselectcursor.h</Qt4>
+ <Qt3>qsqlselectcursor.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3strlist.h</Qt4>
+ <Qt3>qstrlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3strvec.h</Qt4>
+ <Qt3>qstrvec.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3stylesheet.h</Qt4>
+ <Qt3>qstylesheet.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3syntaxhighlighter.h</Qt4>
+ <Qt3>qsyntaxhighlighter.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3tabdialog.h</Qt4>
+ <Qt3>qtabdialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3table.h</Qt4>
+ <Qt3>qtable.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textbrowser.h</Qt4>
+ <Qt3>qtextbrowser.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textedit.h</Qt4>
+ <Qt3>qtextedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textstream.h</Qt4>
+ <Qt3>qtextstream.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textview.h</Qt4>
+ <Qt3>qtextview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3tl.h</Qt4>
+ <Qt3>qtl.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3toolbar.h</Qt4>
+ <Qt3>qtoolbar.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3url.h</Qt4>
+ <Qt3>qurl.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3urloperator.h</Qt4>
+ <Qt3>qurloperator.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuelist.h</Qt4>
+ <Qt3>qvaluelist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuestack.h</Qt4>
+ <Qt3>qvaluestack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuevector.h</Qt4>
+ <Qt3>qvaluevector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3vbox.h</Qt4>
+ <Qt3>qvbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3vgroupbox.h</Qt4>
+ <Qt3>qvgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3whatsthis.h</Qt4>
+ <Qt3>qwhatsthis.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3widgetstack.h</Qt4>
+ <Qt3>qwidgetstack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3wizard.h</Qt4>
+ <Qt3>qwizard.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3accel.h</Qt4>
+ <Qt3>qaccel.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3asciicache.h</Qt4>
+ <Qt3>qasciicache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3asciidict.h</Qt4>
+ <Qt3>qasciidict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3buttongroup.h</Qt4>
+ <Qt3>qbuttongroup.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cache.h</Qt4>
+ <Qt3>qcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3canvas.h</Qt4>
+ <Qt3>qcanvas.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cleanuphandler.h</Qt4>
+ <Qt3>qcleanuphandler.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3cstring.h</Qt4>
+ <Qt3>qcstring.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3databrowser.h</Qt4>
+ <Qt3>qdatabrowser.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3datatable.h</Qt4>
+ <Qt3>qdatatable.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dataview.h</Qt4>
+ <Qt3>qdataview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3datetimeedit.h</Qt4>
+ <Qt3>qdatetimeedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3deepcopy.h</Qt4>
+ <Qt3>qdeepcopy.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dict.h</Qt4>
+ <Qt3>qdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dns.h</Qt4>
+ <Qt3>qdns.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dockarea.h</Qt4>
+ <Qt3>qdockarea.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dockwindow.h</Qt4>
+ <Qt3>qdockwindow.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dragobject.h</Qt4>
+ <Qt3>qdragobject.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3dropsite.h</Qt4>
+ <Qt3>qdropsite.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3editorfactory.h</Qt4>
+ <Qt3>qeditorfactory.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3filedialog.h</Qt4>
+ <Qt3>qfiledialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3frame.h</Qt4>
+ <Qt3>qframe.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ftp.h</Qt4>
+ <Qt3>qftp.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3garray.h</Qt4>
+ <Qt3>qgarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gcache.h</Qt4>
+ <Qt3>qgcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gdict.h</Qt4>
+ <Qt3>qgdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3glist.h</Qt4>
+ <Qt3>qglist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3grid.h</Qt4>
+ <Qt3>qgrid.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gridview.h</Qt4>
+ <Qt3>qgridview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3groupbox.h</Qt4>
+ <Qt3>qgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3gvector.h</Qt4>
+ <Qt3>qgvector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3hbox.h</Qt4>
+ <Qt3>qhbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3header.h</Qt4>
+ <Qt3>qheader.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3hgroupbox.h</Qt4>
+ <Qt3>qhgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3http.h</Qt4>
+ <Qt3>qhttp.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3iconview.h</Qt4>
+ <Qt3>qiconview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3intcache.h</Qt4>
+ <Qt3>qintcache.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3intdict.h</Qt4>
+ <Qt3>qintdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3listbox.h</Qt4>
+ <Qt3>qlistbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3listview.h</Qt4>
+ <Qt3>qlistview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3localfs.h</Qt4>
+ <Qt3>qlocalfs.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3mainwindow.h</Qt4>
+ <Qt3>qmainwindow.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3memarray.h</Qt4>
+ <Qt3>qmemarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3multilineedit.h</Qt4>
+ <Qt3>qmultilineedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3network.h</Qt4>
+ <Qt3>qnetwork.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3networkprotocol.h</Qt4>
+ <Qt3>qnetworkprotocol.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3objectdict.h</Qt4>
+ <Qt3>qobjectdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3paintdevicemetrics.h</Qt4>
+ <Qt3>qpaintdevicemetrics.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3picture.h</Qt4>
+ <Qt3>qpicture.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3pointarray.h</Qt4>
+ <Qt3>qpointarray.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3polygonscanner.h</Qt4>
+ <Qt3>qpolygonscanner.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3popupmenu.h</Qt4>
+ <Qt3>qpopupmenu.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3process.h</Qt4>
+ <Qt3>qprocess.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3progressbar.h</Qt4>
+ <Qt3>qprogressbar.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3progressdialog.h</Qt4>
+ <Qt3>qprogressdialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrcollection.h</Qt4>
+ <Qt3>qptrcollection.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrdict.h</Qt4>
+ <Qt3>qptrdict.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrlist.h</Qt4>
+ <Qt3>qptrlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrqueue.h</Qt4>
+ <Qt3>qptrqueue.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrstack.h</Qt4>
+ <Qt3>qptrstack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3ptrvector.h</Qt4>
+ <Qt3>qptrvector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3rangecontrol.h</Qt4>
+ <Qt3>qrangecontrol.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3scrollview.h</Qt4>
+ <Qt3>qscrollview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3semaphore.h</Qt4>
+ <Qt3>qsemaphore.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3serversocket.h</Qt4>
+ <Qt3>qserversocket.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3shared.h</Qt4>
+ <Qt3>qshared.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3signal.h</Qt4>
+ <Qt3>qsignal.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3simplerichtext.h</Qt4>
+ <Qt3>qsimplerichtext.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3socket.h</Qt4>
+ <Qt3>qsocket.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3socketdevice.h</Qt4>
+ <Qt3>qsocketdevice.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sortedlist.h</Qt4>
+ <Qt3>qsortedlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlcursor.h</Qt4>
+ <Qt3>qsqlcursor.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqleditorfactory.h</Qt4>
+ <Qt3>qsqleditorfactory.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlform.h</Qt4>
+ <Qt3>qsqlform.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlpropertymap.h</Qt4>
+ <Qt3>qsqlpropertymap.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3sqlselectcursor.h</Qt4>
+ <Qt3>qsqlselectcursor.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3strlist.h</Qt4>
+ <Qt3>qstrlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3strvec.h</Qt4>
+ <Qt3>qstrvec.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3stylesheet.h</Qt4>
+ <Qt3>qstylesheet.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3syntaxhighlighter.h</Qt4>
+ <Qt3>qsyntaxhighlighter.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3tabdialog.h</Qt4>
+ <Qt3>qtabdialog.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3table.h</Qt4>
+ <Qt3>qtable.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textbrowser.h</Qt4>
+ <Qt3>qtextbrowser.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textedit.h</Qt4>
+ <Qt3>qtextedit.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textstream.h</Qt4>
+ <Qt3>qtextstream.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3textview.h</Qt4>
+ <Qt3>qtextview.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3tl.h</Qt4>
+ <Qt3>qtl.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3toolbar.h</Qt4>
+ <Qt3>qtoolbar.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3url.h</Qt4>
+ <Qt3>qurl.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3urloperator.h</Qt4>
+ <Qt3>qurloperator.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuelist.h</Qt4>
+ <Qt3>qvaluelist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuestack.h</Qt4>
+ <Qt3>qvaluestack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3valuevector.h</Qt4>
+ <Qt3>qvaluevector.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3vbox.h</Qt4>
+ <Qt3>qvbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3vgroupbox.h</Qt4>
+ <Qt3>qvgroupbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3whatsthis.h</Qt4>
+ <Qt3>qwhatsthis.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3widgetstack.h</Qt4>
+ <Qt3>qwidgetstack.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>q3wizard.h</Qt4>
+ <Qt3>qwizard.h</Qt3>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxAggregated</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxBindable</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxClass</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxScript</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxScriptEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxScriptManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxSelect</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>ActiveQt</Library>
+ <Name>QAxWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Accel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Action</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ActionGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3AsciiBucket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3AsciiCache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3AsciiCacheIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3AsciiDict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3AsciiDictIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3BaseBucket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3BoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Button</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ButtonGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Cache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CacheIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Canvas</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasEllipse</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasItemList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasLine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasPixmap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasPixmapArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasPolygon</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasPolygonalItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasRectangle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasSpline</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasSprite</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasText</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CanvasView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CheckListItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CheckTableItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CleanupHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ColorDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ComboBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ComboTableItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3CString</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DataBrowser</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DataTable</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DataView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DateEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DateTimeEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DateTimeEditBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DeepCopy</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Dict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DictIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Dns</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DnsSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DockArea</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DockAreaLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DockWindow</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DragObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3DropSite</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3EditorFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3FileDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3FileIconProvider</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3FilePreview</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Frame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Ftp</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GCache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GCacheIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GDict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GDictIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GListStdIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Grid</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GridLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GridView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GroupBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3GVector</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HBoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HButtonGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Header</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HGroupBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Http</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HttpHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HttpRequestHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3HttpResponseHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IconDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IconDragItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IconView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IconViewItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ImageDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IntBucket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IntCache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IntCacheIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IntDict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3IntDictIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListBoxItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListBoxPixmap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListBoxText</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListViewItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ListViewItemIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3LNode</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3LocalFs</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3MainWindow</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3MemArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3MimeSourceFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3MultiLineEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3NetworkOperation</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3NetworkProtocol</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3NetworkProtocolDict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3NetworkProtocolFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3NetworkProtocolFactoryBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ObjectDictionary</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PaintDeviceMetrics</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Painter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Picture</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PointArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PolygonScanner</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PopupMenu</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Process</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ProgressBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ProgressDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrBucket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrCollection</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrDict</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrDictIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrListStdIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrQueue</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrStack</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3PtrVector</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3RangeControl</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ScrollView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Semaphore</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ServerSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Shared</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Signal</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SimpleRichText</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SingleCleanupHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Socket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SocketDevice</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SortedList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SpinWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlEditorFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlFieldInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlFieldInfoList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlForm</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlPropertyMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlRecordInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SqlSelectCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StoredDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StrIList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StringBucket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StrIVec</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StrList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StrListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StrVec</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StyleSheet</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3StyleSheetItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3SyntaxHighlighter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TabDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Table</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TableItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TableSelection</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextBrowser</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextEditOptimPrivate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextStream</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TextView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TimeEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ToolBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3TSFUNC</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3UriDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Url</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3UrlOperator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ValueList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ValueListConstIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ValueListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ValueStack</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3ValueVector</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3VBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3VBoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3VButtonGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3VGroupBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3WhatsThis</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3WidgetStack</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>Qt3Support</Library>
+ <Name>Q3Wizard</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtAssistant</Library>
+ <Name>QAssistantClient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractEventDispatcher</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractFileEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractFileEngineHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractItemModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractListModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAbstractTableModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QArgument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAtomic</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QAtomicPointer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBasicAtomic</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBasicAtomicPointer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBasicTimer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBitArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBitRef</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBool</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QBuffer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QByteArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QByteArrayMatcher</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QByteRef</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QCache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QChar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QCharRef</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QChildEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QConstString</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QCOORD</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QCoreApplication</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QCustomEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDataStream</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDateTime</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDebug</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDir</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QDynamicPropertyChangeEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QEventLoop</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFile</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFileInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFileInfoList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFileInfoListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFileSystemWatcher</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFlag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFlags</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QForeachContainer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QForeachContainerBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QFSFileEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QGenericArgument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QGenericReturnArgument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QGlobalStatic</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHash</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHashData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHashDummyNode</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHashDummyValue</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHashIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QHashNode</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QInternal</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QIntForSize</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QIntForType</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QIODevice</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLatin1Char</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLatin1String</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLibrary</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLibraryInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLineF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLinkedList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLinkedListData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLinkedListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLinkedListNode</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QListData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QLocale</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMapData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMapIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaClassInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaEnum</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaMethod</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaProperty</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaType</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaTypeId</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMetaTypeId2</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMimeData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QModelIndex</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QModelIndexList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMultiHash</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMultiMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableHashIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableLinkedListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableMapIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableSetIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableStringListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutableVectorIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutex</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QMutexLocker</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QNoDebug</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QNoImplicitBoolCast</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QObjectCleanupHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QObjectData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QObjectList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QObjectUserData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPair</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPersistentModelIndex</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPluginLoader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPoint</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPointer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QPointF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QProcess</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QQueue</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QReadLocker</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QReadWriteLock</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QRect</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QRectF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QRegExp</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QResource</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QReturnArgument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSemaphore</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSet</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSetIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSettings</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSharedData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSharedDataPointer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSignalMapper</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSize</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSizeF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSocketNotifier</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QStack</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QStdWString</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QString</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QStringList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QStringListIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QStringMatcher</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSysInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QSystemLocale</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTemporaryFile</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextCodec</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextCodecFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextCodecPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextDecoder</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextEncoder</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextIStream</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextOStream</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextStream</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextStreamFunction</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTextStreamManipulator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QThread</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QThreadStorage</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QThreadStorageData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTime</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTimeLine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTimer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTimerEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTranslator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTS</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QTypeInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QUintForSize</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QUintForType</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QUrl</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QUuid</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVariant</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVariantComparisonHelper</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVariantList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVariantMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVarLengthArray</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVector</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVectorData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVectorIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QVectorTypedData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QWaitCondition</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtCore</Library>
+ <Name>QWriteLocker</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusAbstractAdaptor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusAbstractInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusArgument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusConnection</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusConnectionInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusError</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusInterfacePtr</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusMessage</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusMetaType</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusObjectPath</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusReply</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusServer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusSignature</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDBus</Library>
+ <Name>QDBusVariant</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QAbstractExtensionFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QAbstractExtensionManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QAbstractFormBuilder</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerActionEditorInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerBrushManagerInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerComponents</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerContainerExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerCustomWidgetCollectionInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerCustomWidgetInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerDnDItemInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerExportWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerExtraInfoExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormEditorInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormEditorPluginInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormWindowCursorInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormWindowInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormWindowManagerInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerFormWindowToolInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerIconCacheInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerLayoutDecorationExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerMemberSheetExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerMetaDataBaseInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerMetaDataBaseItemInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerObjectInspectorInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerPropertyEditorInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerPropertySheetExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerTaskMenuExtension</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerWidgetBoxInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerWidgetDataBaseInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerWidgetDataBaseItemInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QDesignerWidgetFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QExtensionFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QExtensionManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtDesigner</Library>
+ <Name>QFormBuilder</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractGraphicsPathItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractGraphicsShapeItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractItemDelegate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractItemView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractPageSetupDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractPrintDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractProxyModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractScrollArea</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractSlider</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractSpinBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractTextDocumentLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAbstractUndoItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessible</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleApplication</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleBridge</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleBridgeFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleBridgePlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleInterfaceEx</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleObjectEx</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessiblePlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAccessibleWidgetEx</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QAction</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QActionEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QActionGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QApplication</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QBitmap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QBoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QBrush</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QBrushData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QButtonGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCalendarWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCDEStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCheckBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCleanLooksStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCleanlooksStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QClipboard</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QClipboardEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCloseEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QColor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QColorDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QColorGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QColormap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QComboBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCommonStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCompleter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QConicalGradient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QContextMenuEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCopChannel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QCursorShape</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDataWidgetMapper</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDateEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDateTimeEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecoration</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationAction</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationDefault</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationStyled</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDecorationWindows</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDesktopServices</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDesktopWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDial</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDialogButtonBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDirectPainter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDirModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDockWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDoubleSpinBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDoubleValidator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDrag</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDragEnterEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDragLeaveEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDragMoveEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDragResponseEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QDropEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QErrorMessage</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFileDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFileIconProvider</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFileOpenEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFocusEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFocusFrame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFont</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontComboBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontDatabase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontMetrics</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFontMetricsF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QFrame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGradient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGradientStop</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGradientStops</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsEllipseItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsItemAnimation</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsItemGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsLineItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsPathItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsPixmapItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsPolygonItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsRectItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsScene</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneContextMenuEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneDragDropEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneHelpEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneHoverEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneMouseEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSceneWheelEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsSimpleTextItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsTextItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGraphicsView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGridLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QGroupBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QHBoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QHeaderView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QHelpEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QHideEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QHoverEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIcon</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIconDragEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIconEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIconEngineFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIconEnginePlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIconSet</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImage</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageIOHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageIOHandlerFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageIOPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageReader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageTextKeyLang</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QImageWriter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputContext</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputContextFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputContextFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputContextPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QInputMethodEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QIntValidator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemDelegate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemEditorCreator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemEditorCreatorBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemEditorFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemSelection</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemSelectionModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QItemSelectionRange</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QKbdDriverFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QKbdDriverPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QKeyEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QKeySequence</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLabel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLayoutItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLayoutIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLCDNumber</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLinearGradient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLineEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLinuxFb_Shared</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QLinuxFbScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QListView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QListWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QListWidgetItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMacMime</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMacPasteBoardMime</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMacStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMainWindow</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMatrix</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMenu</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMenuBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMenubarUpdatedEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMenuItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMessageBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMimeSource</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMotifStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMouseDriverFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMouseDriverPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMouseEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMoveEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QMovie</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPageSetupDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPaintDevice</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPaintEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPaintEngineState</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPainter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPainterPath</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPainterPathPrivate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPainterPathStroker</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPaintEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPalette</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPicture</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPictureFormatInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPictureFormatPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPictureIO</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPixmap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPixmapCache</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPlastiqueStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPolygon</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPolygonF</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPoolEntry</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPrintDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPrintEngine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPrinter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QProgressBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QProgressDialog</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QProxyModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QPushButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRadialGradient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRadioButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRegExpValidator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRegion</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QResizeEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRgb</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QRubberBand</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScreenCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScreenDriverFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScreenDriverFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScreenDriverPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScrollArea</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QScrollBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSessionManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QShortcut</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QShortcutEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QShowEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSizeGrip</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSizePolicy</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSlider</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSortFilterProxyModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSound</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSpacerItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSpinBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSplashScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSplitter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSplitterHandle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStackedLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStackedWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStandardItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStandardItemEditorCreator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStandardItemModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStatusBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStatusTipEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStringListModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleFactory</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleHintReturn</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleHintReturnMask</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOption</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionComboBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionComplex</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionDockWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionFocusRect</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionFrame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionFrameV2</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionGraphicsItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionGroupBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionMenuItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionProgressBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionProgressBarV2</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionQ3DockWindow</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionQ3ListView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionQ3ListViewItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionRubberBand</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionSizeGrip</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionSlider</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionSpinBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionTab</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionTabBarBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionTabV2</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionTabWidgetFrame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionTitleBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionToolBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionToolBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionToolButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionViewItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStyleOptionViewItemV2</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStylePainter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QStylePlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSyntaxHighlighter</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QSystemTrayIcon</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTabBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTabletEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTableView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTableWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTableWidgetItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTableWidgetSelectionRange</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTabWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextBlock</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextBlockFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextBlockGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextBlockUserData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextBrowser</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextCharFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextDocument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextDocumentFragment</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextFragment</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextFrame</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextFrameFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextFrameLayoutData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextImageFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextInlineObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextLength</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextLine</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextListFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextObjectInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextOption</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextTable</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextTableCell</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTextTableFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTimeEdit</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QToolBar</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QToolBarChangeEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QToolBox</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QToolButton</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QToolTip</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTransformedScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTransportAuth</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTreeView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTreeWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTreeWidgetItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QTreeWidgetItemIterator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QUndoCommand</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QUndoGroup</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QUndoStack</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QUndoView</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QUpdateLaterEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QValidator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVBoxLayout</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVFbHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVFbKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVFbKeyData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVFbMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVFbScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QVNCScreen</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWhatsThis</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWhatsThisClickedEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWheelEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetAction</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetMapper</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWidgetSet</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWindowsMime</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWindowsStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWindowStateChangeEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWindowsXPStyle</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWMatrix</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWorkspace</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSBusMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSCalibratedMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSClient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSCursor</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSCursorMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSDisplay</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSEmbedWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSInputMethod</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSInternalWindowInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSKeyboardHandlerFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSLinuxTPMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSMouseHandlerFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSPC101KeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSPcMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSPointerCalibrationData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSPropertyManager</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSProtocolItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSScreenSaver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSServer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSServerSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSSL5000KeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSSoundClient</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSSoundServer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSSoundServerSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSTslibMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSTtyKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSUmKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSUsbKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSVr41xxKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSVr41xxMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSWindow</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSWindowInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSYopyKeyboardHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QWSYopyMouseHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QX11EmbedContainer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QX11EmbedWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtGui</Library>
+ <Name>QX11Info</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QAbstractSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QFtp</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHostAddress</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHostInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHttp</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHttpHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHttpRequestHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QHttpResponseHeader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QIPv6Address</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QNetworkAddressEntry</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QNetworkInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QNetworkProxy</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QTcpServer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QTcpSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QUdpSocket</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtNetwork</Library>
+ <Name>QUrlInfo</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLColormap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLContext</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLFormat</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLFramebufferObject</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLPixelBuffer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtOpenGL</Library>
+ <Name>QGLWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QDB2Driver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QDB2Result</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QIBaseDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QIBaseResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QMYSQLDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QMYSQLResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QOCIDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QOCIResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QODBCDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QODBCResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QPSQLDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QPSQLResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDatabase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDriverCreator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDriverCreatorBase</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDriverFactoryInterface</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlDriverPlugin</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlError</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlField</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlIndex</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSQLite2Driver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSQLite2Result</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSQLiteDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSQLiteResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlQuery</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlQueryModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlRecord</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlRelation</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlRelationalDelegate</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlRelationalTableModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QSqlTableModel</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QTDSDriver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSql</Library>
+ <Name>QTDSResult</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSvg</Library>
+ <Name>QGraphicsSvgItem</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSvg</Library>
+ <Name>QSvgRenderer</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtSvg</Library>
+ <Name>QSvgWidget</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QEventSizeOfChecker</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QSignalSpy</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QSpontaneKeyEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTest</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestAccessibility</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestAccessibilityEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestDelayEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestEventList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestEventLoop</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestKeyClicksEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestKeyEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtTest</Library>
+ <Name>QTestMouseEvent</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtUiTools</Library>
+ <Name>QUiLoader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomAttr</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomCDATASection</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomCharacterData</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomComment</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomDocument</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomDocumentFragment</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomDocumentType</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomElement</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomEntity</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomEntityReference</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomImplementation</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomNamedNodeMap</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomNode</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomNodeList</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomNotation</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomProcessingInstruction</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QDomText</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlAttributes</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlContentHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlDeclHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlDefaultHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlDTDHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlEntityResolver</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlErrorHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlInputSource</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlLexicalHandler</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlLocator</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlNamespaceSupport</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlParseException</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlReader</Name>
+ </item>
+ <item Type="Qt4Class" >
+ <Library>QtXml</Library>
+ <Name>QXmlSimpleReader</Name>
+ </item>
+ <item Type="qt3Header" >jri.h</item>
+ <item Type="qt3Header" >jri_md.h</item>
+ <item Type="qt3Header" >jritypes.h</item>
+ <item Type="qt3Header" >moc_yacc.h</item>
+ <item Type="qt3Header" >mwerks_mac.h</item>
+ <item Type="qt3Header" >npapi.h</item>
+ <item Type="qt3Header" >npupp.h</item>
+ <item Type="qt3Header" >q1xcompatibility.h</item>
+ <item Type="qt3Header" >qabstractlayout.h</item>
+ <item Type="qt3Header" >qaccel.h</item>
+ <item Type="qt3Header" >qaccessible.h</item>
+ <item Type="qt3Header" >qaction.h</item>
+ <item Type="qt3Header" >qapp.h</item>
+ <item Type="qt3Header" >qapplication.h</item>
+ <item Type="qt3Header" >qaquastyle.h</item>
+ <item Type="qt3Header" >qarray.h</item>
+ <item Type="qt3Header" >qasciicache.h</item>
+ <item Type="qt3Header" >qasciidict.h</item>
+ <item Type="qt3Header" >qassistantclient.h</item>
+ <item Type="qt3Header" >qasyncimageio.h</item>
+ <item Type="qt3Header" >qasyncio.h</item>
+ <item Type="qt3Header" >qaxbase.h</item>
+ <item Type="qt3Header" >qaxbindable.h</item>
+ <item Type="qt3Header" >qaxfactory.h</item>
+ <item Type="qt3Header" >qaxobject.h</item>
+ <item Type="qt3Header" >qaxscript.h</item>
+ <item Type="qt3Header" >qaxwidget.h</item>
+ <item Type="qt3Header" >qbig5codec.h</item>
+ <item Type="qt3Header" >qbitarray.h</item>
+ <item Type="qt3Header" >qbitarry.h</item>
+ <item Type="qt3Header" >qbitmap.h</item>
+ <item Type="qt3Header" >qbrush.h</item>
+ <item Type="qt3Header" >qbttngrp.h</item>
+ <item Type="qt3Header" >qbuffer.h</item>
+ <item Type="qt3Header" >qbutton.h</item>
+ <item Type="qt3Header" >qbuttongroup.h</item>
+ <item Type="qt3Header" >qcache.h</item>
+ <item Type="qt3Header" >qcanvas.h</item>
+ <item Type="qt3Header" >qcdestyle.h</item>
+ <item Type="qt3Header" >qcheckbox.h</item>
+ <item Type="qt3Header" >qchkbox.h</item>
+ <item Type="qt3Header" >qcleanuphandler.h</item>
+ <item Type="qt3Header" >qclipboard.h</item>
+ <item Type="qt3Header" >qclipbrd.h</item>
+ <item Type="qt3Header" >qcollect.h</item>
+ <item Type="qt3Header" >qcollection.h</item>
+ <item Type="qt3Header" >qcolor.h</item>
+ <item Type="qt3Header" >qcolordialog.h</item>
+ <item Type="qt3Header" >qcombo.h</item>
+ <item Type="qt3Header" >qcombobox.h</item>
+ <item Type="qt3Header" >qcommonstyle.h</item>
+ <item Type="qt3Header" >qcompactstyle.h</item>
+ <item Type="qt3Header" >qconfig-dist.h</item>
+ <item Type="qt3Header" >qconfig-large.h</item>
+ <item Type="qt3Header" >qconfig-medium.h</item>
+ <item Type="qt3Header" >qconfig-minimal.h</item>
+ <item Type="qt3Header" >qconfig-small.h</item>
+ <item Type="qt3Header" >qconfig.h</item>
+ <item Type="qt3Header" >qconnect.h</item>
+ <item Type="qt3Header" >qconnection.h</item>
+ <item Type="qt3Header" >qcopchannel_qws.h</item>
+ <item Type="qt3Header" >qcstring.h</item>
+ <item Type="qt3Header" >qcursor.h</item>
+ <item Type="qt3Header" >qdatabrowser.h</item>
+ <item Type="qt3Header" >qdatastream.h</item>
+ <item Type="qt3Header" >qdatatable.h</item>
+ <item Type="qt3Header" >qdataview.h</item>
+ <item Type="qt3Header" >qdatetime.h</item>
+ <item Type="qt3Header" >qdatetimeedit.h</item>
+ <item Type="qt3Header" >qdatetm.h</item>
+ <item Type="qt3Header" >qdeepcopy.h</item>
+ <item Type="qt3Header" >qdesktopwidget.h</item>
+ <item Type="qt3Header" >qdial.h</item>
+ <item Type="qt3Header" >qdialog.h</item>
+ <item Type="qt3Header" >qdict.h</item>
+ <item Type="qt3Header" >qdir.h</item>
+ <item Type="qt3Header" >qdirectpainter_qws.h</item>
+ <item Type="qt3Header" >qdns.h</item>
+ <item Type="qt3Header" >qdockarea.h</item>
+ <item Type="qt3Header" >qdockwindow.h</item>
+ <item Type="qt3Header" >qdom.h</item>
+ <item Type="qt3Header" >qdragobject.h</item>
+ <item Type="qt3Header" >qdrawutil.h</item>
+ <item Type="qt3Header" >qdrawutl.h</item>
+ <item Type="qt3Header" >qdropsite.h</item>
+ <item Type="qt3Header" >qdstream.h</item>
+ <item Type="qt3Header" >qeditorfactory.h</item>
+ <item Type="qt3Header" >qerrormessage.h</item>
+ <item Type="qt3Header" >qeucjpcodec.h</item>
+ <item Type="qt3Header" >qeuckrcodec.h</item>
+ <item Type="qt3Header" >qevent.h</item>
+ <item Type="qt3Header" >qeventloop.h</item>
+ <item Type="qt3Header" >qfeatures.h</item>
+ <item Type="qt3Header" >qfile.h</item>
+ <item Type="qt3Header" >qfiledef.h</item>
+ <item Type="qt3Header" >qfiledialog.h</item>
+ <item Type="qt3Header" >qfiledlg.h</item>
+ <item Type="qt3Header" >qfileinf.h</item>
+ <item Type="qt3Header" >qfileinfo.h</item>
+ <item Type="qt3Header" >qfocusdata.h</item>
+ <item Type="qt3Header" >qfont.h</item>
+ <item Type="qt3Header" >qfontdatabase.h</item>
+ <item Type="qt3Header" >qfontdialog.h</item>
+ <item Type="qt3Header" >qfontfactorybdf_qws.h</item>
+ <item Type="qt3Header" >qfontfactoryttf_qws.h</item>
+ <item Type="qt3Header" >qfontinf.h</item>
+ <item Type="qt3Header" >qfontinfo.h</item>
+ <item Type="qt3Header" >qfontmanager_qws.h</item>
+ <item Type="qt3Header" >qfontmet.h</item>
+ <item Type="qt3Header" >qfontmetrics.h</item>
+ <item Type="qt3Header" >qframe.h</item>
+ <item Type="qt3Header" >qftp.h</item>
+ <item Type="qt3Header" >qfunctions_wce.h</item>
+ <item Type="qt3Header" >qgarray.h</item>
+ <item Type="qt3Header" >qgb18030codec.h</item>
+ <item Type="qt3Header" >qgbkcodec.h</item>
+ <item Type="qt3Header" >qgcache.h</item>
+ <item Type="qt3Header" >qgdict.h</item>
+ <item Type="qt3Header" >qgeneric.h</item>
+ <item Type="qt3Header" >qgfx_qws.h</item>
+ <item Type="qt3Header" >qgfxdriverfactory_qws.h</item>
+ <item Type="qt3Header" >qgfxdriverplugin_qws.h</item>
+ <item Type="qt3Header" >qgfxlinuxfb_qws.h</item>
+ <item Type="qt3Header" >qgfxmach64_qws.h</item>
+ <item Type="qt3Header" >qgfxmach64defs_qws.h</item>
+ <item Type="qt3Header" >qgfxmatrox_qws.h</item>
+ <item Type="qt3Header" >qgfxmatroxdefs_qws.h</item>
+ <item Type="qt3Header" >qgfxraster_qws.h</item>
+ <item Type="qt3Header" >qgfxrepeater_qws.h</item>
+ <item Type="qt3Header" >qgfxshadowfb_qws.h</item>
+ <item Type="qt3Header" >qgfxsnap_qws.h</item>
+ <item Type="qt3Header" >qgfxtransformed_qws.h</item>
+ <item Type="qt3Header" >qgfxvfb_qws.h</item>
+ <item Type="qt3Header" >qgfxvga16_qws.h</item>
+ <item Type="qt3Header" >qgfxvnc_qws.h</item>
+ <item Type="qt3Header" >qgfxvoodoo_qws.h</item>
+ <item Type="qt3Header" >qgfxvoodoodefs_qws.h</item>
+ <item Type="qt3Header" >qgif.h</item>
+ <item Type="qt3Header" >qgl.h</item>
+ <item Type="qt3Header" >qglcolormap.h</item>
+ <item Type="qt3Header" >qglist.h</item>
+ <item Type="qt3Header" >qglobal.h</item>
+ <item Type="qt3Header" >qgplugin.h</item>
+ <item Type="qt3Header" >qgrid.h</item>
+ <item Type="qt3Header" >qgridview.h</item>
+ <item Type="qt3Header" >qgroupbox.h</item>
+ <item Type="qt3Header" >qgrpbox.h</item>
+ <item Type="qt3Header" >qguardedptr.h</item>
+ <item Type="qt3Header" >qgvector.h</item>
+ <item Type="qt3Header" >qhbox.h</item>
+ <item Type="qt3Header" >qhbuttongroup.h</item>
+ <item Type="qt3Header" >qheader.h</item>
+ <item Type="qt3Header" >qhgroupbox.h</item>
+ <item Type="qt3Header" >qhostaddress.h</item>
+ <item Type="qt3Header" >qhttp.h</item>
+ <item Type="qt3Header" >qiconset.h</item>
+ <item Type="qt3Header" >qiconview.h</item>
+ <item Type="qt3Header" >qimage.h</item>
+ <item Type="qt3Header" >qimageformatplugin.h</item>
+ <item Type="qt3Header" >qinputdialog.h</item>
+ <item Type="qt3Header" >qintcach.h</item>
+ <item Type="qt3Header" >qintcache.h</item>
+ <item Type="qt3Header" >qintdict.h</item>
+ <item Type="qt3Header" >qinterlacestyle.h</item>
+ <item Type="qt3Header" >qiodev.h</item>
+ <item Type="qt3Header" >qiodevice.h</item>
+ <item Type="qt3Header" >qjiscodec.h</item>
+ <item Type="qt3Header" >qjpegio.h</item>
+ <item Type="qt3Header" >qjpunicode.h</item>
+ <item Type="qt3Header" >qkbd_qws.h</item>
+ <item Type="qt3Header" >qkbddriverfactory_qws.h</item>
+ <item Type="qt3Header" >qkbddriverplugin_qws.h</item>
+ <item Type="qt3Header" >qkbdpc101_qws.h</item>
+ <item Type="qt3Header" >qkbdsl5000_qws.h</item>
+ <item Type="qt3Header" >qkbdtty_qws.h</item>
+ <item Type="qt3Header" >qkbdusb_qws.h</item>
+ <item Type="qt3Header" >qkbdvr41xx_qws.h</item>
+ <item Type="qt3Header" >qkbdyopy_qws.h</item>
+ <item Type="qt3Header" >qkeyboard_qws.h</item>
+ <item Type="qt3Header" >qkeycode.h</item>
+ <item Type="qt3Header" >qkeysequence.h</item>
+ <item Type="qt3Header" >qlabel.h</item>
+ <item Type="qt3Header" >qlayout.h</item>
+ <item Type="qt3Header" >qlcdnum.h</item>
+ <item Type="qt3Header" >qlcdnumber.h</item>
+ <item Type="qt3Header" >qlibrary.h</item>
+ <item Type="qt3Header" >qlined.h</item>
+ <item Type="qt3Header" >qlineedit.h</item>
+ <item Type="qt3Header" >qlist.h</item>
+ <item Type="qt3Header" >qlistbox.h</item>
+ <item Type="qt3Header" >qlistview.h</item>
+ <item Type="qt3Header" >qlocale.h</item>
+ <item Type="qt3Header" >qlocalfs.h</item>
+ <item Type="qt3Header" >qmacstyle_mac.h</item>
+ <item Type="qt3Header" >qmainwindow.h</item>
+ <item Type="qt3Header" >qmap.h</item>
+ <item Type="qt3Header" >qmemarray.h</item>
+ <item Type="qt3Header" >qmemorymanager_qws.h</item>
+ <item Type="qt3Header" >qmenubar.h</item>
+ <item Type="qt3Header" >qmenudata.h</item>
+ <item Type="qt3Header" >qmenudta.h</item>
+ <item Type="qt3Header" >qmessagebox.h</item>
+ <item Type="qt3Header" >qmetaobj.h</item>
+ <item Type="qt3Header" >qmetaobject.h</item>
+ <item Type="qt3Header" >qmime.h</item>
+ <item Type="qt3Header" >qmlined.h</item>
+ <item Type="qt3Header" >qmngio.h</item>
+ <item Type="qt3Header" >qmodules.h</item>
+ <item Type="qt3Header" >qmotif.h</item>
+ <item Type="qt3Header" >qmotifdialog.h</item>
+ <item Type="qt3Header" >qmotifplusstyle.h</item>
+ <item Type="qt3Header" >qmotifstyle.h</item>
+ <item Type="qt3Header" >qmotifwidget.h</item>
+ <item Type="qt3Header" >qmouse_qws.h</item>
+ <item Type="qt3Header" >qmousebus_qws.h</item>
+ <item Type="qt3Header" >qmousedriverfactory_qws.h</item>
+ <item Type="qt3Header" >qmousedriverplugin_qws.h</item>
+ <item Type="qt3Header" >qmouselinuxtp_qws.h</item>
+ <item Type="qt3Header" >qmousepc_qws.h</item>
+ <item Type="qt3Header" >qmousevr41xx_qws.h</item>
+ <item Type="qt3Header" >qmouseyopy_qws.h</item>
+ <item Type="qt3Header" >qmovie.h</item>
+ <item Type="qt3Header" >qmsgbox.h</item>
+ <item Type="qt3Header" >qmultilinedit.h</item>
+ <item Type="qt3Header" >qmultilineedit.h</item>
+ <item Type="qt3Header" >qmutex.h</item>
+ <item Type="qt3Header" >qnamespace.h</item>
+ <item Type="qt3Header" >qnetwork.h</item>
+ <item Type="qt3Header" >qnetworkprotocol.h</item>
+ <item Type="qt3Header" >qnp.h</item>
+ <item Type="qt3Header" >qobjcoll.h</item>
+ <item Type="qt3Header" >qobjdefs.h</item>
+ <item Type="qt3Header" >qobject.h</item>
+ <item Type="qt3Header" >qobjectcleanuphandler.h</item>
+ <item Type="qt3Header" >qobjectdefs.h</item>
+ <item Type="qt3Header" >qobjectdict.h</item>
+ <item Type="qt3Header" >qobjectlist.h</item>
+ <item Type="qt3Header" >qpaintd.h</item>
+ <item Type="qt3Header" >qpaintdc.h</item>
+ <item Type="qt3Header" >qpaintdevice.h</item>
+ <item Type="qt3Header" >qpaintdevicedefs.h</item>
+ <item Type="qt3Header" >qpaintdevicemetrics.h</item>
+ <item Type="qt3Header" >qpainter.h</item>
+ <item Type="qt3Header" >qpair.h</item>
+ <item Type="qt3Header" >qpalette.h</item>
+ <item Type="qt3Header" >qpdevmet.h</item>
+ <item Type="qt3Header" >qpen.h</item>
+ <item Type="qt3Header" >qpicture.h</item>
+ <item Type="qt3Header" >qpixmap.h</item>
+ <item Type="qt3Header" >qpixmapcache.h</item>
+ <item Type="qt3Header" >qplatinumstyle.h</item>
+ <item Type="qt3Header" >qpmcache.h</item>
+ <item Type="qt3Header" >qpngio.h</item>
+ <item Type="qt3Header" >qpntarry.h</item>
+ <item Type="qt3Header" >qpocketpcstyle_wce.h</item>
+ <item Type="qt3Header" >qpoint.h</item>
+ <item Type="qt3Header" >qpointarray.h</item>
+ <item Type="qt3Header" >qpolygonscanner.h</item>
+ <item Type="qt3Header" >qpopmenu.h</item>
+ <item Type="qt3Header" >qpopupmenu.h</item>
+ <item Type="qt3Header" >qprintdialog.h</item>
+ <item Type="qt3Header" >qprinter.h</item>
+ <item Type="qt3Header" >qprndlg.h</item>
+ <item Type="qt3Header" >qprocess.h</item>
+ <item Type="qt3Header" >qprogbar.h</item>
+ <item Type="qt3Header" >qprogdlg.h</item>
+ <item Type="qt3Header" >qprogressbar.h</item>
+ <item Type="qt3Header" >qprogressdialog.h</item>
+ <item Type="qt3Header" >qpsprn.h</item>
+ <item Type="qt3Header" >qptrcollection.h</item>
+ <item Type="qt3Header" >qptrdict.h</item>
+ <item Type="qt3Header" >qptrlist.h</item>
+ <item Type="qt3Header" >qptrqueue.h</item>
+ <item Type="qt3Header" >qptrstack.h</item>
+ <item Type="qt3Header" >qptrvector.h</item>
+ <item Type="qt3Header" >qpushbt.h</item>
+ <item Type="qt3Header" >qpushbutton.h</item>
+ <item Type="qt3Header" >qqueue.h</item>
+ <item Type="qt3Header" >qradiobt.h</item>
+ <item Type="qt3Header" >qradiobutton.h</item>
+ <item Type="qt3Header" >qrangecontrol.h</item>
+ <item Type="qt3Header" >qrangect.h</item>
+ <item Type="qt3Header" >qrect.h</item>
+ <item Type="qt3Header" >qregexp.h</item>
+ <item Type="qt3Header" >qregion.h</item>
+ <item Type="qt3Header" >qrtlcodec.h</item>
+ <item Type="qt3Header" >qscrbar.h</item>
+ <item Type="qt3Header" >qscrollbar.h</item>
+ <item Type="qt3Header" >qscrollview.h</item>
+ <item Type="qt3Header" >qsemaphore.h</item>
+ <item Type="qt3Header" >qsemimodal.h</item>
+ <item Type="qt3Header" >qserversocket.h</item>
+ <item Type="qt3Header" >qsession.h</item>
+ <item Type="qt3Header" >qsessionmanager.h</item>
+ <item Type="qt3Header" >qsettings.h</item>
+ <item Type="qt3Header" >qsgistyle.h</item>
+ <item Type="qt3Header" >qshared.h</item>
+ <item Type="qt3Header" >qsignal.h</item>
+ <item Type="qt3Header" >qsignalmapper.h</item>
+ <item Type="qt3Header" >qsignalslotimp.h</item>
+ <item Type="qt3Header" >qsimplerichtext.h</item>
+ <item Type="qt3Header" >qsize.h</item>
+ <item Type="qt3Header" >qsizegrip.h</item>
+ <item Type="qt3Header" >qsizepolicy.h</item>
+ <item Type="qt3Header" >qsjiscodec.h</item>
+ <item Type="qt3Header" >qslider.h</item>
+ <item Type="qt3Header" >qsocket.h</item>
+ <item Type="qt3Header" >qsocketdevice.h</item>
+ <item Type="qt3Header" >qsocketnotifier.h</item>
+ <item Type="qt3Header" >qsocknot.h</item>
+ <item Type="qt3Header" >qsortedlist.h</item>
+ <item Type="qt3Header" >qsound.h</item>
+ <item Type="qt3Header" >qsoundqss_qws.h</item>
+ <item Type="qt3Header" >qspinbox.h</item>
+ <item Type="qt3Header" >qsplashscreen.h</item>
+ <item Type="qt3Header" >qsplitter.h</item>
+ <item Type="qt3Header" >qsql.h</item>
+ <item Type="qt3Header" >qsqlcursor.h</item>
+ <item Type="qt3Header" >qsqldatabase.h</item>
+ <item Type="qt3Header" >qsqldriver.h</item>
+ <item Type="qt3Header" >qsqldriverplugin.h</item>
+ <item Type="qt3Header" >qsqleditorfactory.h</item>
+ <item Type="qt3Header" >qsqlerror.h</item>
+ <item Type="qt3Header" >qsqlfield.h</item>
+ <item Type="qt3Header" >qsqlform.h</item>
+ <item Type="qt3Header" >qsqlindex.h</item>
+ <item Type="qt3Header" >qsqlpropertymap.h</item>
+ <item Type="qt3Header" >qsqlquery.h</item>
+ <item Type="qt3Header" >qsqlrecord.h</item>
+ <item Type="qt3Header" >qsqlresult.h</item>
+ <item Type="qt3Header" >qsqlselectcursor.h</item>
+ <item Type="qt3Header" >qstack.h</item>
+ <item Type="qt3Header" >qstatusbar.h</item>
+ <item Type="qt3Header" >qstring.h</item>
+ <item Type="qt3Header" >qstringlist.h</item>
+ <item Type="qt3Header" >qstrlist.h</item>
+ <item Type="qt3Header" >qstrvec.h</item>
+ <item Type="qt3Header" >qstyle.h</item>
+ <item Type="qt3Header" >qstylefactory.h</item>
+ <item Type="qt3Header" >qstyleplugin.h</item>
+ <item Type="qt3Header" >qstylesheet.h</item>
+ <item Type="qt3Header" >qsyntaxhighlighter.h</item>
+ <item Type="qt3Header" >qt.h</item>
+ <item Type="qt3Header" >qt_mac.h</item>
+ <item Type="qt3Header" >qt_mac9.h</item>
+ <item Type="qt3Header" >qt_windows.h</item>
+ <item Type="qt3Header" >qtabbar.h</item>
+ <item Type="qt3Header" >qtabdialog.h</item>
+ <item Type="qt3Header" >qtabdlg.h</item>
+ <item Type="qt3Header" >qtable.h</item>
+ <item Type="qt3Header" >qtabwidget.h</item>
+ <item Type="qt3Header" >qtextbrowser.h</item>
+ <item Type="qt3Header" >qtextcodec.h</item>
+ <item Type="qt3Header" >qtextcodecfactory.h</item>
+ <item Type="qt3Header" >qtextcodecplugin.h</item>
+ <item Type="qt3Header" >qtextedit.h</item>
+ <item Type="qt3Header" >qtextstream.h</item>
+ <item Type="qt3Header" >qtextview.h</item>
+ <item Type="qt3Header" >qthread.h</item>
+ <item Type="qt3Header" >qthreadstorage.h</item>
+ <item Type="qt3Header" >qtimer.h</item>
+ <item Type="qt3Header" >qtl.h</item>
+ <item Type="qt3Header" >qtoolbar.h</item>
+ <item Type="qt3Header" >qtoolbox.h</item>
+ <item Type="qt3Header" >qtoolbutton.h</item>
+ <item Type="qt3Header" >qtooltip.h</item>
+ <item Type="qt3Header" >qtranslator.h</item>
+ <item Type="qt3Header" >qtsciicodec.h</item>
+ <item Type="qt3Header" >qtstream.h</item>
+ <item Type="qt3Header" >qurl.h</item>
+ <item Type="qt3Header" >qurlinfo.h</item>
+ <item Type="qt3Header" >qurloperator.h</item>
+ <item Type="qt3Header" >qutfcodec.h</item>
+ <item Type="qt3Header" >quuid.h</item>
+ <item Type="qt3Header" >qvalidator.h</item>
+ <item Type="qt3Header" >qvaluelist.h</item>
+ <item Type="qt3Header" >qvaluestack.h</item>
+ <item Type="qt3Header" >qvaluevector.h</item>
+ <item Type="qt3Header" >qvariant.h</item>
+ <item Type="qt3Header" >qvbox.h</item>
+ <item Type="qt3Header" >qvbuttongroup.h</item>
+ <item Type="qt3Header" >qvector.h</item>
+ <item Type="qt3Header" >qvfbhdr.h</item>
+ <item Type="qt3Header" >qvgroupbox.h</item>
+ <item Type="qt3Header" >qwaitcondition.h</item>
+ <item Type="qt3Header" >qwhatsthis.h</item>
+ <item Type="qt3Header" >qwidcoll.h</item>
+ <item Type="qt3Header" >qwidget.h</item>
+ <item Type="qt3Header" >qwidgetfactory.h</item>
+ <item Type="qt3Header" >qwidgetintdict.h</item>
+ <item Type="qt3Header" >qwidgetlist.h</item>
+ <item Type="qt3Header" >qwidgetplugin.h</item>
+ <item Type="qt3Header" >qwidgetstack.h</item>
+ <item Type="qt3Header" >qwindefs.h</item>
+ <item Type="qt3Header" >qwindow.h</item>
+ <item Type="qt3Header" >qwindowdefs.h</item>
+ <item Type="qt3Header" >qwindowdefs_win.h</item>
+ <item Type="qt3Header" >qwindowsstyle.h</item>
+ <item Type="qt3Header" >qwindowsxpstyle.h</item>
+ <item Type="qt3Header" >qwindowsystem_qws.h</item>
+ <item Type="qt3Header" >qwinexport.h</item>
+ <item Type="qt3Header" >qwinfunctions_wce.h</item>
+ <item Type="qt3Header" >qwizard.h</item>
+ <item Type="qt3Header" >qwmatrix.h</item>
+ <item Type="qt3Header" >qworkspace.h</item>
+ <item Type="qt3Header" >qwsbeosdecoration_qws.h</item>
+ <item Type="qt3Header" >qwscommand_qws.h</item>
+ <item Type="qt3Header" >qwscursor_qws.h</item>
+ <item Type="qt3Header" >qwsdecoration_qws.h</item>
+ <item Type="qt3Header" >qwsdefaultdecoration_qws.h</item>
+ <item Type="qt3Header" >qwsdisplay_qws.h</item>
+ <item Type="qt3Header" >qwsevent_qws.h</item>
+ <item Type="qt3Header" >qwsgfx_qnx6.h</item>
+ <item Type="qt3Header" >qwshydrodecoration_qws.h</item>
+ <item Type="qt3Header" >qwskde2decoration_qws.h</item>
+ <item Type="qt3Header" >qwskdedecoration_qws.h</item>
+ <item Type="qt3Header" >qwskeyboard_qnx4.h</item>
+ <item Type="qt3Header" >qwsmanager_qws.h</item>
+ <item Type="qt3Header" >qwsmouse_qnx4.h</item>
+ <item Type="qt3Header" >qwsproperty_qws.h</item>
+ <item Type="qt3Header" >qwsregionmanager_qws.h</item>
+ <item Type="qt3Header" >qwssocket_qws.h</item>
+ <item Type="qt3Header" >qwsutils_qws.h</item>
+ <item Type="qt3Header" >qwswindowsdecoration_qws.h</item>
+ <item Type="qt3Header" >qxml.h</item>
+ <item Type="qt3Header" >qxt.h</item>
+ <item Type="qt3Header" >qxtwidget.h</item>
+ <item Type="qt4Header" >Q3Accel</item>
+ <item Type="qt4Header" >Q3Action</item>
+ <item Type="qt4Header" >Q3ActionGroup</item>
+ <item Type="qt4Header" >Q3AsciiBucket</item>
+ <item Type="qt4Header" >Q3AsciiCache</item>
+ <item Type="qt4Header" >Q3AsciiCacheIterator</item>
+ <item Type="qt4Header" >Q3AsciiDict</item>
+ <item Type="qt4Header" >Q3AsciiDictIterator</item>
+ <item Type="qt4Header" >Q3BaseBucket</item>
+ <item Type="qt4Header" >Q3BoxLayout</item>
+ <item Type="qt4Header" >Q3Button</item>
+ <item Type="qt4Header" >Q3ButtonGroup</item>
+ <item Type="qt4Header" >Q3CString</item>
+ <item Type="qt4Header" >Q3Cache</item>
+ <item Type="qt4Header" >Q3CacheIterator</item>
+ <item Type="qt4Header" >Q3Canvas</item>
+ <item Type="qt4Header" >Q3CanvasEllipse</item>
+ <item Type="qt4Header" >Q3CanvasItem</item>
+ <item Type="qt4Header" >Q3CanvasItemList</item>
+ <item Type="qt4Header" >Q3CanvasLine</item>
+ <item Type="qt4Header" >Q3CanvasPixmap</item>
+ <item Type="qt4Header" >Q3CanvasPixmapArray</item>
+ <item Type="qt4Header" >Q3CanvasPolygon</item>
+ <item Type="qt4Header" >Q3CanvasPolygonalItem</item>
+ <item Type="qt4Header" >Q3CanvasRectangle</item>
+ <item Type="qt4Header" >Q3CanvasSpline</item>
+ <item Type="qt4Header" >Q3CanvasSprite</item>
+ <item Type="qt4Header" >Q3CanvasText</item>
+ <item Type="qt4Header" >Q3CanvasView</item>
+ <item Type="qt4Header" >Q3CheckListItem</item>
+ <item Type="qt4Header" >Q3CheckTableItem</item>
+ <item Type="qt4Header" >Q3CleanupHandler</item>
+ <item Type="qt4Header" >Q3ColorDrag</item>
+ <item Type="qt4Header" >Q3ComboBox</item>
+ <item Type="qt4Header" >Q3ComboTableItem</item>
+ <item Type="qt4Header" >Q3DataBrowser</item>
+ <item Type="qt4Header" >Q3DataTable</item>
+ <item Type="qt4Header" >Q3DataView</item>
+ <item Type="qt4Header" >Q3DateEdit</item>
+ <item Type="qt4Header" >Q3DateTimeEdit</item>
+ <item Type="qt4Header" >Q3DateTimeEditBase</item>
+ <item Type="qt4Header" >Q3DeepCopy</item>
+ <item Type="qt4Header" >Q3Dict</item>
+ <item Type="qt4Header" >Q3DictIterator</item>
+ <item Type="qt4Header" >Q3Dns</item>
+ <item Type="qt4Header" >Q3DnsSocket</item>
+ <item Type="qt4Header" >Q3DockArea</item>
+ <item Type="qt4Header" >Q3DockAreaLayout</item>
+ <item Type="qt4Header" >Q3DockWindow</item>
+ <item Type="qt4Header" >Q3DragObject</item>
+ <item Type="qt4Header" >Q3DropSite</item>
+ <item Type="qt4Header" >Q3EditorFactory</item>
+ <item Type="qt4Header" >Q3FileDialog</item>
+ <item Type="qt4Header" >Q3FileIconProvider</item>
+ <item Type="qt4Header" >Q3FilePreview</item>
+ <item Type="qt4Header" >Q3Frame</item>
+ <item Type="qt4Header" >Q3Ftp</item>
+ <item Type="qt4Header" >Q3GArray</item>
+ <item Type="qt4Header" >Q3GCache</item>
+ <item Type="qt4Header" >Q3GCacheIterator</item>
+ <item Type="qt4Header" >Q3GDict</item>
+ <item Type="qt4Header" >Q3GDictIterator</item>
+ <item Type="qt4Header" >Q3GList</item>
+ <item Type="qt4Header" >Q3GListIterator</item>
+ <item Type="qt4Header" >Q3GListStdIterator</item>
+ <item Type="qt4Header" >Q3GVector</item>
+ <item Type="qt4Header" >Q3Grid</item>
+ <item Type="qt4Header" >Q3GridLayout</item>
+ <item Type="qt4Header" >Q3GridView</item>
+ <item Type="qt4Header" >Q3GroupBox</item>
+ <item Type="qt4Header" >Q3HBox</item>
+ <item Type="qt4Header" >Q3HBoxLayout</item>
+ <item Type="qt4Header" >Q3HButtonGroup</item>
+ <item Type="qt4Header" >Q3HGroupBox</item>
+ <item Type="qt4Header" >Q3Header</item>
+ <item Type="qt4Header" >Q3Http</item>
+ <item Type="qt4Header" >Q3HttpHeader</item>
+ <item Type="qt4Header" >Q3HttpRequestHeader</item>
+ <item Type="qt4Header" >Q3HttpResponseHeader</item>
+ <item Type="qt4Header" >Q3IconDrag</item>
+ <item Type="qt4Header" >Q3IconDragItem</item>
+ <item Type="qt4Header" >Q3IconView</item>
+ <item Type="qt4Header" >Q3IconViewItem</item>
+ <item Type="qt4Header" >Q3ImageDrag</item>
+ <item Type="qt4Header" >Q3IntBucket</item>
+ <item Type="qt4Header" >Q3IntCache</item>
+ <item Type="qt4Header" >Q3IntCacheIterator</item>
+ <item Type="qt4Header" >Q3IntDict</item>
+ <item Type="qt4Header" >Q3IntDictIterator</item>
+ <item Type="qt4Header" >Q3LNode</item>
+ <item Type="qt4Header" >Q3ListBox</item>
+ <item Type="qt4Header" >Q3ListBoxItem</item>
+ <item Type="qt4Header" >Q3ListBoxPixmap</item>
+ <item Type="qt4Header" >Q3ListBoxText</item>
+ <item Type="qt4Header" >Q3ListView</item>
+ <item Type="qt4Header" >Q3ListViewItem</item>
+ <item Type="qt4Header" >Q3ListViewItemIterator</item>
+ <item Type="qt4Header" >Q3LocalFs</item>
+ <item Type="qt4Header" >Q3MainWindow</item>
+ <item Type="qt4Header" >Q3MemArray</item>
+ <item Type="qt4Header" >Q3MimeSourceFactory</item>
+ <item Type="qt4Header" >Q3MultiLineEdit</item>
+ <item Type="qt4Header" >Q3NetworkOperation</item>
+ <item Type="qt4Header" >Q3NetworkProtocol</item>
+ <item Type="qt4Header" >Q3NetworkProtocolDict</item>
+ <item Type="qt4Header" >Q3NetworkProtocolFactory</item>
+ <item Type="qt4Header" >Q3NetworkProtocolFactoryBase</item>
+ <item Type="qt4Header" >Q3ObjectDictionary</item>
+ <item Type="qt4Header" >Q3PaintDeviceMetrics</item>
+ <item Type="qt4Header" >Q3Painter</item>
+ <item Type="qt4Header" >Q3Picture</item>
+ <item Type="qt4Header" >Q3PointArray</item>
+ <item Type="qt4Header" >Q3PolygonScanner</item>
+ <item Type="qt4Header" >Q3PopupMenu</item>
+ <item Type="qt4Header" >Q3Process</item>
+ <item Type="qt4Header" >Q3ProgressBar</item>
+ <item Type="qt4Header" >Q3ProgressDialog</item>
+ <item Type="qt4Header" >Q3PtrBucket</item>
+ <item Type="qt4Header" >Q3PtrCollection</item>
+ <item Type="qt4Header" >Q3PtrDict</item>
+ <item Type="qt4Header" >Q3PtrDictIterator</item>
+ <item Type="qt4Header" >Q3PtrList</item>
+ <item Type="qt4Header" >Q3PtrListIterator</item>
+ <item Type="qt4Header" >Q3PtrListStdIterator</item>
+ <item Type="qt4Header" >Q3PtrQueue</item>
+ <item Type="qt4Header" >Q3PtrStack</item>
+ <item Type="qt4Header" >Q3PtrVector</item>
+ <item Type="qt4Header" >Q3RangeControl</item>
+ <item Type="qt4Header" >Q3ScrollView</item>
+ <item Type="qt4Header" >Q3Semaphore</item>
+ <item Type="qt4Header" >Q3ServerSocket</item>
+ <item Type="qt4Header" >Q3Shared</item>
+ <item Type="qt4Header" >Q3Signal</item>
+ <item Type="qt4Header" >Q3SimpleRichText</item>
+ <item Type="qt4Header" >Q3SingleCleanupHandler</item>
+ <item Type="qt4Header" >Q3Socket</item>
+ <item Type="qt4Header" >Q3SocketDevice</item>
+ <item Type="qt4Header" >Q3SortedList</item>
+ <item Type="qt4Header" >Q3SpinWidget</item>
+ <item Type="qt4Header" >Q3SqlCursor</item>
+ <item Type="qt4Header" >Q3SqlEditorFactory</item>
+ <item Type="qt4Header" >Q3SqlFieldInfo</item>
+ <item Type="qt4Header" >Q3SqlFieldInfoList</item>
+ <item Type="qt4Header" >Q3SqlForm</item>
+ <item Type="qt4Header" >Q3SqlPropertyMap</item>
+ <item Type="qt4Header" >Q3SqlRecordInfo</item>
+ <item Type="qt4Header" >Q3SqlSelectCursor</item>
+ <item Type="qt4Header" >Q3StoredDrag</item>
+ <item Type="qt4Header" >Q3StrIList</item>
+ <item Type="qt4Header" >Q3StrIVec</item>
+ <item Type="qt4Header" >Q3StrList</item>
+ <item Type="qt4Header" >Q3StrListIterator</item>
+ <item Type="qt4Header" >Q3StrVec</item>
+ <item Type="qt4Header" >Q3StringBucket</item>
+ <item Type="qt4Header" >Q3StyleSheet</item>
+ <item Type="qt4Header" >Q3StyleSheetItem</item>
+ <item Type="qt4Header" >Q3SyntaxHighlighter</item>
+ <item Type="qt4Header" >Q3TSFUNC</item>
+ <item Type="qt4Header" >Q3TabDialog</item>
+ <item Type="qt4Header" >Q3Table</item>
+ <item Type="qt4Header" >Q3TableItem</item>
+ <item Type="qt4Header" >Q3TableSelection</item>
+ <item Type="qt4Header" >Q3TextBrowser</item>
+ <item Type="qt4Header" >Q3TextDrag</item>
+ <item Type="qt4Header" >Q3TextEdit</item>
+ <item Type="qt4Header" >Q3TextEditOptimPrivate</item>
+ <item Type="qt4Header" >Q3TextStream</item>
+ <item Type="qt4Header" >Q3TextView</item>
+ <item Type="qt4Header" >Q3TimeEdit</item>
+ <item Type="qt4Header" >Q3ToolBar</item>
+ <item Type="qt4Header" >Q3UriDrag</item>
+ <item Type="qt4Header" >Q3Url</item>
+ <item Type="qt4Header" >Q3UrlOperator</item>
+ <item Type="qt4Header" >Q3VBox</item>
+ <item Type="qt4Header" >Q3VBoxLayout</item>
+ <item Type="qt4Header" >Q3VButtonGroup</item>
+ <item Type="qt4Header" >Q3VGroupBox</item>
+ <item Type="qt4Header" >Q3ValueList</item>
+ <item Type="qt4Header" >Q3ValueListConstIterator</item>
+ <item Type="qt4Header" >Q3ValueListIterator</item>
+ <item Type="qt4Header" >Q3ValueStack</item>
+ <item Type="qt4Header" >Q3ValueVector</item>
+ <item Type="qt4Header" >Q3WhatsThis</item>
+ <item Type="qt4Header" >Q3WidgetStack</item>
+ <item Type="qt4Header" >Q3Wizard</item>
+ <item Type="qt4Header" >QAbstractButton</item>
+ <item Type="qt4Header" >QAbstractEventDispatcher</item>
+ <item Type="qt4Header" >QAbstractExtensionFactory</item>
+ <item Type="qt4Header" >QAbstractExtensionManager</item>
+ <item Type="qt4Header" >QAbstractFileEngine</item>
+ <item Type="qt4Header" >QAbstractFileEngineHandler</item>
+ <item Type="qt4Header" >QAbstractFormBuilder</item>
+ <item Type="qt4Header" >QAbstractGraphicsPathItem</item>
+ <item Type="qt4Header" >QAbstractGraphicsShapeItem</item>
+ <item Type="qt4Header" >QAbstractItemDelegate</item>
+ <item Type="qt4Header" >QAbstractItemModel</item>
+ <item Type="qt4Header" >QAbstractItemView</item>
+ <item Type="qt4Header" >QAbstractListModel</item>
+ <item Type="qt4Header" >QAbstractPageSetupDialog</item>
+ <item Type="qt4Header" >QAbstractPrintDialog</item>
+ <item Type="qt4Header" >QAbstractProxyModel</item>
+ <item Type="qt4Header" >QAbstractScrollArea</item>
+ <item Type="qt4Header" >QAbstractSlider</item>
+ <item Type="qt4Header" >QAbstractSocket</item>
+ <item Type="qt4Header" >QAbstractSpinBox</item>
+ <item Type="qt4Header" >QAbstractTableModel</item>
+ <item Type="qt4Header" >QAbstractTextDocumentLayout</item>
+ <item Type="qt4Header" >QAbstractUndoItem</item>
+ <item Type="qt4Header" >QAccessible</item>
+ <item Type="qt4Header" >QAccessibleApplication</item>
+ <item Type="qt4Header" >QAccessibleBridge</item>
+ <item Type="qt4Header" >QAccessibleBridgeFactoryInterface</item>
+ <item Type="qt4Header" >QAccessibleBridgePlugin</item>
+ <item Type="qt4Header" >QAccessibleEvent</item>
+ <item Type="qt4Header" >QAccessibleFactoryInterface</item>
+ <item Type="qt4Header" >QAccessibleInterface</item>
+ <item Type="qt4Header" >QAccessibleInterfaceEx</item>
+ <item Type="qt4Header" >QAccessibleObject</item>
+ <item Type="qt4Header" >QAccessibleObjectEx</item>
+ <item Type="qt4Header" >QAccessiblePlugin</item>
+ <item Type="qt4Header" >QAccessibleWidget</item>
+ <item Type="qt4Header" >QAccessibleWidgetEx</item>
+ <item Type="qt4Header" >QAction</item>
+ <item Type="qt4Header" >QActionEvent</item>
+ <item Type="qt4Header" >QActionGroup</item>
+ <item Type="qt4Header" >QApplication</item>
+ <item Type="qt4Header" >QArgument</item>
+ <item Type="qt4Header" >QAssistantClient</item>
+ <item Type="qt4Header" >QAtomic</item>
+ <item Type="qt4Header" >QAtomicPointer</item>
+ <item Type="qt4Header" >QAxAggregated</item>
+ <item Type="qt4Header" >QAxBase</item>
+ <item Type="qt4Header" >QAxBindable</item>
+ <item Type="qt4Header" >QAxClass</item>
+ <item Type="qt4Header" >QAxFactory</item>
+ <item Type="qt4Header" >QAxObject</item>
+ <item Type="qt4Header" >QAxScript</item>
+ <item Type="qt4Header" >QAxScriptEngine</item>
+ <item Type="qt4Header" >QAxScriptManager</item>
+ <item Type="qt4Header" >QAxSelect</item>
+ <item Type="qt4Header" >QAxWidget</item>
+ <item Type="qt4Header" >QBasicAtomic</item>
+ <item Type="qt4Header" >QBasicAtomicPointer</item>
+ <item Type="qt4Header" >QBasicTimer</item>
+ <item Type="qt4Header" >QBitArray</item>
+ <item Type="qt4Header" >QBitRef</item>
+ <item Type="qt4Header" >QBitmap</item>
+ <item Type="qt4Header" >QBool</item>
+ <item Type="qt4Header" >QBoxLayout</item>
+ <item Type="qt4Header" >QBrush</item>
+ <item Type="qt4Header" >QBrushData</item>
+ <item Type="qt4Header" >QBuffer</item>
+ <item Type="qt4Header" >QButtonGroup</item>
+ <item Type="qt4Header" >QByteArray</item>
+ <item Type="qt4Header" >QByteArrayMatcher</item>
+ <item Type="qt4Header" >QByteRef</item>
+ <item Type="qt4Header" >QCDEStyle</item>
+ <item Type="qt4Header" >QCOORD</item>
+ <item Type="qt4Header" >QCache</item>
+ <item Type="qt4Header" >QCalendarWidget</item>
+ <item Type="qt4Header" >QChar</item>
+ <item Type="qt4Header" >QCharRef</item>
+ <item Type="qt4Header" >QCheckBox</item>
+ <item Type="qt4Header" >QChildEvent</item>
+ <item Type="qt4Header" >QCleanLooksStyle</item>
+ <item Type="qt4Header" >QCleanlooksStyle</item>
+ <item Type="qt4Header" >QClipboard</item>
+ <item Type="qt4Header" >QClipboardEvent</item>
+ <item Type="qt4Header" >QCloseEvent</item>
+ <item Type="qt4Header" >QColor</item>
+ <item Type="qt4Header" >QColorDialog</item>
+ <item Type="qt4Header" >QColorGroup</item>
+ <item Type="qt4Header" >QColormap</item>
+ <item Type="qt4Header" >QComboBox</item>
+ <item Type="qt4Header" >QCommonStyle</item>
+ <item Type="qt4Header" >QCompleter</item>
+ <item Type="qt4Header" >QConicalGradient</item>
+ <item Type="qt4Header" >QConstString</item>
+ <item Type="qt4Header" >QContextMenuEvent</item>
+ <item Type="qt4Header" >QCopChannel</item>
+ <item Type="qt4Header" >QCoreApplication</item>
+ <item Type="qt4Header" >QCursor</item>
+ <item Type="qt4Header" >QCursorShape</item>
+ <item Type="qt4Header" >QCustomEvent</item>
+ <item Type="qt4Header" >QDB2Driver</item>
+ <item Type="qt4Header" >QDB2Result</item>
+ <item Type="qt4Header" >QDBusAbstractAdaptor</item>
+ <item Type="qt4Header" >QDBusAbstractInterface</item>
+ <item Type="qt4Header" >QDBusArgument</item>
+ <item Type="qt4Header" >QDBusConnection</item>
+ <item Type="qt4Header" >QDBusConnectionInterface</item>
+ <item Type="qt4Header" >QDBusError</item>
+ <item Type="qt4Header" >QDBusInterface</item>
+ <item Type="qt4Header" >QDBusInterfacePtr</item>
+ <item Type="qt4Header" >QDBusMessage</item>
+ <item Type="qt4Header" >QDBusMetaType</item>
+ <item Type="qt4Header" >QDBusObjectPath</item>
+ <item Type="qt4Header" >QDBusReply</item>
+ <item Type="qt4Header" >QDBusServer</item>
+ <item Type="qt4Header" >QDBusSignature</item>
+ <item Type="qt4Header" >QDBusVariant</item>
+ <item Type="qt4Header" >QDataStream</item>
+ <item Type="qt4Header" >QDataWidgetMapper</item>
+ <item Type="qt4Header" >QDate</item>
+ <item Type="qt4Header" >QDateEdit</item>
+ <item Type="qt4Header" >QDateTime</item>
+ <item Type="qt4Header" >QDateTimeEdit</item>
+ <item Type="qt4Header" >QDebug</item>
+ <item Type="qt4Header" >QDecoration</item>
+ <item Type="qt4Header" >QDecorationAction</item>
+ <item Type="qt4Header" >QDecorationDefault</item>
+ <item Type="qt4Header" >QDecorationFactory</item>
+ <item Type="qt4Header" >QDecorationFactoryInterface</item>
+ <item Type="qt4Header" >QDecorationPlugin</item>
+ <item Type="qt4Header" >QDecorationStyled</item>
+ <item Type="qt4Header" >QDecorationWindows</item>
+ <item Type="qt4Header" >QDesignerActionEditorInterface</item>
+ <item Type="qt4Header" >QDesignerBrushManagerInterface</item>
+ <item Type="qt4Header" >QDesignerComponents</item>
+ <item Type="qt4Header" >QDesignerContainerExtension</item>
+ <item Type="qt4Header" >QDesignerCustomWidgetCollectionInterface</item>
+ <item Type="qt4Header" >QDesignerCustomWidgetInterface</item>
+ <item Type="qt4Header" >QDesignerDnDItemInterface</item>
+ <item Type="qt4Header" >QDesignerExportWidget</item>
+ <item Type="qt4Header" >QDesignerExtraInfoExtension</item>
+ <item Type="qt4Header" >QDesignerFormEditorInterface</item>
+ <item Type="qt4Header" >QDesignerFormEditorPluginInterface</item>
+ <item Type="qt4Header" >QDesignerFormWindowCursorInterface</item>
+ <item Type="qt4Header" >QDesignerFormWindowInterface</item>
+ <item Type="qt4Header" >QDesignerFormWindowManagerInterface</item>
+ <item Type="qt4Header" >QDesignerFormWindowToolInterface</item>
+ <item Type="qt4Header" >QDesignerIconCacheInterface</item>
+ <item Type="qt4Header" >QDesignerLayoutDecorationExtension</item>
+ <item Type="qt4Header" >QDesignerMemberSheetExtension</item>
+ <item Type="qt4Header" >QDesignerMetaDataBaseInterface</item>
+ <item Type="qt4Header" >QDesignerMetaDataBaseItemInterface</item>
+ <item Type="qt4Header" >QDesignerObjectInspectorInterface</item>
+ <item Type="qt4Header" >QDesignerPropertyEditorInterface</item>
+ <item Type="qt4Header" >QDesignerPropertySheetExtension</item>
+ <item Type="qt4Header" >QDesignerTaskMenuExtension</item>
+ <item Type="qt4Header" >QDesignerWidgetBoxInterface</item>
+ <item Type="qt4Header" >QDesignerWidgetDataBaseInterface</item>
+ <item Type="qt4Header" >QDesignerWidgetDataBaseItemInterface</item>
+ <item Type="qt4Header" >QDesignerWidgetFactoryInterface</item>
+ <item Type="qt4Header" >QDesktopServices</item>
+ <item Type="qt4Header" >QDesktopWidget</item>
+ <item Type="qt4Header" >QDial</item>
+ <item Type="qt4Header" >QDialog</item>
+ <item Type="qt4Header" >QDialogButtonBox</item>
+ <item Type="qt4Header" >QDir</item>
+ <item Type="qt4Header" >QDirModel</item>
+ <item Type="qt4Header" >QDirectPainter</item>
+ <item Type="qt4Header" >QDockWidget</item>
+ <item Type="qt4Header" >QDomAttr</item>
+ <item Type="qt4Header" >QDomCDATASection</item>
+ <item Type="qt4Header" >QDomCharacterData</item>
+ <item Type="qt4Header" >QDomComment</item>
+ <item Type="qt4Header" >QDomDocument</item>
+ <item Type="qt4Header" >QDomDocumentFragment</item>
+ <item Type="qt4Header" >QDomDocumentType</item>
+ <item Type="qt4Header" >QDomElement</item>
+ <item Type="qt4Header" >QDomEntity</item>
+ <item Type="qt4Header" >QDomEntityReference</item>
+ <item Type="qt4Header" >QDomImplementation</item>
+ <item Type="qt4Header" >QDomNamedNodeMap</item>
+ <item Type="qt4Header" >QDomNode</item>
+ <item Type="qt4Header" >QDomNodeList</item>
+ <item Type="qt4Header" >QDomNotation</item>
+ <item Type="qt4Header" >QDomProcessingInstruction</item>
+ <item Type="qt4Header" >QDomText</item>
+ <item Type="qt4Header" >QDoubleSpinBox</item>
+ <item Type="qt4Header" >QDoubleValidator</item>
+ <item Type="qt4Header" >QDrag</item>
+ <item Type="qt4Header" >QDragEnterEvent</item>
+ <item Type="qt4Header" >QDragLeaveEvent</item>
+ <item Type="qt4Header" >QDragMoveEvent</item>
+ <item Type="qt4Header" >QDragResponseEvent</item>
+ <item Type="qt4Header" >QDropEvent</item>
+ <item Type="qt4Header" >QDynamicPropertyChangeEvent</item>
+ <item Type="qt4Header" >QErrorMessage</item>
+ <item Type="qt4Header" >QEvent</item>
+ <item Type="qt4Header" >QEventLoop</item>
+ <item Type="qt4Header" >QEventSizeOfChecker</item>
+ <item Type="qt4Header" >QExtensionFactory</item>
+ <item Type="qt4Header" >QExtensionManager</item>
+ <item Type="qt4Header" >QFSFileEngine</item>
+ <item Type="qt4Header" >QFactoryInterface</item>
+ <item Type="qt4Header" >QFile</item>
+ <item Type="qt4Header" >QFileDialog</item>
+ <item Type="qt4Header" >QFileIconProvider</item>
+ <item Type="qt4Header" >QFileInfo</item>
+ <item Type="qt4Header" >QFileInfoList</item>
+ <item Type="qt4Header" >QFileInfoListIterator</item>
+ <item Type="qt4Header" >QFileOpenEvent</item>
+ <item Type="qt4Header" >QFileSystemWatcher</item>
+ <item Type="qt4Header" >QFlag</item>
+ <item Type="qt4Header" >QFlags</item>
+ <item Type="qt4Header" >QFocusEvent</item>
+ <item Type="qt4Header" >QFocusFrame</item>
+ <item Type="qt4Header" >QFont</item>
+ <item Type="qt4Header" >QFontComboBox</item>
+ <item Type="qt4Header" >QFontDatabase</item>
+ <item Type="qt4Header" >QFontDialog</item>
+ <item Type="qt4Header" >QFontInfo</item>
+ <item Type="qt4Header" >QFontMetrics</item>
+ <item Type="qt4Header" >QFontMetricsF</item>
+ <item Type="qt4Header" >QForeachContainer</item>
+ <item Type="qt4Header" >QForeachContainerBase</item>
+ <item Type="qt4Header" >QFormBuilder</item>
+ <item Type="qt4Header" >QFrame</item>
+ <item Type="qt4Header" >QFtp</item>
+ <item Type="qt4Header" >QGLColormap</item>
+ <item Type="qt4Header" >QGLContext</item>
+ <item Type="qt4Header" >QGLFormat</item>
+ <item Type="qt4Header" >QGLFramebufferObject</item>
+ <item Type="qt4Header" >QGLPixelBuffer</item>
+ <item Type="qt4Header" >QGLWidget</item>
+ <item Type="qt4Header" >QGenericArgument</item>
+ <item Type="qt4Header" >QGenericReturnArgument</item>
+ <item Type="qt4Header" >QGlobalStatic</item>
+ <item Type="qt4Header" >QGradient</item>
+ <item Type="qt4Header" >QGradientStop</item>
+ <item Type="qt4Header" >QGradientStops</item>
+ <item Type="qt4Header" >QGraphicsEllipseItem</item>
+ <item Type="qt4Header" >QGraphicsItem</item>
+ <item Type="qt4Header" >QGraphicsItemAnimation</item>
+ <item Type="qt4Header" >QGraphicsItemGroup</item>
+ <item Type="qt4Header" >QGraphicsLineItem</item>
+ <item Type="qt4Header" >QGraphicsPathItem</item>
+ <item Type="qt4Header" >QGraphicsPixmapItem</item>
+ <item Type="qt4Header" >QGraphicsPolygonItem</item>
+ <item Type="qt4Header" >QGraphicsRectItem</item>
+ <item Type="qt4Header" >QGraphicsScene</item>
+ <item Type="qt4Header" >QGraphicsSceneContextMenuEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneDragDropEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneHelpEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneHoverEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneMouseEvent</item>
+ <item Type="qt4Header" >QGraphicsSceneWheelEvent</item>
+ <item Type="qt4Header" >QGraphicsSimpleTextItem</item>
+ <item Type="qt4Header" >QGraphicsSvgItem</item>
+ <item Type="qt4Header" >QGraphicsTextItem</item>
+ <item Type="qt4Header" >QGraphicsView</item>
+ <item Type="qt4Header" >QGridLayout</item>
+ <item Type="qt4Header" >QGroupBox</item>
+ <item Type="qt4Header" >QHBoxLayout</item>
+ <item Type="qt4Header" >QHash</item>
+ <item Type="qt4Header" >QHashData</item>
+ <item Type="qt4Header" >QHashDummyNode</item>
+ <item Type="qt4Header" >QHashDummyValue</item>
+ <item Type="qt4Header" >QHashIterator</item>
+ <item Type="qt4Header" >QHashNode</item>
+ <item Type="qt4Header" >QHeaderView</item>
+ <item Type="qt4Header" >QHelpEvent</item>
+ <item Type="qt4Header" >QHideEvent</item>
+ <item Type="qt4Header" >QHostAddress</item>
+ <item Type="qt4Header" >QHostInfo</item>
+ <item Type="qt4Header" >QHoverEvent</item>
+ <item Type="qt4Header" >QHttp</item>
+ <item Type="qt4Header" >QHttpHeader</item>
+ <item Type="qt4Header" >QHttpRequestHeader</item>
+ <item Type="qt4Header" >QHttpResponseHeader</item>
+ <item Type="qt4Header" >QIBaseDriver</item>
+ <item Type="qt4Header" >QIBaseResult</item>
+ <item Type="qt4Header" >QIODevice</item>
+ <item Type="qt4Header" >QIPv6Address</item>
+ <item Type="qt4Header" >QIcon</item>
+ <item Type="qt4Header" >QIconDragEvent</item>
+ <item Type="qt4Header" >QIconEngine</item>
+ <item Type="qt4Header" >QIconEngineFactoryInterface</item>
+ <item Type="qt4Header" >QIconEnginePlugin</item>
+ <item Type="qt4Header" >QIconSet</item>
+ <item Type="qt4Header" >QImage</item>
+ <item Type="qt4Header" >QImageIOHandler</item>
+ <item Type="qt4Header" >QImageIOHandlerFactoryInterface</item>
+ <item Type="qt4Header" >QImageIOPlugin</item>
+ <item Type="qt4Header" >QImageReader</item>
+ <item Type="qt4Header" >QImageTextKeyLang</item>
+ <item Type="qt4Header" >QImageWriter</item>
+ <item Type="qt4Header" >QInputContext</item>
+ <item Type="qt4Header" >QInputContextFactory</item>
+ <item Type="qt4Header" >QInputContextFactoryInterface</item>
+ <item Type="qt4Header" >QInputContextPlugin</item>
+ <item Type="qt4Header" >QInputDialog</item>
+ <item Type="qt4Header" >QInputEvent</item>
+ <item Type="qt4Header" >QInputMethodEvent</item>
+ <item Type="qt4Header" >QIntForSize</item>
+ <item Type="qt4Header" >QIntForType</item>
+ <item Type="qt4Header" >QIntValidator</item>
+ <item Type="qt4Header" >QInternal</item>
+ <item Type="qt4Header" >QItemDelegate</item>
+ <item Type="qt4Header" >QItemEditorCreator</item>
+ <item Type="qt4Header" >QItemEditorCreatorBase</item>
+ <item Type="qt4Header" >QItemEditorFactory</item>
+ <item Type="qt4Header" >QItemSelection</item>
+ <item Type="qt4Header" >QItemSelectionModel</item>
+ <item Type="qt4Header" >QItemSelectionRange</item>
+ <item Type="qt4Header" >QKbdDriverFactory</item>
+ <item Type="qt4Header" >QKbdDriverPlugin</item>
+ <item Type="qt4Header" >QKeyEvent</item>
+ <item Type="qt4Header" >QKeySequence</item>
+ <item Type="qt4Header" >QLCDNumber</item>
+ <item Type="qt4Header" >QLabel</item>
+ <item Type="qt4Header" >QLatin1Char</item>
+ <item Type="qt4Header" >QLatin1String</item>
+ <item Type="qt4Header" >QLayout</item>
+ <item Type="qt4Header" >QLayoutItem</item>
+ <item Type="qt4Header" >QLayoutIterator</item>
+ <item Type="qt4Header" >QLibrary</item>
+ <item Type="qt4Header" >QLibraryInfo</item>
+ <item Type="qt4Header" >QLine</item>
+ <item Type="qt4Header" >QLineEdit</item>
+ <item Type="qt4Header" >QLineF</item>
+ <item Type="qt4Header" >QLinearGradient</item>
+ <item Type="qt4Header" >QLinkedList</item>
+ <item Type="qt4Header" >QLinkedListData</item>
+ <item Type="qt4Header" >QLinkedListIterator</item>
+ <item Type="qt4Header" >QLinkedListNode</item>
+ <item Type="qt4Header" >QLinuxFbScreen</item>
+ <item Type="qt4Header" >QLinuxFb_Shared</item>
+ <item Type="qt4Header" >QList</item>
+ <item Type="qt4Header" >QListData</item>
+ <item Type="qt4Header" >QListIterator</item>
+ <item Type="qt4Header" >QListView</item>
+ <item Type="qt4Header" >QListWidget</item>
+ <item Type="qt4Header" >QListWidgetItem</item>
+ <item Type="qt4Header" >QLocale</item>
+ <item Type="qt4Header" >QMYSQLDriver</item>
+ <item Type="qt4Header" >QMYSQLResult</item>
+ <item Type="qt4Header" >QMacMime</item>
+ <item Type="qt4Header" >QMacPasteBoardMime</item>
+ <item Type="qt4Header" >QMacStyle</item>
+ <item Type="qt4Header" >QMainWindow</item>
+ <item Type="qt4Header" >QMap</item>
+ <item Type="qt4Header" >QMapData</item>
+ <item Type="qt4Header" >QMapIterator</item>
+ <item Type="qt4Header" >QMatrix</item>
+ <item Type="qt4Header" >QMenu</item>
+ <item Type="qt4Header" >QMenuBar</item>
+ <item Type="qt4Header" >QMenuItem</item>
+ <item Type="qt4Header" >QMenubarUpdatedEvent</item>
+ <item Type="qt4Header" >QMessageBox</item>
+ <item Type="qt4Header" >QMetaClassInfo</item>
+ <item Type="qt4Header" >QMetaEnum</item>
+ <item Type="qt4Header" >QMetaMethod</item>
+ <item Type="qt4Header" >QMetaObject</item>
+ <item Type="qt4Header" >QMetaProperty</item>
+ <item Type="qt4Header" >QMetaType</item>
+ <item Type="qt4Header" >QMetaTypeId</item>
+ <item Type="qt4Header" >QMetaTypeId2</item>
+ <item Type="qt4Header" >QMimeData</item>
+ <item Type="qt4Header" >QMimeSource</item>
+ <item Type="qt4Header" >QModelIndex</item>
+ <item Type="qt4Header" >QModelIndexList</item>
+ <item Type="qt4Header" >QMotifStyle</item>
+ <item Type="qt4Header" >QMouseDriverFactory</item>
+ <item Type="qt4Header" >QMouseDriverPlugin</item>
+ <item Type="qt4Header" >QMouseEvent</item>
+ <item Type="qt4Header" >QMoveEvent</item>
+ <item Type="qt4Header" >QMovie</item>
+ <item Type="qt4Header" >QMultiHash</item>
+ <item Type="qt4Header" >QMultiMap</item>
+ <item Type="qt4Header" >QMutableHashIterator</item>
+ <item Type="qt4Header" >QMutableLinkedListIterator</item>
+ <item Type="qt4Header" >QMutableListIterator</item>
+ <item Type="qt4Header" >QMutableMapIterator</item>
+ <item Type="qt4Header" >QMutableSetIterator</item>
+ <item Type="qt4Header" >QMutableStringListIterator</item>
+ <item Type="qt4Header" >QMutableVectorIterator</item>
+ <item Type="qt4Header" >QMutex</item>
+ <item Type="qt4Header" >QMutexLocker</item>
+ <item Type="qt4Header" >QNetworkAddressEntry</item>
+ <item Type="qt4Header" >QNetworkInterface</item>
+ <item Type="qt4Header" >QNetworkProxy</item>
+ <item Type="qt4Header" >QNoDebug</item>
+ <item Type="qt4Header" >QNoImplicitBoolCast</item>
+ <item Type="qt4Header" >QOCIDriver</item>
+ <item Type="qt4Header" >QOCIResult</item>
+ <item Type="qt4Header" >QODBCDriver</item>
+ <item Type="qt4Header" >QODBCResult</item>
+ <item Type="qt4Header" >QObject</item>
+ <item Type="qt4Header" >QObjectCleanupHandler</item>
+ <item Type="qt4Header" >QObjectData</item>
+ <item Type="qt4Header" >QObjectList</item>
+ <item Type="qt4Header" >QObjectUserData</item>
+ <item Type="qt4Header" >QPSQLDriver</item>
+ <item Type="qt4Header" >QPSQLResult</item>
+ <item Type="qt4Header" >QPageSetupDialog</item>
+ <item Type="qt4Header" >QPaintDevice</item>
+ <item Type="qt4Header" >QPaintEngine</item>
+ <item Type="qt4Header" >QPaintEngineState</item>
+ <item Type="qt4Header" >QPaintEvent</item>
+ <item Type="qt4Header" >QPainter</item>
+ <item Type="qt4Header" >QPainterPath</item>
+ <item Type="qt4Header" >QPainterPathPrivate</item>
+ <item Type="qt4Header" >QPainterPathStroker</item>
+ <item Type="qt4Header" >QPair</item>
+ <item Type="qt4Header" >QPalette</item>
+ <item Type="qt4Header" >QPen</item>
+ <item Type="qt4Header" >QPersistentModelIndex</item>
+ <item Type="qt4Header" >QPicture</item>
+ <item Type="qt4Header" >QPictureFormatInterface</item>
+ <item Type="qt4Header" >QPictureFormatPlugin</item>
+ <item Type="qt4Header" >QPictureIO</item>
+ <item Type="qt4Header" >QPixmap</item>
+ <item Type="qt4Header" >QPixmapCache</item>
+ <item Type="qt4Header" >QPlastiqueStyle</item>
+ <item Type="qt4Header" >QPluginLoader</item>
+ <item Type="qt4Header" >QPoint</item>
+ <item Type="qt4Header" >QPointF</item>
+ <item Type="qt4Header" >QPointer</item>
+ <item Type="qt4Header" >QPolygon</item>
+ <item Type="qt4Header" >QPolygonF</item>
+ <item Type="qt4Header" >QPoolEntry</item>
+ <item Type="qt4Header" >QPrintDialog</item>
+ <item Type="qt4Header" >QPrintEngine</item>
+ <item Type="qt4Header" >QPrinter</item>
+ <item Type="qt4Header" >QProcess</item>
+ <item Type="qt4Header" >QProgressBar</item>
+ <item Type="qt4Header" >QProgressDialog</item>
+ <item Type="qt4Header" >QProxyModel</item>
+ <item Type="qt4Header" >QPushButton</item>
+ <item Type="qt4Header" >QQueue</item>
+ <item Type="qt4Header" >QRadialGradient</item>
+ <item Type="qt4Header" >QRadioButton</item>
+ <item Type="qt4Header" >QReadLocker</item>
+ <item Type="qt4Header" >QReadWriteLock</item>
+ <item Type="qt4Header" >QRect</item>
+ <item Type="qt4Header" >QRectF</item>
+ <item Type="qt4Header" >QRegExp</item>
+ <item Type="qt4Header" >QRegExpValidator</item>
+ <item Type="qt4Header" >QRegion</item>
+ <item Type="qt4Header" >QResizeEvent</item>
+ <item Type="qt4Header" >QResource</item>
+ <item Type="qt4Header" >QReturnArgument</item>
+ <item Type="qt4Header" >QRgb</item>
+ <item Type="qt4Header" >QRubberBand</item>
+ <item Type="qt4Header" >QSQLite2Driver</item>
+ <item Type="qt4Header" >QSQLite2Result</item>
+ <item Type="qt4Header" >QSQLiteDriver</item>
+ <item Type="qt4Header" >QSQLiteResult</item>
+ <item Type="qt4Header" >QScreen</item>
+ <item Type="qt4Header" >QScreenCursor</item>
+ <item Type="qt4Header" >QScreenDriverFactory</item>
+ <item Type="qt4Header" >QScreenDriverFactoryInterface</item>
+ <item Type="qt4Header" >QScreenDriverPlugin</item>
+ <item Type="qt4Header" >QScrollArea</item>
+ <item Type="qt4Header" >QScrollBar</item>
+ <item Type="qt4Header" >QSemaphore</item>
+ <item Type="qt4Header" >QSessionManager</item>
+ <item Type="qt4Header" >QSet</item>
+ <item Type="qt4Header" >QSetIterator</item>
+ <item Type="qt4Header" >QSettings</item>
+ <item Type="qt4Header" >QSharedData</item>
+ <item Type="qt4Header" >QSharedDataPointer</item>
+ <item Type="qt4Header" >QShortcut</item>
+ <item Type="qt4Header" >QShortcutEvent</item>
+ <item Type="qt4Header" >QShowEvent</item>
+ <item Type="qt4Header" >QSignalMapper</item>
+ <item Type="qt4Header" >QSignalSpy</item>
+ <item Type="qt4Header" >QSize</item>
+ <item Type="qt4Header" >QSizeF</item>
+ <item Type="qt4Header" >QSizeGrip</item>
+ <item Type="qt4Header" >QSizePolicy</item>
+ <item Type="qt4Header" >QSlider</item>
+ <item Type="qt4Header" >QSocketNotifier</item>
+ <item Type="qt4Header" >QSortFilterProxyModel</item>
+ <item Type="qt4Header" >QSound</item>
+ <item Type="qt4Header" >QSpacerItem</item>
+ <item Type="qt4Header" >QSpinBox</item>
+ <item Type="qt4Header" >QSplashScreen</item>
+ <item Type="qt4Header" >QSplitter</item>
+ <item Type="qt4Header" >QSplitterHandle</item>
+ <item Type="qt4Header" >QSpontaneKeyEvent</item>
+ <item Type="qt4Header" >QSqlDatabase</item>
+ <item Type="qt4Header" >QSqlDriver</item>
+ <item Type="qt4Header" >QSqlDriverCreator</item>
+ <item Type="qt4Header" >QSqlDriverCreatorBase</item>
+ <item Type="qt4Header" >QSqlDriverFactoryInterface</item>
+ <item Type="qt4Header" >QSqlDriverPlugin</item>
+ <item Type="qt4Header" >QSqlError</item>
+ <item Type="qt4Header" >QSqlField</item>
+ <item Type="qt4Header" >QSqlIndex</item>
+ <item Type="qt4Header" >QSqlQuery</item>
+ <item Type="qt4Header" >QSqlQueryModel</item>
+ <item Type="qt4Header" >QSqlRecord</item>
+ <item Type="qt4Header" >QSqlRelation</item>
+ <item Type="qt4Header" >QSqlRelationalDelegate</item>
+ <item Type="qt4Header" >QSqlRelationalTableModel</item>
+ <item Type="qt4Header" >QSqlResult</item>
+ <item Type="qt4Header" >QSqlTableModel</item>
+ <item Type="qt4Header" >QStack</item>
+ <item Type="qt4Header" >QStackedLayout</item>
+ <item Type="qt4Header" >QStackedWidget</item>
+ <item Type="qt4Header" >QStandardItem</item>
+ <item Type="qt4Header" >QStandardItemEditorCreator</item>
+ <item Type="qt4Header" >QStandardItemModel</item>
+ <item Type="qt4Header" >QStatusBar</item>
+ <item Type="qt4Header" >QStatusTipEvent</item>
+ <item Type="qt4Header" >QStdWString</item>
+ <item Type="qt4Header" >QString</item>
+ <item Type="qt4Header" >QStringList</item>
+ <item Type="qt4Header" >QStringListIterator</item>
+ <item Type="qt4Header" >QStringListModel</item>
+ <item Type="qt4Header" >QStringMatcher</item>
+ <item Type="qt4Header" >QStyle</item>
+ <item Type="qt4Header" >QStyleFactory</item>
+ <item Type="qt4Header" >QStyleFactoryInterface</item>
+ <item Type="qt4Header" >QStyleHintReturn</item>
+ <item Type="qt4Header" >QStyleHintReturnMask</item>
+ <item Type="qt4Header" >QStyleOption</item>
+ <item Type="qt4Header" >QStyleOptionButton</item>
+ <item Type="qt4Header" >QStyleOptionComboBox</item>
+ <item Type="qt4Header" >QStyleOptionComplex</item>
+ <item Type="qt4Header" >QStyleOptionDockWidget</item>
+ <item Type="qt4Header" >QStyleOptionFocusRect</item>
+ <item Type="qt4Header" >QStyleOptionFrame</item>
+ <item Type="qt4Header" >QStyleOptionFrameV2</item>
+ <item Type="qt4Header" >QStyleOptionGraphicsItem</item>
+ <item Type="qt4Header" >QStyleOptionGroupBox</item>
+ <item Type="qt4Header" >QStyleOptionHeader</item>
+ <item Type="qt4Header" >QStyleOptionMenuItem</item>
+ <item Type="qt4Header" >QStyleOptionProgressBar</item>
+ <item Type="qt4Header" >QStyleOptionProgressBarV2</item>
+ <item Type="qt4Header" >QStyleOptionQ3DockWindow</item>
+ <item Type="qt4Header" >QStyleOptionQ3ListView</item>
+ <item Type="qt4Header" >QStyleOptionQ3ListViewItem</item>
+ <item Type="qt4Header" >QStyleOptionRubberBand</item>
+ <item Type="qt4Header" >QStyleOptionSizeGrip</item>
+ <item Type="qt4Header" >QStyleOptionSlider</item>
+ <item Type="qt4Header" >QStyleOptionSpinBox</item>
+ <item Type="qt4Header" >QStyleOptionTab</item>
+ <item Type="qt4Header" >QStyleOptionTabBarBase</item>
+ <item Type="qt4Header" >QStyleOptionTabV2</item>
+ <item Type="qt4Header" >QStyleOptionTabWidgetFrame</item>
+ <item Type="qt4Header" >QStyleOptionTitleBar</item>
+ <item Type="qt4Header" >QStyleOptionToolBar</item>
+ <item Type="qt4Header" >QStyleOptionToolBox</item>
+ <item Type="qt4Header" >QStyleOptionToolButton</item>
+ <item Type="qt4Header" >QStyleOptionViewItem</item>
+ <item Type="qt4Header" >QStyleOptionViewItemV2</item>
+ <item Type="qt4Header" >QStylePainter</item>
+ <item Type="qt4Header" >QStylePlugin</item>
+ <item Type="qt4Header" >QSvgRenderer</item>
+ <item Type="qt4Header" >QSvgWidget</item>
+ <item Type="qt4Header" >QSyntaxHighlighter</item>
+ <item Type="qt4Header" >QSysInfo</item>
+ <item Type="qt4Header" >QSystemLocale</item>
+ <item Type="qt4Header" >QSystemTrayIcon</item>
+ <item Type="qt4Header" >QTDSDriver</item>
+ <item Type="qt4Header" >QTDSResult</item>
+ <item Type="qt4Header" >QTS</item>
+ <item Type="qt4Header" >QTabBar</item>
+ <item Type="qt4Header" >QTabWidget</item>
+ <item Type="qt4Header" >QTableView</item>
+ <item Type="qt4Header" >QTableWidget</item>
+ <item Type="qt4Header" >QTableWidgetItem</item>
+ <item Type="qt4Header" >QTableWidgetSelectionRange</item>
+ <item Type="qt4Header" >QTabletEvent</item>
+ <item Type="qt4Header" >QTcpServer</item>
+ <item Type="qt4Header" >QTcpSocket</item>
+ <item Type="qt4Header" >QTemporaryFile</item>
+ <item Type="qt4Header" >QTest</item>
+ <item Type="qt4Header" >QTestAccessibility</item>
+ <item Type="qt4Header" >QTestAccessibilityEvent</item>
+ <item Type="qt4Header" >QTestData</item>
+ <item Type="qt4Header" >QTestDelayEvent</item>
+ <item Type="qt4Header" >QTestEvent</item>
+ <item Type="qt4Header" >QTestEventList</item>
+ <item Type="qt4Header" >QTestEventLoop</item>
+ <item Type="qt4Header" >QTestKeyClicksEvent</item>
+ <item Type="qt4Header" >QTestKeyEvent</item>
+ <item Type="qt4Header" >QTestMouseEvent</item>
+ <item Type="qt4Header" >QTextBlock</item>
+ <item Type="qt4Header" >QTextBlockFormat</item>
+ <item Type="qt4Header" >QTextBlockGroup</item>
+ <item Type="qt4Header" >QTextBlockUserData</item>
+ <item Type="qt4Header" >QTextBrowser</item>
+ <item Type="qt4Header" >QTextCharFormat</item>
+ <item Type="qt4Header" >QTextCodec</item>
+ <item Type="qt4Header" >QTextCodecFactoryInterface</item>
+ <item Type="qt4Header" >QTextCodecPlugin</item>
+ <item Type="qt4Header" >QTextCursor</item>
+ <item Type="qt4Header" >QTextDecoder</item>
+ <item Type="qt4Header" >QTextDocument</item>
+ <item Type="qt4Header" >QTextDocumentFragment</item>
+ <item Type="qt4Header" >QTextEdit</item>
+ <item Type="qt4Header" >QTextEncoder</item>
+ <item Type="qt4Header" >QTextFormat</item>
+ <item Type="qt4Header" >QTextFragment</item>
+ <item Type="qt4Header" >QTextFrame</item>
+ <item Type="qt4Header" >QTextFrameFormat</item>
+ <item Type="qt4Header" >QTextFrameLayoutData</item>
+ <item Type="qt4Header" >QTextIStream</item>
+ <item Type="qt4Header" >QTextImageFormat</item>
+ <item Type="qt4Header" >QTextInlineObject</item>
+ <item Type="qt4Header" >QTextItem</item>
+ <item Type="qt4Header" >QTextLayout</item>
+ <item Type="qt4Header" >QTextLength</item>
+ <item Type="qt4Header" >QTextLine</item>
+ <item Type="qt4Header" >QTextList</item>
+ <item Type="qt4Header" >QTextListFormat</item>
+ <item Type="qt4Header" >QTextOStream</item>
+ <item Type="qt4Header" >QTextObject</item>
+ <item Type="qt4Header" >QTextObjectInterface</item>
+ <item Type="qt4Header" >QTextOption</item>
+ <item Type="qt4Header" >QTextStream</item>
+ <item Type="qt4Header" >QTextStreamFunction</item>
+ <item Type="qt4Header" >QTextStreamManipulator</item>
+ <item Type="qt4Header" >QTextTable</item>
+ <item Type="qt4Header" >QTextTableCell</item>
+ <item Type="qt4Header" >QTextTableFormat</item>
+ <item Type="qt4Header" >QThread</item>
+ <item Type="qt4Header" >QThreadStorage</item>
+ <item Type="qt4Header" >QThreadStorageData</item>
+ <item Type="qt4Header" >QTime</item>
+ <item Type="qt4Header" >QTimeEdit</item>
+ <item Type="qt4Header" >QTimeLine</item>
+ <item Type="qt4Header" >QTimer</item>
+ <item Type="qt4Header" >QTimerEvent</item>
+ <item Type="qt4Header" >QToolBar</item>
+ <item Type="qt4Header" >QToolBarChangeEvent</item>
+ <item Type="qt4Header" >QToolBox</item>
+ <item Type="qt4Header" >QToolButton</item>
+ <item Type="qt4Header" >QToolTip</item>
+ <item Type="qt4Header" >QTransformedScreen</item>
+ <item Type="qt4Header" >QTranslator</item>
+ <item Type="qt4Header" >QTransportAuth</item>
+ <item Type="qt4Header" >QTreeView</item>
+ <item Type="qt4Header" >QTreeWidget</item>
+ <item Type="qt4Header" >QTreeWidgetItem</item>
+ <item Type="qt4Header" >QTreeWidgetItemIterator</item>
+ <item Type="qt4Header" >QTypeInfo</item>
+ <item Type="qt4Header" >QUdpSocket</item>
+ <item Type="qt4Header" >QUiLoader</item>
+ <item Type="qt4Header" >QUintForSize</item>
+ <item Type="qt4Header" >QUintForType</item>
+ <item Type="qt4Header" >QUndoCommand</item>
+ <item Type="qt4Header" >QUndoGroup</item>
+ <item Type="qt4Header" >QUndoStack</item>
+ <item Type="qt4Header" >QUndoView</item>
+ <item Type="qt4Header" >QUpdateLaterEvent</item>
+ <item Type="qt4Header" >QUrl</item>
+ <item Type="qt4Header" >QUrlInfo</item>
+ <item Type="qt4Header" >QUuid</item>
+ <item Type="qt4Header" >QVBoxLayout</item>
+ <item Type="qt4Header" >QVFbHeader</item>
+ <item Type="qt4Header" >QVFbKeyData</item>
+ <item Type="qt4Header" >QVFbKeyboardHandler</item>
+ <item Type="qt4Header" >QVFbMouseHandler</item>
+ <item Type="qt4Header" >QVFbScreen</item>
+ <item Type="qt4Header" >QVNCScreen</item>
+ <item Type="qt4Header" >QValidator</item>
+ <item Type="qt4Header" >QVarLengthArray</item>
+ <item Type="qt4Header" >QVariant</item>
+ <item Type="qt4Header" >QVariantComparisonHelper</item>
+ <item Type="qt4Header" >QVariantList</item>
+ <item Type="qt4Header" >QVariantMap</item>
+ <item Type="qt4Header" >QVector</item>
+ <item Type="qt4Header" >QVectorData</item>
+ <item Type="qt4Header" >QVectorIterator</item>
+ <item Type="qt4Header" >QVectorTypedData</item>
+ <item Type="qt4Header" >QWMatrix</item>
+ <item Type="qt4Header" >QWSBusMouseHandler</item>
+ <item Type="qt4Header" >QWSCalibratedMouseHandler</item>
+ <item Type="qt4Header" >QWSClient</item>
+ <item Type="qt4Header" >QWSCursor</item>
+ <item Type="qt4Header" >QWSCursorMap</item>
+ <item Type="qt4Header" >QWSDisplay</item>
+ <item Type="qt4Header" >QWSEmbedWidget</item>
+ <item Type="qt4Header" >QWSEvent</item>
+ <item Type="qt4Header" >QWSInputMethod</item>
+ <item Type="qt4Header" >QWSInternalWindowInfo</item>
+ <item Type="qt4Header" >QWSKeyboardHandler</item>
+ <item Type="qt4Header" >QWSKeyboardHandlerFactoryInterface</item>
+ <item Type="qt4Header" >QWSLinuxTPMouseHandler</item>
+ <item Type="qt4Header" >QWSManager</item>
+ <item Type="qt4Header" >QWSMouseHandler</item>
+ <item Type="qt4Header" >QWSMouseHandlerFactoryInterface</item>
+ <item Type="qt4Header" >QWSPC101KeyboardHandler</item>
+ <item Type="qt4Header" >QWSPcMouseHandler</item>
+ <item Type="qt4Header" >QWSPointerCalibrationData</item>
+ <item Type="qt4Header" >QWSPropertyManager</item>
+ <item Type="qt4Header" >QWSProtocolItem</item>
+ <item Type="qt4Header" >QWSSL5000KeyboardHandler</item>
+ <item Type="qt4Header" >QWSScreenSaver</item>
+ <item Type="qt4Header" >QWSServer</item>
+ <item Type="qt4Header" >QWSServerSocket</item>
+ <item Type="qt4Header" >QWSSocket</item>
+ <item Type="qt4Header" >QWSSoundClient</item>
+ <item Type="qt4Header" >QWSSoundServer</item>
+ <item Type="qt4Header" >QWSSoundServerSocket</item>
+ <item Type="qt4Header" >QWSTslibMouseHandler</item>
+ <item Type="qt4Header" >QWSTtyKeyboardHandler</item>
+ <item Type="qt4Header" >QWSUmKeyboardHandler</item>
+ <item Type="qt4Header" >QWSUsbKeyboardHandler</item>
+ <item Type="qt4Header" >QWSVr41xxKeyboardHandler</item>
+ <item Type="qt4Header" >QWSVr41xxMouseHandler</item>
+ <item Type="qt4Header" >QWSWindow</item>
+ <item Type="qt4Header" >QWSWindowInfo</item>
+ <item Type="qt4Header" >QWSYopyKeyboardHandler</item>
+ <item Type="qt4Header" >QWSYopyMouseHandler</item>
+ <item Type="qt4Header" >QWaitCondition</item>
+ <item Type="qt4Header" >QWhatsThis</item>
+ <item Type="qt4Header" >QWhatsThisClickedEvent</item>
+ <item Type="qt4Header" >QWheelEvent</item>
+ <item Type="qt4Header" >QWidget</item>
+ <item Type="qt4Header" >QWidgetAction</item>
+ <item Type="qt4Header" >QWidgetData</item>
+ <item Type="qt4Header" >QWidgetItem</item>
+ <item Type="qt4Header" >QWidgetList</item>
+ <item Type="qt4Header" >QWidgetMapper</item>
+ <item Type="qt4Header" >QWidgetSet</item>
+ <item Type="qt4Header" >QWindowStateChangeEvent</item>
+ <item Type="qt4Header" >QWindowsMime</item>
+ <item Type="qt4Header" >QWindowsStyle</item>
+ <item Type="qt4Header" >QWindowsXPStyle</item>
+ <item Type="qt4Header" >QWorkspace</item>
+ <item Type="qt4Header" >QWriteLocker</item>
+ <item Type="qt4Header" >QX11EmbedContainer</item>
+ <item Type="qt4Header" >QX11EmbedWidget</item>
+ <item Type="qt4Header" >QX11Info</item>
+ <item Type="qt4Header" >QXmlAttributes</item>
+ <item Type="qt4Header" >QXmlContentHandler</item>
+ <item Type="qt4Header" >QXmlDTDHandler</item>
+ <item Type="qt4Header" >QXmlDeclHandler</item>
+ <item Type="qt4Header" >QXmlDefaultHandler</item>
+ <item Type="qt4Header" >QXmlEntityResolver</item>
+ <item Type="qt4Header" >QXmlErrorHandler</item>
+ <item Type="qt4Header" >QXmlInputSource</item>
+ <item Type="qt4Header" >QXmlLexicalHandler</item>
+ <item Type="qt4Header" >QXmlLocator</item>
+ <item Type="qt4Header" >QXmlNamespaceSupport</item>
+ <item Type="qt4Header" >QXmlParseException</item>
+ <item Type="qt4Header" >QXmlReader</item>
+ <item Type="qt4Header" >QXmlSimpleReader</item>
+ <item Type="RenamedClass" >
+ <Qt4>QIcon</Qt4>
+ <Qt3>QIconSet</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>QMatrix</Qt4>
+ <Qt3>QWMatrix</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>QPointer</Qt4>
+ <Qt3>QGuardedPtr</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Accel</Qt4>
+ <Qt3>QAccel</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ActionGroup</Qt4>
+ <Qt3>QActionGroup</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3AsciiBucket</Qt4>
+ <Qt3>QAsciiBucket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3AsciiCache</Qt4>
+ <Qt3>QAsciiCache</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3AsciiCacheIterator</Qt4>
+ <Qt3>QAsciiCacheIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3AsciiDict</Qt4>
+ <Qt3>QAsciiDict</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3AsciiDictIterator</Qt4>
+ <Qt3>QAsciiDictIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3BaseBucket</Qt4>
+ <Qt3>QBaseBucket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3BoxLayout</Qt4>
+ <Qt3>QBoxLayout</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ButtonGroup</Qt4>
+ <Qt3>QButtonGroup</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CString</Qt4>
+ <Qt3>QCString</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Cache</Qt4>
+ <Qt3>QCache</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CacheIterator</Qt4>
+ <Qt3>QCacheIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Canvas</Qt4>
+ <Qt3>QCanvas</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasEllipse</Qt4>
+ <Qt3>QCanvasEllipse</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasItem</Qt4>
+ <Qt3>QCanvasItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasItemList</Qt4>
+ <Qt3>QCanvasItemList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasLine</Qt4>
+ <Qt3>QCanvasLine</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasPixmap</Qt4>
+ <Qt3>QCanvasPixmap</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasPixmapArray</Qt4>
+ <Qt3>QCanvasPixmapArray</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasPolygon</Qt4>
+ <Qt3>QCanvasPolygon</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasPolygonalItem</Qt4>
+ <Qt3>QCanvasPolygonalItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasRectangle</Qt4>
+ <Qt3>QCanvasRectangle</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasSpline</Qt4>
+ <Qt3>QCanvasSpline</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasSprite</Qt4>
+ <Qt3>QCanvasSprite</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasText</Qt4>
+ <Qt3>QCanvasText</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CanvasView</Qt4>
+ <Qt3>QCanvasView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CheckListItem</Qt4>
+ <Qt3>QCheckListItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CheckTableItem</Qt4>
+ <Qt3>QCheckTableItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3CleanupHandler</Qt4>
+ <Qt3>QCleanupHandler</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ColorDrag</Qt4>
+ <Qt3>QColorDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ComboTableItem</Qt4>
+ <Qt3>QComboTableItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DataBrowser</Qt4>
+ <Qt3>QDataBrowser</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DataTable</Qt4>
+ <Qt3>QDataTable</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DataView</Qt4>
+ <Qt3>QDataView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DateEdit</Qt4>
+ <Qt3>QDateEdit</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DateTimeEdit</Qt4>
+ <Qt3>QDateTimeEdit</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DateTimeEditBase</Qt4>
+ <Qt3>QDateTimeEditBase</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Dict</Qt4>
+ <Qt3>QDict</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DictIterator</Qt4>
+ <Qt3>QDictIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Dns</Qt4>
+ <Qt3>QDns</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DnsSocket</Qt4>
+ <Qt3>QDnsSocket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DockArea</Qt4>
+ <Qt3>QDockArea</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DockAreaLayout</Qt4>
+ <Qt3>QDockAreaLayout</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DockWindow</Qt4>
+ <Qt3>QDockWindow</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DragObject</Qt4>
+ <Qt3>QDragObject</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DropSite</Qt4>
+ <Qt3>QDropSite</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3EditorFactory</Qt4>
+ <Qt3>QEditorFactory</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3FileDialog</Qt4>
+ <Qt3>QFileDialog</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3FileIconProvider</Qt4>
+ <Qt3>QFileIconProvider</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3FilePreview</Qt4>
+ <Qt3>QFilePreview</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Frame</Qt4>
+ <Qt3>QFrame</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Ftp</Qt4>
+ <Qt3>QFtp</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GArray</Qt4>
+ <Qt3>QGArray</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GCache</Qt4>
+ <Qt3>QGCache</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GCacheIterator</Qt4>
+ <Qt3>QGCacheIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GDict</Qt4>
+ <Qt3>QGDict</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GDictIterator</Qt4>
+ <Qt3>QGDictIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GList</Qt4>
+ <Qt3>QGList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GListIterator</Qt4>
+ <Qt3>QGListIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GListStdIterator</Qt4>
+ <Qt3>QGListStdIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GVector</Qt4>
+ <Qt3>QGVector</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Grid</Qt4>
+ <Qt3>QGrid</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GridLayout</Qt4>
+ <Qt3>QGridLayout</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GridView</Qt4>
+ <Qt3>QGridView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3GroupBox</Qt4>
+ <Qt3>QGroupBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HBox</Qt4>
+ <Qt3>QHBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HBoxLayout</Qt4>
+ <Qt3>QHBoxLayout</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HButtonGroup</Qt4>
+ <Qt3>QHButtonGroup</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HGroupBox</Qt4>
+ <Qt3>QHGroupBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Header</Qt4>
+ <Qt3>QHeader</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Http</Qt4>
+ <Qt3>QHttp</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HttpHeader</Qt4>
+ <Qt3>QHttpHeader</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HttpRequestHeader</Qt4>
+ <Qt3>QHttpRequestHeader</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3HttpResponseHeader</Qt4>
+ <Qt3>QHttpResponseHeader</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IconDrag</Qt4>
+ <Qt3>QIconDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IconDragItem</Qt4>
+ <Qt3>QIconDragItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IconView</Qt4>
+ <Qt3>QIconView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IconViewItem</Qt4>
+ <Qt3>QIconViewItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ImageDrag</Qt4>
+ <Qt3>QImageDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IntBucket</Qt4>
+ <Qt3>QIntBucket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IntCache</Qt4>
+ <Qt3>QIntCache</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IntCacheIterator</Qt4>
+ <Qt3>QIntCacheIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IntDict</Qt4>
+ <Qt3>QIntDict</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3IntDictIterator</Qt4>
+ <Qt3>QIntDictIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3LNode</Qt4>
+ <Qt3>QLNode</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListBox</Qt4>
+ <Qt3>QListBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListBoxItem</Qt4>
+ <Qt3>QListBoxItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListBoxPixmap</Qt4>
+ <Qt3>QListBoxPixmap</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListBoxText</Qt4>
+ <Qt3>QListBoxText</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListView</Qt4>
+ <Qt3>QListView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListViewItem</Qt4>
+ <Qt3>QListViewItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ListViewItemIterator</Qt4>
+ <Qt3>QListViewItemIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3LocalFs</Qt4>
+ <Qt3>QLocalFs</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3MainWindow</Qt4>
+ <Qt3>QMainWindow</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3MemArray</Qt4>
+ <Qt3>QMemArray</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3MimeSourceFactory</Qt4>
+ <Qt3>QMimeSourceFactory</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3MultiLineEdit</Qt4>
+ <Qt3>QMultiLineEdit</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3NetworkOperation</Qt4>
+ <Qt3>QNetworkOperation</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3NetworkProtocol</Qt4>
+ <Qt3>QNetworkProtocol</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3NetworkProtocolFactory</Qt4>
+ <Qt3>QNetworkProtocolFactory</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3NetworkProtocolFactoryBase</Qt4>
+ <Qt3>QNetworkProtocolFactoryBase</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ObjectDictionary</Qt4>
+ <Qt3>QObjectDictionary</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PaintDeviceMetrics</Qt4>
+ <Qt3>QPaintDeviceMetrics</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Picture</Qt4>
+ <Qt3>QPicture</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PointArray</Qt4>
+ <Qt3>QPointArray</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PolygonScanner</Qt4>
+ <Qt3>QPolygonScanner</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PopupMenu</Qt4>
+ <Qt3>QPopupMenu</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Process</Qt4>
+ <Qt3>QProcess</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ProgressBar</Qt4>
+ <Qt3>QProgressBar</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ProgressDialog</Qt4>
+ <Qt3>QProgressDialog</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrBucket</Qt4>
+ <Qt3>QPtrBucket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrCollection</Qt4>
+ <Qt3>QPtrCollection</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrDict</Qt4>
+ <Qt3>QPtrDict</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrDictIterator</Qt4>
+ <Qt3>QPtrDictIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrList</Qt4>
+ <Qt3>QPtrList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrListIterator</Qt4>
+ <Qt3>QPtrListIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrListStdIterator</Qt4>
+ <Qt3>QPtrListStdIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrQueue</Qt4>
+ <Qt3>QPtrQueue</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrStack</Qt4>
+ <Qt3>QPtrStack</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrVector</Qt4>
+ <Qt3>QPtrVector</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3RangeControl</Qt4>
+ <Qt3>QRangeControl</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ScrollView</Qt4>
+ <Qt3>QScrollView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ServerSocket</Qt4>
+ <Qt3>QServerSocket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Shared</Qt4>
+ <Qt3>QShared</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Signal</Qt4>
+ <Qt3>QSignal</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SimpleRichText</Qt4>
+ <Qt3>QSimpleRichText</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SingleCleanupHandler</Qt4>
+ <Qt3>QSingleCleanupHandler</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Socket</Qt4>
+ <Qt3>QSocket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SocketDevice</Qt4>
+ <Qt3>QSocketDevice</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SortedList</Qt4>
+ <Qt3>QSortedList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SpinWidget</Qt4>
+ <Qt3>QSpinWidget</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlCursor</Qt4>
+ <Qt3>QSqlCursor</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlEditorFactory</Qt4>
+ <Qt3>QSqlEditorFactory</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlFieldInfo</Qt4>
+ <Qt3>QSqlFieldInfo</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlForm</Qt4>
+ <Qt3>QSqlForm</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlPropertyMap</Qt4>
+ <Qt3>QSqlPropertyMap</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlRecordInfo</Qt4>
+ <Qt3>QSqlRecordInfo</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SqlSelectCursor</Qt4>
+ <Qt3>QSqlSelectCursor</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StoredDrag</Qt4>
+ <Qt3>QStoredDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StrIList</Qt4>
+ <Qt3>QStrIList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StrIVec</Qt4>
+ <Qt3>QStrIVec</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StrList</Qt4>
+ <Qt3>QStrList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StrListIterator</Qt4>
+ <Qt3>QStrListIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StrVec</Qt4>
+ <Qt3>QStrVec</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StringBucket</Qt4>
+ <Qt3>QStringBucket</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StyleSheet</Qt4>
+ <Qt3>QStyleSheet</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3StyleSheetItem</Qt4>
+ <Qt3>QStyleSheetItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3SyntaxHighlighter</Qt4>
+ <Qt3>QSyntaxHighlighter</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TSManip</Qt4>
+ <Qt3>QTSManip</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TabDialog</Qt4>
+ <Qt3>QTabDialog</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Table</Qt4>
+ <Qt3>QTable</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TableItem</Qt4>
+ <Qt3>QTableItem</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TableSelection</Qt4>
+ <Qt3>QTableSelection</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextBrowser</Qt4>
+ <Qt3>QTextBrowser</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextDrag</Qt4>
+ <Qt3>QTextDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextEdit</Qt4>
+ <Qt3>QTextEdit</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextEditOptimPrivate</Qt4>
+ <Qt3>QTextEditOptimPrivate</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextStream</Qt4>
+ <Qt3>QTextStream</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TextView</Qt4>
+ <Qt3>QTextView</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3TimeEdit</Qt4>
+ <Qt3>QTimeEdit</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ToolBar</Qt4>
+ <Qt3>QToolBar</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3UriDrag</Qt4>
+ <Qt3>QUriDrag</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Url</Qt4>
+ <Qt3>QUrl</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3UrlOperator</Qt4>
+ <Qt3>QUrlOperator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3VBox</Qt4>
+ <Qt3>QVBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3VBoxLayout</Qt4>
+ <Qt3>QVBoxLayout</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3VButtonGroup</Qt4>
+ <Qt3>QVButtonGroup</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3VGroupBox</Qt4>
+ <Qt3>QVGroupBox</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ValueList</Qt4>
+ <Qt3>QValueList</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ValueListConstIterator</Qt4>
+ <Qt3>QValueListConstIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ValueListIterator</Qt4>
+ <Qt3>QValueListIterator</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ValueStack</Qt4>
+ <Qt3>QValueStack</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3ValueVector</Qt4>
+ <Qt3>QValueVector</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3WhatsThis</Qt4>
+ <Qt3>QWhatsThis</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3WidgetStack</Qt4>
+ <Qt3>QWidgetStack</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3Wizard</Qt4>
+ <Qt3>QWizard</Qt3>
+ </item>
+ <item Type="InheritsQt" >Qt</item>
+ <item Type="InheritsQt" >QKeySequence</item>
+ <item Type="InheritsQt" >QEvent</item>
+ <item Type="InheritsQt" >QTimerEvent</item>
+ <item Type="InheritsQt" >QMouseEvent</item>
+ <item Type="InheritsQt" >QWheelEvent</item>
+ <item Type="InheritsQt" >QTabletEvent</item>
+ <item Type="InheritsQt" >QKeyEvent</item>
+ <item Type="InheritsQt" >QFocusEvent</item>
+ <item Type="InheritsQt" >QPaintEvent</item>
+ <item Type="InheritsQt" >QMoveEvent</item>
+ <item Type="InheritsQt" >QResizeEvent</item>
+ <item Type="InheritsQt" >QCloseEvent</item>
+ <item Type="InheritsQt" >QIconDragEvent</item>
+ <item Type="InheritsQt" >QShowEvent</item>
+ <item Type="InheritsQt" >QHideEvent</item>
+ <item Type="InheritsQt" >QContextMenuEvent</item>
+ <item Type="InheritsQt" >QIMEvent</item>
+ <item Type="InheritsQt" >QIMComposeEvent</item>
+ <item Type="InheritsQt" >QDropEvent</item>
+ <item Type="InheritsQt" >QDragMoveEvent</item>
+ <item Type="InheritsQt" >QDragEnterEvent</item>
+ <item Type="InheritsQt" >QDragResponseEvent</item>
+ <item Type="InheritsQt" >QDragLeaveEvent</item>
+ <item Type="InheritsQt" >QChildEvent</item>
+ <item Type="InheritsQt" >QCustomEvent</item>
+ <item Type="InheritsQt" >QObject</item>
+ <item Type="InheritsQt" >QBrush</item>
+ <item Type="InheritsQt" >QWidget</item>
+ <item Type="InheritsQt" >QStyle</item>
+ <item Type="InheritsQt" >QFrame</item>
+ <item Type="InheritsQt" >QComboBox</item>
+ <item Type="InheritsQt" >QGroupBox</item>
+ <item Type="InheritsQt" >QDialog</item>
+ <item Type="InheritsQt" >QDataView</item>
+ <item Type="InheritsQt" >QDockWindow</item>
+ <item Type="InheritsQt" >QCommonStyle</item>
+ <item Type="InheritsQt" >QNetworkProtocol</item>
+ <item Type="InheritsQt" >QNetworkOperation</item>
+ <item Type="InheritsQt" >QPixmap</item>
+ <item Type="InheritsQt" >QGPlugin</item>
+ <item Type="InheritsQt" >QGrid</item>
+ <item Type="InheritsQt" >QSpinWidget</item>
+ <item Type="InheritsQt" >QButtonGroup</item>
+ <item Type="InheritsQt" >QDateTimeEditBase</item>
+ <item Type="InheritsQt" >QDateEdit</item>
+ <item Type="InheritsQt" >QTimeEdit</item>
+ <item Type="InheritsQt" >QDateTimeEdit</item>
+ <item Type="InheritsQt" >QHBox</item>
+ <item Type="InheritsQt" >QHButtonGroup</item>
+ <item Type="InheritsQt" >QHGroupBox</item>
+ <item Type="InheritsQt" >QSocketNotifier</item>
+ <item Type="InheritsQt" >QEventLoop</item>
+ <item Type="InheritsQt" >QHttp</item>
+ <item Type="InheritsQt" >QAction</item>
+ <item Type="InheritsQt" >QActionGroup</item>
+ <item Type="InheritsQt" >QImageFormatPlugin</item>
+ <item Type="InheritsQt" >QLineEdit</item>
+ <item Type="InheritsQt" >QMotifStyle</item>
+ <item Type="InheritsQt" >QAccel</item>
+ <item Type="InheritsQt" >QLabel</item>
+ <item Type="InheritsQt" >QLayout</item>
+ <item Type="InheritsQt" >QGridLayout</item>
+ <item Type="InheritsQt" >QBoxLayout</item>
+ <item Type="InheritsQt" >QHBoxLayout</item>
+ <item Type="InheritsQt" >QVBoxLayout</item>
+ <item Type="InheritsQt" >QLCDNumber</item>
+ <item Type="InheritsQt" >QInputDialog</item>
+ <item Type="InheritsQt" >QScrollBar</item>
+ <item Type="InheritsQt" >QScrollView</item>
+ <item Type="InheritsQt" >QWindowsStyle</item>
+ <item Type="InheritsQt" >QBitmap</item>
+ <item Type="InheritsQt" >QSignal</item>
+ <item Type="InheritsQt" >QMessageBox</item>
+ <item Type="InheritsQt" >QHeader</item>
+ <item Type="InheritsQt" >QMotifPlusStyle</item>
+ <item Type="InheritsQt" >QCDEStyle</item>
+ <item Type="InheritsQt" >QButton</item>
+ <item Type="InheritsQt" >QFtp</item>
+ <item Type="InheritsQt" >QGuardedPtrPrivate</item>
+ <item Type="InheritsQt" >QObjectCleanupHandler</item>
+ <item Type="InheritsQt" >QColorDialog</item>
+ <item Type="InheritsQt" >QCustomMenuItem</item>
+ <item Type="InheritsQt" >QListViewItem</item>
+ <item Type="InheritsQt" >QListView</item>
+ <item Type="InheritsQt" >QCheckListItem</item>
+ <item Type="InheritsQt" >QPen</item>
+ <item Type="InheritsQt" >QDragObject</item>
+ <item Type="InheritsQt" >QStoredDrag</item>
+ <item Type="InheritsQt" >QTextDrag</item>
+ <item Type="InheritsQt" >QImageDrag</item>
+ <item Type="InheritsQt" >QUriDrag</item>
+ <item Type="InheritsQt" >QColorDrag</item>
+ <item Type="InheritsQt" >QDragManager</item>
+ <item Type="InheritsQt" >QIconDrag</item>
+ <item Type="InheritsQt" >QIconViewItem</item>
+ <item Type="InheritsQt" >QIconView</item>
+ <item Type="InheritsQt" >QPlatinumStyle</item>
+ <item Type="InheritsQt" >QCursor</item>
+ <item Type="InheritsQt" >QErrorMessage</item>
+ <item Type="InheritsQt" >QPopupMenu</item>
+ <item Type="InheritsQt" >QPrintDialog</item>
+ <item Type="InheritsQt" >QProcess</item>
+ <item Type="InheritsQt" >QProgressBar</item>
+ <item Type="InheritsQt" >QSemiModal</item>
+ <item Type="InheritsQt" >QStyleSheetItem</item>
+ <item Type="InheritsQt" >QStyleSheet</item>
+ <item Type="InheritsQt" >QPushButton</item>
+ <item Type="InheritsQt" >QRadioButton</item>
+ <item Type="InheritsQt" >QDial</item>
+ <item Type="InheritsQt" >QDockAreaLayout</item>
+ <item Type="InheritsQt" >QDockArea</item>
+ <item Type="InheritsQt" >QClipboard</item>
+ <item Type="InheritsQt" >QListBox</item>
+ <item Type="InheritsQt" >QGridView</item>
+ <item Type="InheritsQt" >QProgressDialog</item>
+ <item Type="InheritsQt" >QSessionManager</item>
+ <item Type="InheritsQt" >QSGIStyle</item>
+ <item Type="InheritsQt" >QFontDialog</item>
+ <item Type="InheritsQt" >QTimer</item>
+ <item Type="InheritsQt" >QSignalMapper</item>
+ <item Type="InheritsQt" >QSizeGrip</item>
+ <item Type="InheritsQt" >QSlider</item>
+ <item Type="InheritsQt" >QSocket</item>
+ <item Type="InheritsQt" >QServerSocket</item>
+ <item Type="InheritsQt" >QDns</item>
+ <item Type="InheritsQt" >QDnsSocket</item>
+ <item Type="InheritsQt" >QSound</item>
+ <item Type="InheritsQt" >QAuServer</item>
+ <item Type="InheritsQt" >QSpinBox</item>
+ <item Type="InheritsQt" >QSplashScreen</item>
+ <item Type="InheritsQt" >QSplitter</item>
+ <item Type="InheritsQt" >QEditorFactory</item>
+ <item Type="InheritsQt" >QSqlResultShared</item>
+ <item Type="InheritsQt" >QSqlDriverPlugin</item>
+ <item Type="InheritsQt" >QSqlDriver</item>
+ <item Type="InheritsQt" >QSqlForm</item>
+ <item Type="InheritsQt" >QTableItem</item>
+ <item Type="InheritsQt" >QComboTableItem</item>
+ <item Type="InheritsQt" >QCheckTableItem</item>
+ <item Type="InheritsQt" >QTable</item>
+ <item Type="InheritsQt" >QSqlDatabase</item>
+ <item Type="InheritsQt" >QDataBrowser</item>
+ <item Type="InheritsQt" >QStatusBar</item>
+ <item Type="InheritsQt" >QMenuBar</item>
+ <item Type="InheritsQt" >QCanvasItem</item>
+ <item Type="InheritsQt" >QCanvas</item>
+ <item Type="InheritsQt" >QCanvasView</item>
+ <item Type="InheritsQt" >QCanvasPixmap</item>
+ <item Type="InheritsQt" >QCanvasSprite</item>
+ <item Type="InheritsQt" >QCanvasPolygonalItem</item>
+ <item Type="InheritsQt" >QCanvasRectangle</item>
+ <item Type="InheritsQt" >QCanvasPolygon</item>
+ <item Type="InheritsQt" >QCanvasSpline</item>
+ <item Type="InheritsQt" >QCanvasLine</item>
+ <item Type="InheritsQt" >QCanvasEllipse</item>
+ <item Type="InheritsQt" >QCanvasText</item>
+ <item Type="InheritsQt" >QTranslator</item>
+ <item Type="InheritsQt" >QStylePlugin</item>
+ <item Type="InheritsQt" >QTextEdit</item>
+ <item Type="InheritsQt" >QSyntaxHighlighter</item>
+ <item Type="InheritsQt" >QTab</item>
+ <item Type="InheritsQt" >QTabBar</item>
+ <item Type="InheritsQt" >QTabDialog</item>
+ <item Type="InheritsQt" >QSqlEditorFactory</item>
+ <item Type="InheritsQt" >QTabWidget</item>
+ <item Type="InheritsQt" >QTextBrowser</item>
+ <item Type="InheritsQt" >QTextCodecPlugin</item>
+ <item Type="InheritsQt" >QMultiLineEdit</item>
+ <item Type="InheritsQt" >QToolBar</item>
+ <item Type="InheritsQt" >QTextView</item>
+ <item Type="InheritsQt" >QDataPump</item>
+ <item Type="InheritsQt" >QMainWindow</item>
+ <item Type="InheritsQt" >QToolBox</item>
+ <item Type="InheritsQt" >QToolButton</item>
+ <item Type="InheritsQt" >QToolTipGroup</item>
+ <item Type="InheritsQt" >QToolTip</item>
+ <item Type="InheritsQt" >QDesktopWidget</item>
+ <item Type="InheritsQt" >QUrlOperator</item>
+ <item Type="InheritsQt" >QFileIconProvider</item>
+ <item Type="InheritsQt" >QFileDialog</item>
+ <item Type="InheritsQt" >QValidator</item>
+ <item Type="InheritsQt" >QIntValidator</item>
+ <item Type="InheritsQt" >QDoubleValidator</item>
+ <item Type="InheritsQt" >QRegExpValidator</item>
+ <item Type="InheritsQt" >QDataTable</item>
+ <item Type="InheritsQt" >QVBox</item>
+ <item Type="InheritsQt" >QVButtonGroup</item>
+ <item Type="InheritsQt" >QVGroupBox</item>
+ <item Type="InheritsQt" >QWhatsThis</item>
+ <item Type="InheritsQt" >QApplication</item>
+ <item Type="InheritsQt" >QWidgetPlugin</item>
+ <item Type="InheritsQt" >QWidgetStack</item>
+ <item Type="InheritsQt" >QCheckBox</item>
+ <item Type="InheritsQt" >QCompactStyle</item>
+ <item Type="InheritsQt" >QWizard</item>
+ <item Type="InheritsQt" >QPainter</item>
+ <item Type="InheritsQt" >QWorkspace</item>
+ <item Type="InheritsQt" >QLocalFs</item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::Append</Qt4>
+ <Qt3>IO_Append</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::ReadOnly</Qt4>
+ <Qt3>IO_ReadOnly</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::ReadWrite</Qt4>
+ <Qt3>IO_ReadWrite</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::Text</Qt4>
+ <Qt3>IO_Translate</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::Truncate</Qt4>
+ <Qt3>IO_Truncate</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::WriteOnly</Qt4>
+ <Qt3>IO_WriteOnly</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QIODevice::Unbuffered</Qt4>
+ <Qt3>IO_Raw</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QAccessible::Movable</Qt4>
+ <Qt3>QAccessible::Moveable</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QApplication::CustomColor</Qt4>
+ <Qt3>QApplication::CustomColors</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QApplication::NormalColor</Qt4>
+ <Qt3>QApplication::NormalColors</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QCheckBox::NoChange</Qt4>
+ <Qt3>QButton::NoChange</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QCheckBox::Off</Qt4>
+ <Qt3>QButton::Off</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QCheckBox::On</Qt4>
+ <Qt3>QButton::On</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::NoDecomposition</Qt4>
+ <Qt3>QChar::Single</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::ByteOrderMark</Qt4>
+ <Qt3>QChar::byteOrderMark</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::ByteOrderSwapped</Qt4>
+ <Qt3>QChar::byteOrderSwapped</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::Nbsp</Qt4>
+ <Qt3>QChar::nbsp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::Null</Qt4>
+ <Qt3>QChar::null</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QChar::ReplacementCharacter</Qt4>
+ <Qt3>QChar::replacement</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::InsertAfterCurrent</Qt4>
+ <Qt3>QComboBox::AfterCurrent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::InsertAtBottom</Qt4>
+ <Qt3>QComboBox::AtBottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::InsertAtCurrent</Qt4>
+ <Qt3>QComboBox::AtCurrent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::InsertAtTop</Qt4>
+ <Qt3>QComboBox::AtTop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::InsertBeforeCurrent</Qt4>
+ <Qt3>QComboBox::BeforeCurrent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QComboBox::NoInsert</Qt4>
+ <Qt3>QComboBox::NoInsertion</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QDir::NoFilter</Qt4>
+ <Qt3>QDir::DefaultFilter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QDir::NoSort</Qt4>
+ <Qt3>QDir::DefaultSort</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::Box</Qt4>
+ <Qt3>Q3Frame::GroupBoxPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>Q3Frame::LineEditPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>Q3Frame::PopupPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>Q3Frame::MenuBarPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>Q3Frame::ToolBarPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>Q3Frame::TabWidgetPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::Shortcut</Qt4>
+ <Qt3>QEvent::Accel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::ShortcutOverride</Qt4>
+ <Qt3>QEvent::AccelOverride</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::WindowTitleChange</Qt4>
+ <Qt3>QEvent::CaptionChange</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::ChildAdded</Qt4>
+ <Qt3>QEvent::ChildInserted</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::InputMethodCompose</Qt4>
+ <Qt3>QEvent::IMCompose</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::InputMethodEnd</Qt4>
+ <Qt3>QEvent::IMEnd</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::InputMethodStart</Qt4>
+ <Qt3>QEvent::IMStart</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::WindowIconChange</Qt4>
+ <Qt3>QEvent::IconChange</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::LayoutRequest</Qt4>
+ <Qt3>QEvent::LayoutHint</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QEvent::ParentChange</Qt4>
+ <Qt3>QEvent::Reparent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ExeGroup</Qt4>
+ <Qt3>QFileInfo::ExeGroup</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ExeOther</Qt4>
+ <Qt3>QFileInfo::ExeOther</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ExeOwner</Qt4>
+ <Qt3>QFileInfo::ExeOwner</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ExeUser</Qt4>
+ <Qt3>QFileInfo::ExeUser</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ReadGroup</Qt4>
+ <Qt3>QFileInfo::ReadGroup</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ReadOther</Qt4>
+ <Qt3>QFileInfo::ReadOther</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ReadOwner</Qt4>
+ <Qt3>QFileInfo::ReadOwner</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::ReadUser</Qt4>
+ <Qt3>QFileInfo::ReadUser</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::WriteGroup</Qt4>
+ <Qt3>QFileInfo::WriteGroup</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::WriteOther</Qt4>
+ <Qt3>QFileInfo::WriteOther</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::WriteOwner</Qt4>
+ <Qt3>QFileInfo::WriteOwner</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFile::WriteUser</Qt4>
+ <Qt3>QFileInfo::WriteUser</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::GroupBoxPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::LineEditPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::MenuBarPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::PopupPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::TabWidgetPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QFrame::StyledPanel</Qt4>
+ <Qt3>QFrame::ToolBarPanel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::IgnoreAspectRatio</Qt4>
+ <Qt3>QImage::ScaleFree</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeepAspectRatioByExpanding</Qt4>
+ <Qt3>QImage::ScaleMax</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeepAspectRatio</Qt4>
+ <Qt3>QImage::ScaleMin</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QKeySequence::ExactMatch</Qt4>
+ <Qt3>Qt::Identical</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QKeySequence::NoMatch</Qt4>
+ <Qt3>Qt::NoMatch</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QKeySequence::PartialMatch</Qt4>
+ <Qt3>Qt::PartialMatch</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QLayout::SetDefaultConstraint</Qt4>
+ <Qt3>QLayout::Auto</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QLayout::SetFixedSize</Qt4>
+ <Qt3>QLayout::Fixed</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QLayout::SetNoConstraint</Qt4>
+ <Qt3>QLayout::FreeResize</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QLayout::SetMinimumSize</Qt4>
+ <Qt3>QLayout::Minimum</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QMacStyle::SizeDefault</Qt4>
+ <Qt3>QMacStyle::SizeNone</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSettings::SystemScope</Qt4>
+ <Qt3>QSettings::Global</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSettings::UserScope</Qt4>
+ <Qt3>QSettings::User</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::IgnoreAspectRatio</Qt4>
+ <Qt3>QSize::ScaleFree</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeepAspectRatioByExpanding</Qt4>
+ <Qt3>QSize::ScaleMax</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeepAspectRatio</Qt4>
+ <Qt3>QSize::ScaleMin</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSizePolicy::Horizontally</Qt4>
+ <Qt3>QSizePolicy::Horizontal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSizePolicy::Vertically</Qt4>
+ <Qt3>QSizePolicy::Vertical</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::TicksAbove</Qt4>
+ <Qt3>QSlider::Above</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::TicksBelow</Qt4>
+ <Qt3>QSlider::Below</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::TicksBothSides</Qt4>
+ <Qt3>QSlider::Both</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::TicksLeft</Qt4>
+ <Qt3>QSlider::Left</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::NoTicks</Qt4>
+ <Qt3>QSlider::NoMarks</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSlider::TicksRight</Qt4>
+ <Qt3>QSlider::Right</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::Closing</Qt4>
+ <Qt3>QSocket::Closing</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::Connected</Qt4>
+ <Qt3>QSocket::Connected</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::Connecting</Qt4>
+ <Qt3>QSocket::Connecting</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::Connection</Qt4>
+ <Qt3>QSocket::Connection</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::ErrConnectionRefused</Qt4>
+ <Qt3>QSocket::ErrConnectionRefused</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::ErrHostNotFound</Qt4>
+ <Qt3>QSocket::ErrHostNotFound</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Q3Socket::ErrSocketRead</Qt4>
+ <Qt3>QSocket::ErrSocketRead</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QAbstractSocket::HostLookupState</Qt4>
+ <Qt3>QSocket::HostLookup</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QAbstractSocket::UnconnectedState</Qt4>
+ <Qt3>QSocket::Idle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSqlError::ConnectionError</Qt4>
+ <Qt3>QSqlError::Connection</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSqlError::NoError</Qt4>
+ <Qt3>QSqlError::None</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSqlError::StatementError</Qt4>
+ <Qt3>QSqlError::Statement</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSqlError::TransactionError</Qt4>
+ <Qt3>QSqlError::Transaction</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSqlError::UnknownError</Qt4>
+ <Qt3>QSqlError::Unknown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::CC_Q3ListView</Qt4>
+ <Qt3>QStyle::CC_ListView</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::SH_UnderlineShortcut</Qt4>
+ <Qt3>QStyle::SH_UnderlineAccelerator</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Active</Qt4>
+ <Qt3>QStyle::Style_Active</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_AutoRaise</Qt4>
+ <Qt3>QStyle::Style_AutoRaise</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Bottom</Qt4>
+ <Qt3>QStyle::Style_Bottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Children</Qt4>
+ <Qt3>QStyle::Style_Children</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_None</Qt4>
+ <Qt3>QStyle::Style_Default</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_DownArrow</Qt4>
+ <Qt3>QStyle::Style_Down</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Editing</Qt4>
+ <Qt3>QStyle::Style_Editing</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Enabled</Qt4>
+ <Qt3>QStyle::Style_Enabled</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_FocusAtBorder</Qt4>
+ <Qt3>QStyle::Style_FocusAtBorder</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_HasFocus</Qt4>
+ <Qt3>QStyle::Style_HasFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Horizontal</Qt4>
+ <Qt3>QStyle::Style_Horizontal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Item</Qt4>
+ <Qt3>QStyle::Style_Item</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_MouseOver</Qt4>
+ <Qt3>QStyle::Style_MouseOver</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_NoChange</Qt4>
+ <Qt3>QStyle::Style_NoChange</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_None</Qt4>
+ <Qt3>QStyle::Style_None</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Off</Qt4>
+ <Qt3>QStyle::Style_Off</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_On</Qt4>
+ <Qt3>QStyle::Style_On</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Open</Qt4>
+ <Qt3>QStyle::Style_Open</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Raised</Qt4>
+ <Qt3>QStyle::Style_Raised</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Rectangle</Qt4>
+ <Qt3>QStyle::Style_Rectangle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Selected</Qt4>
+ <Qt3>QStyle::Style_Selected</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Sibling</Qt4>
+ <Qt3>QStyle::Style_Sibling</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Sunken</Qt4>
+ <Qt3>QStyle::Style_Sunken</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Top</Qt4>
+ <Qt3>QStyle::Style_Top</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QStyle::State_Up</Qt4>
+ <Qt3>QStyle::Style_Up</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTabBar::RoundedNorth</Qt4>
+ <Qt3>QTabBar::RoundedAbove</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTabBar:: RoundedSouth</Qt4>
+ <Qt3>QTabBar::RoundedBelow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTabBar:: TriangularNorth</Qt4>
+ <Qt3>QTabBar::TriangularAbove</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTabBar:: TriangularSouth</Qt4>
+ <Qt3>QTabBar::TriangularBelow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTextEdit::MovePageDown</Qt4>
+ <Qt3>QTextEdit::MovePgDown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QTextEdit::MovePageUp</Qt4>
+ <Qt3>QTextEdit::MovePgUp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QToolButton::BesideIcon</Qt4>
+ <Qt3>QToolButton::Right</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QToolButton::BelowIcon</Qt4>
+ <Qt3>QToolButton::Under</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QValidator::Intermediate</Qt4>
+ <Qt3>QValidator::Valid</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QCoreVariant::Icon</Qt4>
+ <Qt3>QVariant::IconSet</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ClickFocus</Qt4>
+ <Qt3>QWidget::ClickFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoFocus</Qt4>
+ <Qt3>QWidget::NoFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::StrongFocus</Qt4>
+ <Qt3>QWidget::StrongFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TabFocus</Qt4>
+ <Qt3>QWidget::TabFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WheelFocus</Qt4>
+ <Qt3>QWidget::WheelFocus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignLeft</Qt4>
+ <Qt3>Qt::AlignAuto</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AltModifier</Qt4>
+ <Qt3>Qt::AltButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AscendingOrder</Qt4>
+ <Qt3>Qt::Ascending</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockBottom</Qt4>
+ <Qt3>Qt::Bottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BottomLeftCorner</Qt4>
+ <Qt3>Qt::BottomLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BottomRightCorner</Qt4>
+ <Qt3>Qt::BottomRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextWrapAnywhere</Qt4>
+ <Qt3>Qt::BreakAnywhere</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ControlModifier</Qt4>
+ <Qt3>Qt::ControlButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TexturePattern</Qt4>
+ <Qt3>Qt::CustomPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DescendingOrder</Qt4>
+ <Qt3>Qt::Descending</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextDontClip</Qt4>
+ <Qt3>Qt::DontClip</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextDontPrint</Qt4>
+ <Qt3>Qt::DontPrint</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextExpandTabs</Qt4>
+ <Qt3>Qt::ExpandTabs</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextIncludeTrailingSpaces</Qt4>
+ <Qt3>Qt::IncludeTrailingSpaces</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeyboardModifierMask</Qt4>
+ <Qt3>Qt::KeyButtonMask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Backspace</Qt4>
+ <Qt3>Qt::Key_BackSpace</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Backtab</Qt4>
+ <Qt3>Qt::Key_BackTab</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaPrevious</Qt4>
+ <Qt3>Qt::Key_MediaPrev</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_PageDown</Qt4>
+ <Qt3>Qt::Key_Next</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_PageUp</Qt4>
+ <Qt3>Qt::Key_Prior</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Aacute</Qt4>
+ <Qt3>Qt::Key_aacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Acircumflex</Qt4>
+ <Qt3>Qt::Key_acircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Adiaeresis</Qt4>
+ <Qt3>Qt::Key_adiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_AE</Qt4>
+ <Qt3>Qt::Key_ae</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Agrave</Qt4>
+ <Qt3>Qt::Key_agrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Aring</Qt4>
+ <Qt3>Qt::Key_aring</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Atilde</Qt4>
+ <Qt3>Qt::Key_atilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ccedilla</Qt4>
+ <Qt3>Qt::Key_ccedilla</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Eacute</Qt4>
+ <Qt3>Qt::Key_eacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ecircumflex</Qt4>
+ <Qt3>Qt::Key_ecircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ediaeresis</Qt4>
+ <Qt3>Qt::Key_ediaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Egrave</Qt4>
+ <Qt3>Qt::Key_egrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ETH</Qt4>
+ <Qt3>Qt::Key_eth</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Iacute</Qt4>
+ <Qt3>Qt::Key_iacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Icircumflex</Qt4>
+ <Qt3>Qt::Key_icircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Idiaeresis</Qt4>
+ <Qt3>Qt::Key_idiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Igrave</Qt4>
+ <Qt3>Qt::Key_igrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ntilde</Qt4>
+ <Qt3>Qt::Key_ntilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Oacute</Qt4>
+ <Qt3>Qt::Key_oacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ocircumflex</Qt4>
+ <Qt3>Qt::Key_ocircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Odiaeresis</Qt4>
+ <Qt3>Qt::Key_odiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ograve</Qt4>
+ <Qt3>Qt::Key_ograve</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ooblique</Qt4>
+ <Qt3>Qt::Key_oslash</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Otilde</Qt4>
+ <Qt3>Qt::Key_otilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_THORN</Qt4>
+ <Qt3>Qt::Key_thorn</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Uacute</Qt4>
+ <Qt3>Qt::Key_uacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ucircumflex</Qt4>
+ <Qt3>Qt::Key_ucircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Udiaeresis</Qt4>
+ <Qt3>Qt::Key_udiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ugrave</Qt4>
+ <Qt3>Qt::Key_ugrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Yacute</Qt4>
+ <Qt3>Qt::Key_yacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeypadModifier</Qt4>
+ <Qt3>Qt::Keypad</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockLeft</Qt4>
+ <Qt3>Qt::Left</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_0</Qt4>
+ <Qt3>Qt::MV_10_DOT_0</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_1</Qt4>
+ <Qt3>Qt::MV_10_DOT_1</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_2</Qt4>
+ <Qt3>Qt::MV_10_DOT_2</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_3</Qt4>
+ <Qt3>Qt::MV_10_DOT_3</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_4</Qt4>
+ <Qt3>Qt::MV_10_DOT_4</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_9</Qt4>
+ <Qt3>Qt::MV_9</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_0</Qt4>
+ <Qt3>Qt::MV_CHEETAH</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_2</Qt4>
+ <Qt3>Qt::MV_JAGUAR</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_3</Qt4>
+ <Qt3>Qt::MV_PANTHER</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_1</Qt4>
+ <Qt3>Qt::MV_PUMA</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_10_4</Qt4>
+ <Qt3>Qt::MV_TIGER</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::MV_Unknown</Qt4>
+ <Qt3>Qt::MV_Unknown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MetaModifier</Qt4>
+ <Qt3>Qt::MetaButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockMinimized</Qt4>
+ <Qt3>Qt::Minimized</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextHideMnemonic</Qt4>
+ <Qt3>Qt::NoAccel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextOverline</Qt4>
+ <Qt3>Qt::Overline</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockRight</Qt4>
+ <Qt3>Qt::Right</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ShiftModifier</Qt4>
+ <Qt3>Qt::ShiftButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextShowMnemonic</Qt4>
+ <Qt3>Qt::ShowPrefix</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextSingleLine</Qt4>
+ <Qt3>Qt::SingleLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextStrikeOut</Qt4>
+ <Qt3>Qt::StrikeOut</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockTop</Qt4>
+ <Qt3>Qt::Top</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TopLeftCorner</Qt4>
+ <Qt3>Qt::TopLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TopRightCorner</Qt4>
+ <Qt3>Qt::TopRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockTornOff</Qt4>
+ <Qt3>Qt::TornOff</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextUnderline</Qt4>
+ <Qt3>Qt::Underline</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockUnmanaged</Qt4>
+ <Qt3>Qt::Unmanaged</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStaticContents</Qt4>
+ <Qt3>Qt::WNorthWestGravity</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WNoAutoErase</Qt4>
+ <Qt3>Qt::WRepaintNoErase</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Dialog</Qt4>
+ <Qt3>Qt::WStyle_Dialog</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_NoBorder</Qt4>
+ <Qt3>Qt::WStyle_NoBorderEx</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>(Qt::WType_Dialog | Qt::WShowModal)</Qt4>
+ <Qt3>Qt::WType_Modal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_2000</Qt4>
+ <Qt3>Qt::WV_2000</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_2003</Qt4>
+ <Qt3>Qt::WV_2003</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_32s</Qt4>
+ <Qt3>Qt::WV_32s</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_95</Qt4>
+ <Qt3>Qt::WV_95</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_98</Qt4>
+ <Qt3>Qt::WV_98</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_CE</Qt4>
+ <Qt3>Qt::WV_CE</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_CENET</Qt4>
+ <Qt3>Qt::WV_CENET</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_CE_based</Qt4>
+ <Qt3>Qt::WV_CE_based</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_DOS_based</Qt4>
+ <Qt3>Qt::WV_DOS_based</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_Me</Qt4>
+ <Qt3>Qt::WV_Me</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_NT</Qt4>
+ <Qt3>Qt::WV_NT</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_NT_based</Qt4>
+ <Qt3>Qt::WV_NT_based</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>QSysInfo::WV_XP</Qt4>
+ <Qt3>Qt::WV_XP</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextWordWrap</Qt4>
+ <Qt3>Qt::WordBreak</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::IBeamCursor</Qt4>
+ <Qt3>Qt::IbeamCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoButton</Qt4>
+ <Qt3>Qt::NoButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LeftButton</Qt4>
+ <Qt3>Qt::LeftButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::RightButton</Qt4>
+ <Qt3>Qt::RightButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MidButton</Qt4>
+ <Qt3>Qt::MidButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MouseButtonMask</Qt4>
+ <Qt3>Qt::MouseButtonMask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ShiftButton</Qt4>
+ <Qt3>Qt::ShiftButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ControlButton</Qt4>
+ <Qt3>Qt::ControlButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AltButton</Qt4>
+ <Qt3>Qt::AltButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MetaButton</Qt4>
+ <Qt3>Qt::MetaButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::KeyButtonMask</Qt4>
+ <Qt3>Qt::KeyButtonMask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Keypad</Qt4>
+ <Qt3>Qt::Keypad</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Horizontal</Qt4>
+ <Qt3>Qt::Horizontal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Vertical</Qt4>
+ <Qt3>Qt::Vertical</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignAuto</Qt4>
+ <Qt3>Qt::AlignAuto</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignLeft</Qt4>
+ <Qt3>Qt::AlignLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignRight</Qt4>
+ <Qt3>Qt::AlignRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignHCenter</Qt4>
+ <Qt3>Qt::AlignHCenter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignJustify</Qt4>
+ <Qt3>Qt::AlignJustify</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignHorizontal_Mask</Qt4>
+ <Qt3>Qt::AlignHorizontal_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignTop</Qt4>
+ <Qt3>Qt::AlignTop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignBottom</Qt4>
+ <Qt3>Qt::AlignBottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignVCenter</Qt4>
+ <Qt3>Qt::AlignVCenter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignVertical_Mask</Qt4>
+ <Qt3>Qt::AlignVertical_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlignCenter</Qt4>
+ <Qt3>Qt::AlignCenter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SingleLine</Qt4>
+ <Qt3>Qt::SingleLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DontClip</Qt4>
+ <Qt3>Qt::DontClip</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ExpandTabs</Qt4>
+ <Qt3>Qt::ExpandTabs</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ShowPrefix</Qt4>
+ <Qt3>Qt::ShowPrefix</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WordBreak</Qt4>
+ <Qt3>Qt::WordBreak</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BreakAnywhere</Qt4>
+ <Qt3>Qt::BreakAnywhere</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DontPrint</Qt4>
+ <Qt3>Qt::DontPrint</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::IncludeTrailingSpaces</Qt4>
+ <Qt3>Qt::IncludeTrailingSpaces</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoAccel</Qt4>
+ <Qt3>Qt::NoAccel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_TopLevel</Qt4>
+ <Qt3>Qt::WType_TopLevel</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Dialog</Qt4>
+ <Qt3>Qt::WType_Dialog</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Popup</Qt4>
+ <Qt3>Qt::WType_Popup</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Desktop</Qt4>
+ <Qt3>Qt::WType_Desktop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Mask</Qt4>
+ <Qt3>Qt::WType_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Customize</Qt4>
+ <Qt3>Qt::WStyle_Customize</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_NormalBorder</Qt4>
+ <Qt3>Qt::WStyle_NormalBorder</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_DialogBorder</Qt4>
+ <Qt3>Qt::WStyle_DialogBorder</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_NoBorder</Qt4>
+ <Qt3>Qt::WStyle_NoBorder</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Title</Qt4>
+ <Qt3>Qt::WStyle_Title</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_SysMenu</Qt4>
+ <Qt3>Qt::WStyle_SysMenu</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Minimize</Qt4>
+ <Qt3>Qt::WStyle_Minimize</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Maximize</Qt4>
+ <Qt3>Qt::WStyle_Maximize</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_MinMax</Qt4>
+ <Qt3>Qt::WStyle_MinMax</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Tool</Qt4>
+ <Qt3>Qt::WStyle_Tool</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_StaysOnTop</Qt4>
+ <Qt3>Qt::WStyle_StaysOnTop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_ContextHelp</Qt4>
+ <Qt3>Qt::WStyle_ContextHelp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WDestructiveClose</Qt4>
+ <Qt3>Qt::WDestructiveClose</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WPaintDesktop</Qt4>
+ <Qt3>Qt::WPaintDesktop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WPaintClever</Qt4>
+ <Qt3>Qt::WPaintClever</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WResizeNoErase</Qt4>
+ <Qt3>Qt::WResizeNoErase</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WMouseNoMask</Qt4>
+ <Qt3>Qt::WMouseNoMask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStaticContents</Qt4>
+ <Qt3>Qt::WStaticContents</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WRepaintNoErase</Qt4>
+ <Qt3>Qt::WRepaintNoErase</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WX11BypassWM</Qt4>
+ <Qt3>Qt::WX11BypassWM</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WWinOwnDC</Qt4>
+ <Qt3>Qt::WWinOwnDC</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WMacNoSheet</Qt4>
+ <Qt3>Qt::WMacNoSheet</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WMacDrawer</Qt4>
+ <Qt3>Qt::WMacDrawer</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WGroupLeader</Qt4>
+ <Qt3>Qt::WGroupLeader</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WShowModal</Qt4>
+ <Qt3>Qt::WShowModal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WNoMousePropagation</Qt4>
+ <Qt3>Qt::WNoMousePropagation</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Splash</Qt4>
+ <Qt3>Qt::WStyle_Splash</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WNoAutoErase</Qt4>
+ <Qt3>Qt::WNoAutoErase</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WNorthWestGravity</Qt4>
+ <Qt3>Qt::WNorthWestGravity</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WType_Modal</Qt4>
+ <Qt3>Qt::WType_Modal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_Dialog</Qt4>
+ <Qt3>Qt::WStyle_Dialog</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WStyle_NoBorderEx</Qt4>
+ <Qt3>Qt::WStyle_NoBorderEx</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowNoState</Qt4>
+ <Qt3>Qt::WindowNoState</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowMinimized</Qt4>
+ <Qt3>Qt::WindowMinimized</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowMaximized</Qt4>
+ <Qt3>Qt::WindowMaximized</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowFullScreen</Qt4>
+ <Qt3>Qt::WindowFullScreen</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowActive</Qt4>
+ <Qt3>Qt::WindowActive</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ColorMode_Mask</Qt4>
+ <Qt3>Qt::ColorMode_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AutoColor</Qt4>
+ <Qt3>Qt::AutoColor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ColorOnly</Qt4>
+ <Qt3>Qt::ColorOnly</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MonoOnly</Qt4>
+ <Qt3>Qt::MonoOnly</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AlphaDither_Mask</Qt4>
+ <Qt3>Qt::AlphaDither_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ThresholdAlphaDither</Qt4>
+ <Qt3>Qt::ThresholdAlphaDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::OrderedAlphaDither</Qt4>
+ <Qt3>Qt::OrderedAlphaDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DiffuseAlphaDither</Qt4>
+ <Qt3>Qt::DiffuseAlphaDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoAlpha</Qt4>
+ <Qt3>Qt::NoAlpha</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dither_Mask</Qt4>
+ <Qt3>Qt::Dither_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DiffuseDither</Qt4>
+ <Qt3>Qt::DiffuseDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::OrderedDither</Qt4>
+ <Qt3>Qt::OrderedDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ThresholdDither</Qt4>
+ <Qt3>Qt::ThresholdDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DitherMode_Mask</Qt4>
+ <Qt3>Qt::DitherMode_Mask</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AutoDither</Qt4>
+ <Qt3>Qt::AutoDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PreferDither</Qt4>
+ <Qt3>Qt::PreferDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AvoidDither</Qt4>
+ <Qt3>Qt::AvoidDither</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TransparentMode</Qt4>
+ <Qt3>Qt::TransparentMode</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::OpaqueMode</Qt4>
+ <Qt3>Qt::OpaqueMode</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PixelUnit</Qt4>
+ <Qt3>Qt::PixelUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LoMetricUnit</Qt4>
+ <Qt3>Qt::LoMetricUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::HiMetricUnit</Qt4>
+ <Qt3>Qt::HiMetricUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LoEnglishUnit</Qt4>
+ <Qt3>Qt::LoEnglishUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::HiEnglishUnit</Qt4>
+ <Qt3>Qt::HiEnglishUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TwipsUnit</Qt4>
+ <Qt3>Qt::TwipsUnit</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MacStyle</Qt4>
+ <Qt3>Qt::MacStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WindowsStyle</Qt4>
+ <Qt3>Qt::WindowsStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Win3Style</Qt4>
+ <Qt3>Qt::Win3Style</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PMStyle</Qt4>
+ <Qt3>Qt::PMStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MotifStyle</Qt4>
+ <Qt3>Qt::MotifStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::META</Qt4>
+ <Qt3>Qt::META</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SHIFT</Qt4>
+ <Qt3>Qt::SHIFT</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::CTRL</Qt4>
+ <Qt3>Qt::CTRL</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ALT</Qt4>
+ <Qt3>Qt::ALT</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MODIFIER_MASK</Qt4>
+ <Qt3>Qt::MODIFIER_MASK</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UNICODE_ACCEL</Qt4>
+ <Qt3>Qt::UNICODE_ACCEL</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Escape</Qt4>
+ <Qt3>Qt::Key_Escape</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Tab</Qt4>
+ <Qt3>Qt::Key_Tab</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Backtab</Qt4>
+ <Qt3>Qt::Key_Backtab</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BackTab</Qt4>
+ <Qt3>Qt::Key_BackTab</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Backspace</Qt4>
+ <Qt3>Qt::Key_Backspace</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BackSpace</Qt4>
+ <Qt3>Qt::Key_BackSpace</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Return</Qt4>
+ <Qt3>Qt::Key_Return</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Enter</Qt4>
+ <Qt3>Qt::Key_Enter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Insert</Qt4>
+ <Qt3>Qt::Key_Insert</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Delete</Qt4>
+ <Qt3>Qt::Key_Delete</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Pause</Qt4>
+ <Qt3>Qt::Key_Pause</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Print</Qt4>
+ <Qt3>Qt::Key_Print</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_SysReq</Qt4>
+ <Qt3>Qt::Key_SysReq</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Clear</Qt4>
+ <Qt3>Qt::Key_Clear</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Home</Qt4>
+ <Qt3>Qt::Key_Home</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_End</Qt4>
+ <Qt3>Qt::Key_End</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Left</Qt4>
+ <Qt3>Qt::Key_Left</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Up</Qt4>
+ <Qt3>Qt::Key_Up</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Right</Qt4>
+ <Qt3>Qt::Key_Right</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Down</Qt4>
+ <Qt3>Qt::Key_Down</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Prior</Qt4>
+ <Qt3>Qt::Key_Prior</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_PageUp</Qt4>
+ <Qt3>Qt::Key_PageUp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Next</Qt4>
+ <Qt3>Qt::Key_Next</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_PageDown</Qt4>
+ <Qt3>Qt::Key_PageDown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Shift</Qt4>
+ <Qt3>Qt::Key_Shift</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Control</Qt4>
+ <Qt3>Qt::Key_Control</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Meta</Qt4>
+ <Qt3>Qt::Key_Meta</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Alt</Qt4>
+ <Qt3>Qt::Key_Alt</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_CapsLock</Qt4>
+ <Qt3>Qt::Key_CapsLock</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_NumLock</Qt4>
+ <Qt3>Qt::Key_NumLock</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ScrollLock</Qt4>
+ <Qt3>Qt::Key_ScrollLock</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F1</Qt4>
+ <Qt3>Qt::Key_F1</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F2</Qt4>
+ <Qt3>Qt::Key_F2</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F3</Qt4>
+ <Qt3>Qt::Key_F3</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F4</Qt4>
+ <Qt3>Qt::Key_F4</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F5</Qt4>
+ <Qt3>Qt::Key_F5</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F6</Qt4>
+ <Qt3>Qt::Key_F6</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F7</Qt4>
+ <Qt3>Qt::Key_F7</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F8</Qt4>
+ <Qt3>Qt::Key_F8</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F9</Qt4>
+ <Qt3>Qt::Key_F9</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F10</Qt4>
+ <Qt3>Qt::Key_F10</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F11</Qt4>
+ <Qt3>Qt::Key_F11</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F12</Qt4>
+ <Qt3>Qt::Key_F12</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F13</Qt4>
+ <Qt3>Qt::Key_F13</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F14</Qt4>
+ <Qt3>Qt::Key_F14</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F15</Qt4>
+ <Qt3>Qt::Key_F15</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F16</Qt4>
+ <Qt3>Qt::Key_F16</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F17</Qt4>
+ <Qt3>Qt::Key_F17</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F18</Qt4>
+ <Qt3>Qt::Key_F18</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F19</Qt4>
+ <Qt3>Qt::Key_F19</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F20</Qt4>
+ <Qt3>Qt::Key_F20</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F21</Qt4>
+ <Qt3>Qt::Key_F21</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F22</Qt4>
+ <Qt3>Qt::Key_F22</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F23</Qt4>
+ <Qt3>Qt::Key_F23</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F24</Qt4>
+ <Qt3>Qt::Key_F24</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F25</Qt4>
+ <Qt3>Qt::Key_F25</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F26</Qt4>
+ <Qt3>Qt::Key_F26</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F27</Qt4>
+ <Qt3>Qt::Key_F27</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F28</Qt4>
+ <Qt3>Qt::Key_F28</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F29</Qt4>
+ <Qt3>Qt::Key_F29</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F30</Qt4>
+ <Qt3>Qt::Key_F30</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F31</Qt4>
+ <Qt3>Qt::Key_F31</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F32</Qt4>
+ <Qt3>Qt::Key_F32</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F33</Qt4>
+ <Qt3>Qt::Key_F33</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F34</Qt4>
+ <Qt3>Qt::Key_F34</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F35</Qt4>
+ <Qt3>Qt::Key_F35</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Super_L</Qt4>
+ <Qt3>Qt::Key_Super_L</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Super_R</Qt4>
+ <Qt3>Qt::Key_Super_R</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Menu</Qt4>
+ <Qt3>Qt::Key_Menu</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Hyper_L</Qt4>
+ <Qt3>Qt::Key_Hyper_L</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Hyper_R</Qt4>
+ <Qt3>Qt::Key_Hyper_R</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Help</Qt4>
+ <Qt3>Qt::Key_Help</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Direction_L</Qt4>
+ <Qt3>Qt::Key_Direction_L</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Direction_R</Qt4>
+ <Qt3>Qt::Key_Direction_R</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Space</Qt4>
+ <Qt3>Qt::Key_Space</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Any</Qt4>
+ <Qt3>Qt::Key_Any</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Exclam</Qt4>
+ <Qt3>Qt::Key_Exclam</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_QuoteDbl</Qt4>
+ <Qt3>Qt::Key_QuoteDbl</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_NumberSign</Qt4>
+ <Qt3>Qt::Key_NumberSign</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Dollar</Qt4>
+ <Qt3>Qt::Key_Dollar</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Percent</Qt4>
+ <Qt3>Qt::Key_Percent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ampersand</Qt4>
+ <Qt3>Qt::Key_Ampersand</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Apostrophe</Qt4>
+ <Qt3>Qt::Key_Apostrophe</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ParenLeft</Qt4>
+ <Qt3>Qt::Key_ParenLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ParenRight</Qt4>
+ <Qt3>Qt::Key_ParenRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Asterisk</Qt4>
+ <Qt3>Qt::Key_Asterisk</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Plus</Qt4>
+ <Qt3>Qt::Key_Plus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Comma</Qt4>
+ <Qt3>Qt::Key_Comma</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Minus</Qt4>
+ <Qt3>Qt::Key_Minus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Period</Qt4>
+ <Qt3>Qt::Key_Period</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Slash</Qt4>
+ <Qt3>Qt::Key_Slash</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_0</Qt4>
+ <Qt3>Qt::Key_0</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_1</Qt4>
+ <Qt3>Qt::Key_1</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_2</Qt4>
+ <Qt3>Qt::Key_2</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_3</Qt4>
+ <Qt3>Qt::Key_3</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_4</Qt4>
+ <Qt3>Qt::Key_4</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_5</Qt4>
+ <Qt3>Qt::Key_5</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_6</Qt4>
+ <Qt3>Qt::Key_6</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_7</Qt4>
+ <Qt3>Qt::Key_7</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_8</Qt4>
+ <Qt3>Qt::Key_8</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_9</Qt4>
+ <Qt3>Qt::Key_9</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Colon</Qt4>
+ <Qt3>Qt::Key_Colon</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Semicolon</Qt4>
+ <Qt3>Qt::Key_Semicolon</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Less</Qt4>
+ <Qt3>Qt::Key_Less</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Equal</Qt4>
+ <Qt3>Qt::Key_Equal</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Greater</Qt4>
+ <Qt3>Qt::Key_Greater</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Question</Qt4>
+ <Qt3>Qt::Key_Question</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_At</Qt4>
+ <Qt3>Qt::Key_At</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_A</Qt4>
+ <Qt3>Qt::Key_A</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_B</Qt4>
+ <Qt3>Qt::Key_B</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_C</Qt4>
+ <Qt3>Qt::Key_C</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_D</Qt4>
+ <Qt3>Qt::Key_D</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_E</Qt4>
+ <Qt3>Qt::Key_E</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_F</Qt4>
+ <Qt3>Qt::Key_F</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_G</Qt4>
+ <Qt3>Qt::Key_G</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_H</Qt4>
+ <Qt3>Qt::Key_H</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_I</Qt4>
+ <Qt3>Qt::Key_I</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_J</Qt4>
+ <Qt3>Qt::Key_J</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_K</Qt4>
+ <Qt3>Qt::Key_K</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_L</Qt4>
+ <Qt3>Qt::Key_L</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_M</Qt4>
+ <Qt3>Qt::Key_M</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_N</Qt4>
+ <Qt3>Qt::Key_N</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_O</Qt4>
+ <Qt3>Qt::Key_O</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_P</Qt4>
+ <Qt3>Qt::Key_P</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Q</Qt4>
+ <Qt3>Qt::Key_Q</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_R</Qt4>
+ <Qt3>Qt::Key_R</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_S</Qt4>
+ <Qt3>Qt::Key_S</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_T</Qt4>
+ <Qt3>Qt::Key_T</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_U</Qt4>
+ <Qt3>Qt::Key_U</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_V</Qt4>
+ <Qt3>Qt::Key_V</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_W</Qt4>
+ <Qt3>Qt::Key_W</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_X</Qt4>
+ <Qt3>Qt::Key_X</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Y</Qt4>
+ <Qt3>Qt::Key_Y</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Z</Qt4>
+ <Qt3>Qt::Key_Z</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BracketLeft</Qt4>
+ <Qt3>Qt::Key_BracketLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Backslash</Qt4>
+ <Qt3>Qt::Key_Backslash</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BracketRight</Qt4>
+ <Qt3>Qt::Key_BracketRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_AsciiCircum</Qt4>
+ <Qt3>Qt::Key_AsciiCircum</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Underscore</Qt4>
+ <Qt3>Qt::Key_Underscore</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_QuoteLeft</Qt4>
+ <Qt3>Qt::Key_QuoteLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BraceLeft</Qt4>
+ <Qt3>Qt::Key_BraceLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Bar</Qt4>
+ <Qt3>Qt::Key_Bar</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BraceRight</Qt4>
+ <Qt3>Qt::Key_BraceRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_AsciiTilde</Qt4>
+ <Qt3>Qt::Key_AsciiTilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_nobreakspace</Qt4>
+ <Qt3>Qt::Key_nobreakspace</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_exclamdown</Qt4>
+ <Qt3>Qt::Key_exclamdown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_cent</Qt4>
+ <Qt3>Qt::Key_cent</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_sterling</Qt4>
+ <Qt3>Qt::Key_sterling</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_currency</Qt4>
+ <Qt3>Qt::Key_currency</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_yen</Qt4>
+ <Qt3>Qt::Key_yen</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_brokenbar</Qt4>
+ <Qt3>Qt::Key_brokenbar</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_section</Qt4>
+ <Qt3>Qt::Key_section</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_diaeresis</Qt4>
+ <Qt3>Qt::Key_diaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_copyright</Qt4>
+ <Qt3>Qt::Key_copyright</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ordfeminine</Qt4>
+ <Qt3>Qt::Key_ordfeminine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_guillemotleft</Qt4>
+ <Qt3>Qt::Key_guillemotleft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_notsign</Qt4>
+ <Qt3>Qt::Key_notsign</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_hyphen</Qt4>
+ <Qt3>Qt::Key_hyphen</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_registered</Qt4>
+ <Qt3>Qt::Key_registered</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_macron</Qt4>
+ <Qt3>Qt::Key_macron</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_degree</Qt4>
+ <Qt3>Qt::Key_degree</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_plusminus</Qt4>
+ <Qt3>Qt::Key_plusminus</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_twosuperior</Qt4>
+ <Qt3>Qt::Key_twosuperior</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_threesuperior</Qt4>
+ <Qt3>Qt::Key_threesuperior</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_acute</Qt4>
+ <Qt3>Qt::Key_acute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_mu</Qt4>
+ <Qt3>Qt::Key_mu</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_paragraph</Qt4>
+ <Qt3>Qt::Key_paragraph</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_periodcentered</Qt4>
+ <Qt3>Qt::Key_periodcentered</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_cedilla</Qt4>
+ <Qt3>Qt::Key_cedilla</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_onesuperior</Qt4>
+ <Qt3>Qt::Key_onesuperior</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_masculine</Qt4>
+ <Qt3>Qt::Key_masculine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_guillemotright</Qt4>
+ <Qt3>Qt::Key_guillemotright</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_onequarter</Qt4>
+ <Qt3>Qt::Key_onequarter</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_onehalf</Qt4>
+ <Qt3>Qt::Key_onehalf</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_threequarters</Qt4>
+ <Qt3>Qt::Key_threequarters</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_questiondown</Qt4>
+ <Qt3>Qt::Key_questiondown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Agrave</Qt4>
+ <Qt3>Qt::Key_Agrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Aacute</Qt4>
+ <Qt3>Qt::Key_Aacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Acircumflex</Qt4>
+ <Qt3>Qt::Key_Acircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Atilde</Qt4>
+ <Qt3>Qt::Key_Atilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Adiaeresis</Qt4>
+ <Qt3>Qt::Key_Adiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Aring</Qt4>
+ <Qt3>Qt::Key_Aring</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_AE</Qt4>
+ <Qt3>Qt::Key_AE</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ccedilla</Qt4>
+ <Qt3>Qt::Key_Ccedilla</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Egrave</Qt4>
+ <Qt3>Qt::Key_Egrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Eacute</Qt4>
+ <Qt3>Qt::Key_Eacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ecircumflex</Qt4>
+ <Qt3>Qt::Key_Ecircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ediaeresis</Qt4>
+ <Qt3>Qt::Key_Ediaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Igrave</Qt4>
+ <Qt3>Qt::Key_Igrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Iacute</Qt4>
+ <Qt3>Qt::Key_Iacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Icircumflex</Qt4>
+ <Qt3>Qt::Key_Icircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Idiaeresis</Qt4>
+ <Qt3>Qt::Key_Idiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ETH</Qt4>
+ <Qt3>Qt::Key_ETH</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ntilde</Qt4>
+ <Qt3>Qt::Key_Ntilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ograve</Qt4>
+ <Qt3>Qt::Key_Ograve</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Oacute</Qt4>
+ <Qt3>Qt::Key_Oacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ocircumflex</Qt4>
+ <Qt3>Qt::Key_Ocircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Otilde</Qt4>
+ <Qt3>Qt::Key_Otilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Odiaeresis</Qt4>
+ <Qt3>Qt::Key_Odiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_multiply</Qt4>
+ <Qt3>Qt::Key_multiply</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ooblique</Qt4>
+ <Qt3>Qt::Key_Ooblique</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ugrave</Qt4>
+ <Qt3>Qt::Key_Ugrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Uacute</Qt4>
+ <Qt3>Qt::Key_Uacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Ucircumflex</Qt4>
+ <Qt3>Qt::Key_Ucircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Udiaeresis</Qt4>
+ <Qt3>Qt::Key_Udiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Yacute</Qt4>
+ <Qt3>Qt::Key_Yacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_THORN</Qt4>
+ <Qt3>Qt::Key_THORN</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ssharp</Qt4>
+ <Qt3>Qt::Key_ssharp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_agrave</Qt4>
+ <Qt3>Qt::Key_agrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_aacute</Qt4>
+ <Qt3>Qt::Key_aacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_acircumflex</Qt4>
+ <Qt3>Qt::Key_acircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_atilde</Qt4>
+ <Qt3>Qt::Key_atilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_adiaeresis</Qt4>
+ <Qt3>Qt::Key_adiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_aring</Qt4>
+ <Qt3>Qt::Key_aring</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ae</Qt4>
+ <Qt3>Qt::Key_ae</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ccedilla</Qt4>
+ <Qt3>Qt::Key_ccedilla</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_egrave</Qt4>
+ <Qt3>Qt::Key_egrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_eacute</Qt4>
+ <Qt3>Qt::Key_eacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ecircumflex</Qt4>
+ <Qt3>Qt::Key_ecircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ediaeresis</Qt4>
+ <Qt3>Qt::Key_ediaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_igrave</Qt4>
+ <Qt3>Qt::Key_igrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_iacute</Qt4>
+ <Qt3>Qt::Key_iacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_icircumflex</Qt4>
+ <Qt3>Qt::Key_icircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_idiaeresis</Qt4>
+ <Qt3>Qt::Key_idiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_eth</Qt4>
+ <Qt3>Qt::Key_eth</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ntilde</Qt4>
+ <Qt3>Qt::Key_ntilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ograve</Qt4>
+ <Qt3>Qt::Key_ograve</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_oacute</Qt4>
+ <Qt3>Qt::Key_oacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ocircumflex</Qt4>
+ <Qt3>Qt::Key_ocircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_otilde</Qt4>
+ <Qt3>Qt::Key_otilde</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_odiaeresis</Qt4>
+ <Qt3>Qt::Key_odiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_division</Qt4>
+ <Qt3>Qt::Key_division</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_oslash</Qt4>
+ <Qt3>Qt::Key_oslash</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ugrave</Qt4>
+ <Qt3>Qt::Key_ugrave</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_uacute</Qt4>
+ <Qt3>Qt::Key_uacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ucircumflex</Qt4>
+ <Qt3>Qt::Key_ucircumflex</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_udiaeresis</Qt4>
+ <Qt3>Qt::Key_udiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_yacute</Qt4>
+ <Qt3>Qt::Key_yacute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_thorn</Qt4>
+ <Qt3>Qt::Key_thorn</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_ydiaeresis</Qt4>
+ <Qt3>Qt::Key_ydiaeresis</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Back</Qt4>
+ <Qt3>Qt::Key_Back</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Forward</Qt4>
+ <Qt3>Qt::Key_Forward</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Stop</Qt4>
+ <Qt3>Qt::Key_Stop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Refresh</Qt4>
+ <Qt3>Qt::Key_Refresh</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_VolumeDown</Qt4>
+ <Qt3>Qt::Key_VolumeDown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_VolumeMute</Qt4>
+ <Qt3>Qt::Key_VolumeMute</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_VolumeUp</Qt4>
+ <Qt3>Qt::Key_VolumeUp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BassBoost</Qt4>
+ <Qt3>Qt::Key_BassBoost</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BassUp</Qt4>
+ <Qt3>Qt::Key_BassUp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_BassDown</Qt4>
+ <Qt3>Qt::Key_BassDown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_TrebleUp</Qt4>
+ <Qt3>Qt::Key_TrebleUp</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_TrebleDown</Qt4>
+ <Qt3>Qt::Key_TrebleDown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaPlay</Qt4>
+ <Qt3>Qt::Key_MediaPlay</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaStop</Qt4>
+ <Qt3>Qt::Key_MediaStop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaPrev</Qt4>
+ <Qt3>Qt::Key_MediaPrev</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaNext</Qt4>
+ <Qt3>Qt::Key_MediaNext</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaRecord</Qt4>
+ <Qt3>Qt::Key_MediaRecord</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_HomePage</Qt4>
+ <Qt3>Qt::Key_HomePage</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Favorites</Qt4>
+ <Qt3>Qt::Key_Favorites</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Search</Qt4>
+ <Qt3>Qt::Key_Search</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Standby</Qt4>
+ <Qt3>Qt::Key_Standby</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_OpenUrl</Qt4>
+ <Qt3>Qt::Key_OpenUrl</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchMail</Qt4>
+ <Qt3>Qt::Key_LaunchMail</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchMedia</Qt4>
+ <Qt3>Qt::Key_LaunchMedia</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch0</Qt4>
+ <Qt3>Qt::Key_Launch0</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch1</Qt4>
+ <Qt3>Qt::Key_Launch1</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch2</Qt4>
+ <Qt3>Qt::Key_Launch2</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch3</Qt4>
+ <Qt3>Qt::Key_Launch3</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch4</Qt4>
+ <Qt3>Qt::Key_Launch4</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch5</Qt4>
+ <Qt3>Qt::Key_Launch5</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch6</Qt4>
+ <Qt3>Qt::Key_Launch6</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch7</Qt4>
+ <Qt3>Qt::Key_Launch7</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch8</Qt4>
+ <Qt3>Qt::Key_Launch8</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_Launch9</Qt4>
+ <Qt3>Qt::Key_Launch9</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchA</Qt4>
+ <Qt3>Qt::Key_LaunchA</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchB</Qt4>
+ <Qt3>Qt::Key_LaunchB</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchC</Qt4>
+ <Qt3>Qt::Key_LaunchC</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchD</Qt4>
+ <Qt3>Qt::Key_LaunchD</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchE</Qt4>
+ <Qt3>Qt::Key_LaunchE</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_LaunchF</Qt4>
+ <Qt3>Qt::Key_LaunchF</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_MediaLast</Qt4>
+ <Qt3>Qt::Key_MediaLast</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Key_unknown</Qt4>
+ <Qt3>Qt::Key_unknown</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UpArrow</Qt4>
+ <Qt3>Qt::UpArrow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DownArrow</Qt4>
+ <Qt3>Qt::DownArrow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LeftArrow</Qt4>
+ <Qt3>Qt::LeftArrow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::RightArrow</Qt4>
+ <Qt3>Qt::RightArrow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoPen</Qt4>
+ <Qt3>Qt::NoPen</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SolidLine</Qt4>
+ <Qt3>Qt::SolidLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DashLine</Qt4>
+ <Qt3>Qt::DashLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DotLine</Qt4>
+ <Qt3>Qt::DotLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DashDotLine</Qt4>
+ <Qt3>Qt::DashDotLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DashDotDotLine</Qt4>
+ <Qt3>Qt::DashDotDotLine</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MPenStyle</Qt4>
+ <Qt3>Qt::MPenStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::FlatCap</Qt4>
+ <Qt3>Qt::FlatCap</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SquareCap</Qt4>
+ <Qt3>Qt::SquareCap</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::RoundCap</Qt4>
+ <Qt3>Qt::RoundCap</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MPenCapStyle</Qt4>
+ <Qt3>Qt::MPenCapStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MiterJoin</Qt4>
+ <Qt3>Qt::MiterJoin</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BevelJoin</Qt4>
+ <Qt3>Qt::BevelJoin</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::RoundJoin</Qt4>
+ <Qt3>Qt::RoundJoin</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::MPenJoinStyle</Qt4>
+ <Qt3>Qt::MPenJoinStyle</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoBrush</Qt4>
+ <Qt3>Qt::NoBrush</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SolidPattern</Qt4>
+ <Qt3>Qt::SolidPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense1Pattern</Qt4>
+ <Qt3>Qt::Dense1Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense2Pattern</Qt4>
+ <Qt3>Qt::Dense2Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense3Pattern</Qt4>
+ <Qt3>Qt::Dense3Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense4Pattern</Qt4>
+ <Qt3>Qt::Dense4Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense5Pattern</Qt4>
+ <Qt3>Qt::Dense5Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense6Pattern</Qt4>
+ <Qt3>Qt::Dense6Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Dense7Pattern</Qt4>
+ <Qt3>Qt::Dense7Pattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::HorPattern</Qt4>
+ <Qt3>Qt::HorPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::VerPattern</Qt4>
+ <Qt3>Qt::VerPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::CrossPattern</Qt4>
+ <Qt3>Qt::CrossPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BDiagPattern</Qt4>
+ <Qt3>Qt::BDiagPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::FDiagPattern</Qt4>
+ <Qt3>Qt::FDiagPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DiagCrossPattern</Qt4>
+ <Qt3>Qt::DiagCrossPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::CustomPattern</Qt4>
+ <Qt3>Qt::CustomPattern</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_General</Qt4>
+ <Qt3>Qt::UI_General</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_AnimateMenu</Qt4>
+ <Qt3>Qt::UI_AnimateMenu</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_FadeMenu</Qt4>
+ <Qt3>Qt::UI_FadeMenu</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_AnimateCombo</Qt4>
+ <Qt3>Qt::UI_AnimateCombo</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_AnimateTooltip</Qt4>
+ <Qt3>Qt::UI_AnimateTooltip</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_FadeTooltip</Qt4>
+ <Qt3>Qt::UI_FadeTooltip</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UI_AnimateToolBox</Qt4>
+ <Qt3>Qt::UI_AnimateToolBox</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ArrowCursor</Qt4>
+ <Qt3>Qt::ArrowCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UpArrowCursor</Qt4>
+ <Qt3>Qt::UpArrowCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::CrossCursor</Qt4>
+ <Qt3>Qt::CrossCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WaitCursor</Qt4>
+ <Qt3>Qt::WaitCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SizeVerCursor</Qt4>
+ <Qt3>Qt::SizeVerCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SizeHorCursor</Qt4>
+ <Qt3>Qt::SizeHorCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SizeBDiagCursor</Qt4>
+ <Qt3>Qt::SizeBDiagCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SizeFDiagCursor</Qt4>
+ <Qt3>Qt::SizeFDiagCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SizeAllCursor</Qt4>
+ <Qt3>Qt::SizeAllCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BlankCursor</Qt4>
+ <Qt3>Qt::BlankCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SplitVCursor</Qt4>
+ <Qt3>Qt::SplitVCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::SplitHCursor</Qt4>
+ <Qt3>Qt::SplitHCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PointingHandCursor</Qt4>
+ <Qt3>Qt::PointingHandCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ForbiddenCursor</Qt4>
+ <Qt3>Qt::ForbiddenCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::WhatsThisCursor</Qt4>
+ <Qt3>Qt::WhatsThisCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BusyCursor</Qt4>
+ <Qt3>Qt::BusyCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LastCursor</Qt4>
+ <Qt3>Qt::LastCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BitmapCursor</Qt4>
+ <Qt3>Qt::BitmapCursor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PlainText</Qt4>
+ <Qt3>Qt::PlainText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::RichText</Qt4>
+ <Qt3>Qt::RichText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AutoText</Qt4>
+ <Qt3>Qt::AutoText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LogText</Qt4>
+ <Qt3>Qt::LogText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AnchorName</Qt4>
+ <Qt3>Qt::AnchorName</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::AnchorHref</Qt4>
+ <Qt3>Qt::AnchorHref</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockUnmanaged</Qt4>
+ <Qt3>Qt::DockUnmanaged</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockTornOff</Qt4>
+ <Qt3>Qt::DockTornOff</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockTop</Qt4>
+ <Qt3>Qt::DockTop</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockBottom</Qt4>
+ <Qt3>Qt::DockBottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockRight</Qt4>
+ <Qt3>Qt::DockRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockLeft</Qt4>
+ <Qt3>Qt::DockLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::DockMinimized</Qt4>
+ <Qt3>Qt::DockMinimized</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Unmanaged</Qt4>
+ <Qt3>Qt::Unmanaged</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TornOff</Qt4>
+ <Qt3>Qt::TornOff</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Top</Qt4>
+ <Qt3>Qt::Top</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Bottom</Qt4>
+ <Qt3>Qt::Bottom</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Right</Qt4>
+ <Qt3>Qt::Right</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Left</Qt4>
+ <Qt3>Qt::Left</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::Minimized</Qt4>
+ <Qt3>Qt::Minimized</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TextDate</Qt4>
+ <Qt3>Qt::TextDate</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::ISODate</Qt4>
+ <Qt3>Qt::ISODate</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LocalDate</Qt4>
+ <Qt3>Qt::LocalDate</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::LocalTime</Qt4>
+ <Qt3>Qt::LocalTime</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::UTC</Qt4>
+ <Qt3>Qt::UTC</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::FixedColor</Qt4>
+ <Qt3>Qt::FixedColor</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::FixedPixmap</Qt4>
+ <Qt3>Qt::FixedPixmap</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::NoBackground</Qt4>
+ <Qt3>Qt::NoBackground</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteForeground</Qt4>
+ <Qt3>Qt::PaletteForeground</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteButton</Qt4>
+ <Qt3>Qt::PaletteButton</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteLight</Qt4>
+ <Qt3>Qt::PaletteLight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteMidlight</Qt4>
+ <Qt3>Qt::PaletteMidlight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteDark</Qt4>
+ <Qt3>Qt::PaletteDark</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteMid</Qt4>
+ <Qt3>Qt::PaletteMid</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteText</Qt4>
+ <Qt3>Qt::PaletteText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteBrightText</Qt4>
+ <Qt3>Qt::PaletteBrightText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteBase</Qt4>
+ <Qt3>Qt::PaletteBase</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteBackground</Qt4>
+ <Qt3>Qt::PaletteBackground</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteShadow</Qt4>
+ <Qt3>Qt::PaletteShadow</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteHighlight</Qt4>
+ <Qt3>Qt::PaletteHighlight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteHighlightedText</Qt4>
+ <Qt3>Qt::PaletteHighlightedText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteButtonText</Qt4>
+ <Qt3>Qt::PaletteButtonText</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteLink</Qt4>
+ <Qt3>Qt::PaletteLink</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::PaletteLinkVisited</Qt4>
+ <Qt3>Qt::PaletteLinkVisited</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::X11ParentRelative</Qt4>
+ <Qt3>Qt::X11ParentRelative</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::CaseSensitive</Qt4>
+ <Qt3>Qt::CaseSensitive</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TopLeft</Qt4>
+ <Qt3>Qt::TopLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::TopRight</Qt4>
+ <Qt3>Qt::TopRight</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BottomLeft</Qt4>
+ <Qt3>Qt::BottomLeft</Qt3>
+ </item>
+ <item Type="RenamedEnumvalue" >
+ <Qt4>Qt::BottomRight</Qt4>
+ <Qt3>Qt::BottomRight</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QApplication::ColorSpec</Qt4>
+ <Qt3>QApplication::ColorMode</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QCheckBox::ToggleState</Qt4>
+ <Qt3>QButton::ToggleState</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::CursorShape</Qt4>
+ <Qt3>QCursorShape</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QFile::Filters</Qt4>
+ <Qt3>QFile::FilterSpec</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QFile::Permission</Qt4>
+ <Qt3>QFile::PermissionSpec</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QFile::SortFlags</Qt4>
+ <Qt3>QFile::SortSpec</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QFile::Error</Qt4>
+ <Qt3>QFile::Status</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QFile::Permission</Qt4>
+ <Qt3>QFileInfo::PermissionSpec</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Orientation</Qt4>
+ <Qt3>QGrid::Direction</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Orientation</Qt4>
+ <Qt3>QGridWidget::Direction</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>qlonglong</Qt4>
+ <Qt3>QIODevice::Offset</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::AspectRatioMode</Qt4>
+ <Qt3>QImage::ScaleMode</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::AspectRatioMode</Qt4>
+ <Qt3>QSize::ScaleMode</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Q3Socket::Error</Qt4>
+ <Qt3>QSocket::Error</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Q3Socket::State</Qt4>
+ <Qt3>QSocket::State</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QStyle::SubControls</Qt4>
+ <Qt3>QStyle::SCFlags</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QStyle::State</Qt4>
+ <Qt3>QStyle::SFlags</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QTextStream</Qt4>
+ <Qt3>QTS</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QUriDrag</Qt4>
+ <Qt3>QUrlDrag</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::FocusPolicy</Qt4>
+ <Qt3>QWidget::FocusPolicy</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>qlonglong</Qt4>
+ <Qt3>Q_LLONG</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>qulonglong</Qt4>
+ <Qt3>Q_ULLONG</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::ToolBarDock</Qt4>
+ <Qt3>Qt::Dock</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QSysInfo::MacVersion</Qt4>
+ <Qt3>Qt::MacintoshVersion</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::TextFlag</Qt4>
+ <Qt3>Qt::TextFlags</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>QSysInfo::WinVersion</Qt4>
+ <Qt3>Qt::WindowsVersion</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Orientation</Qt4>
+ <Qt3>Qt::Orientation</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::SortOrder</Qt4>
+ <Qt3>Qt::SortOrder</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::WindowState</Qt4>
+ <Qt3>Qt::WindowState</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::BGMode</Qt4>
+ <Qt3>Qt::BGMode</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::PaintUnit</Qt4>
+ <Qt3>Qt::PaintUnit</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::GUIStyle</Qt4>
+ <Qt3>Qt::GUIStyle</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Modifier</Qt4>
+ <Qt3>Qt::Modifier</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Key</Qt4>
+ <Qt3>Qt::Key</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::ArrowType</Qt4>
+ <Qt3>Qt::ArrowType</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::PenStyle</Qt4>
+ <Qt3>Qt::PenStyle</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::PenCapStyle</Qt4>
+ <Qt3>Qt::PenCapStyle</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::PenJoinStyle</Qt4>
+ <Qt3>Qt::PenJoinStyle</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::BrushStyle</Qt4>
+ <Qt3>Qt::BrushStyle</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::UIEffect</Qt4>
+ <Qt3>Qt::UIEffect</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::CursorShape</Qt4>
+ <Qt3>Qt::CursorShape</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::TextFormat</Qt4>
+ <Qt3>Qt::TextFormat</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::AnchorAttribute</Qt4>
+ <Qt3>Qt::AnchorAttribute</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Dock</Qt4>
+ <Qt3>Qt::Dock</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::DateFormat</Qt4>
+ <Qt3>Qt::DateFormat</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::TimeSpec</Qt4>
+ <Qt3>Qt::TimeSpec</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::BackgroundMode</Qt4>
+ <Qt3>Qt::BackgroundMode</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::Corner</Qt4>
+ <Qt3>Qt::Corner</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::WFlags</Qt4>
+ <Qt3>Qt::WFlags</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::ToolBarDock</Qt4>
+ <Qt3>Qt::ToolBarDock</Qt3>
+ </item>
+ <item Type="RenamedType" >
+ <Qt4>Qt::HANDLE</Qt4>
+ <Qt3>Qt::HANDLE</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::color0</Qt4>
+ <Qt3>Qt::color0</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::color1</Qt4>
+ <Qt3>Qt::color1</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::black</Qt4>
+ <Qt3>Qt::black</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::white</Qt4>
+ <Qt3>Qt::white</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkGray</Qt4>
+ <Qt3>Qt::darkGray</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::gray</Qt4>
+ <Qt3>Qt::gray</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::lightGray</Qt4>
+ <Qt3>Qt::lightGray</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::red</Qt4>
+ <Qt3>Qt::red</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::green</Qt4>
+ <Qt3>Qt::green</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::blue</Qt4>
+ <Qt3>Qt::blue</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::cyan</Qt4>
+ <Qt3>Qt::cyan</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::magenta</Qt4>
+ <Qt3>Qt::magenta</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::yellow</Qt4>
+ <Qt3>Qt::yellow</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkRed</Qt4>
+ <Qt3>Qt::darkRed</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkGreen</Qt4>
+ <Qt3>Qt::darkGreen</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkBlue</Qt4>
+ <Qt3>Qt::darkBlue</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkCyan</Qt4>
+ <Qt3>Qt::darkCyan</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkMagenta</Qt4>
+ <Qt3>Qt::darkMagenta</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::darkYellow</Qt4>
+ <Qt3>Qt::darkYellow</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::ButtonState</Qt4>
+ <Qt3>Qt::ButtonState</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::TextFlags</Qt4>
+ <Qt3>Qt::TextFlags</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::ImageConversionFlags</Qt4>
+ <Qt3>Qt::ImageConversionFlags</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::arrowCursor</Qt4>
+ <Qt3>Qt::arrowCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::upArrowCursor</Qt4>
+ <Qt3>Qt::upArrowCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::crossCursor</Qt4>
+ <Qt3>Qt::crossCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::waitCursor</Qt4>
+ <Qt3>Qt::waitCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::ibeamCursor</Qt4>
+ <Qt3>Qt::ibeamCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::sizeVerCursor</Qt4>
+ <Qt3>Qt::sizeVerCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::sizeHorCursor</Qt4>
+ <Qt3>Qt::sizeHorCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::sizeBDiagCursor</Qt4>
+ <Qt3>Qt::sizeBDiagCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::sizeFDiagCursor</Qt4>
+ <Qt3>Qt::sizeFDiagCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::sizeAllCursor</Qt4>
+ <Qt3>Qt::sizeAllCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::blankCursor</Qt4>
+ <Qt3>Qt::blankCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::splitVCursor</Qt4>
+ <Qt3>Qt::splitVCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::splitHCursor</Qt4>
+ <Qt3>Qt::splitHCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::pointingHandCursor</Qt4>
+ <Qt3>Qt::pointingHandCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::forbiddenCursor</Qt4>
+ <Qt3>Qt::forbiddenCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>Qt::whatsThisCursor</Qt4>
+ <Qt3>Qt::whatsThisCursor</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>qPixmapFromMimeSource</Qt4>
+ <Qt3>QPixmap::fromMimeSource</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>QImageReader::supportedImageFormats</Qt4>
+ <Qt3>QImage::inputFormats</Qt3>
+ </item>
+ <item Type="RenamedQtSymbol" >
+ <Qt4>QImageWriter::supportedImageFormats</Qt4>
+ <Qt3>QImage::outputFormats</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>QPointer</Qt4>
+ <Qt3>QGuardedPtr</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3DeepCopy</Qt4>
+ <Qt3>QDeepCopy</Qt3>
+ </item>
+ <item Type="RenamedClass" >
+ <Qt4>Q3PtrCollection</Qt4>
+ <Qt3>QCollection</Qt3>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlFieldInfo</Class>
+ <Header>Q3SqlFieldInfo</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3TextStream</Class>
+ <Header>Q3TextStream</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QCloseEvent</Class>
+ <Header>QCloseEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QHelpEvent</Class>
+ <Header>QHelpEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QDragMoveEvent</Class>
+ <Header>QDragMoveEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QDropEvent</Class>
+ <Header>QDropEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QKeyEvent</Class>
+ <Header>QKeyEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QClipboardEvent</Class>
+ <Header>QClipboardEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QHideEvent</Class>
+ <Header>QHideEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QDragLeaveEvent</Class>
+ <Header>QDragLeaveEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QWhatsThisClickedEvent</Class>
+ <Header>QWhatsThisClickedEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QMoveEvent</Class>
+ <Header>QMoveEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QFileOpenEvent</Class>
+ <Header>QFileOpenEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QResizeEvent</Class>
+ <Header>QResizeEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QContextMenuEvent</Class>
+ <Header>QContextMenuEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QActionEvent</Class>
+ <Header>QActionEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QWSUpdateEvent</Class>
+ <Header>QWSUpdateEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QInputMethodEvent</Class>
+ <Header>QInputMethodEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QShortcutEvent</Class>
+ <Header>QShortcutEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QDragEnterEvent</Class>
+ <Header>QDragEnterEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QDragResponseEvent</Class>
+ <Header>QDragResponseEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QToolBarChangeEvent</Class>
+ <Header>QToolBarChangeEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QShowEvent</Class>
+ <Header>QShowEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QWSEvent</Class>
+ <Header>QWSEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QFocusEvent</Class>
+ <Header>QFocusEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QInputEvent</Class>
+ <Header>QInputEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QStatusTipEvent</Class>
+ <Header>QStatusTipEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QWheelEvent</Class>
+ <Header>QWheelEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QMouseEvent</Class>
+ <Header>QMouseEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTabletEvent</Class>
+ <Header>QTabletEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QPaintEvent</Class>
+ <Header>QPaintEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QIconDragEvent</Class>
+ <Header>QIconDragEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QChildEvent</Class>
+ <Header>QChildEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QEvent</Class>
+ <Header>QEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QWinEventNotifier</Class>
+ <Header>QWinEventNotifier</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTimerEvent</Class>
+ <Header>QTimerEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QEventLoop</Class>
+ <Header>QEventLoop</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QCustomEvent</Class>
+ <Header>QCustomEvent</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3PtrList</Class>
+ <Header>Q3PtrList</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3ValueList</Class>
+ <Header>Q3ValueList</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3MemArray</Class>
+ <Header>Q3MemArray</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3StrList</Class>
+ <Header>Q3StrList</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3Painter</Class>
+ <Header>Q3Painter</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTextStream</Class>
+ <Header>QTextStream</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3Frame</Class>
+ <Header>Q3Frame</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QBoxLayout</Class>
+ <Header>QBoxLayout</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3VBoxLayout</Class>
+ <Header>Q3VBoxLayout</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3HBoxLayout</Class>
+ <Header>Q3HBoxLayout</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3GridLayout</Class>
+ <Header>Q3GridLayout</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3CString</Class>
+ <Header>Q3CString</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QPixmap</Class>
+ <Header>QPixmap</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTranslator</Class>
+ <Header>QTranslator</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QLabel</Class>
+ <Header>QLabel</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QListBoxItem</Class>
+ <Header>QListBoxItem</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3Action</Class>
+ <Header>Q3Action</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3ActionGroup</Class>
+ <Header>Q3ActionGroup</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>qPixmapFromMimeSource</Class>
+ <Header>q3mimefactory.h</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlFieldInfo</Class>
+ <Header>Q3SqlFieldInfo</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlFieldInfoList</Class>
+ <Header>Q3SqlFieldInfoList</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlCursor</Class>
+ <Header>Q3SqlCursor</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlEditorFactory</Class>
+ <Header>Q3SqlEditorFactory</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlForm</Class>
+ <Header>Q3SqlForm</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlPropertyMap</Class>
+ <Header>Q3SqlPropertyMap</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlRecordInfo</Class>
+ <Header>Q3SqlRecordInfo</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3SqlSelectCursor</Class>
+ <Header>Q3SqlSelectCursor</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QSqlError</Class>
+ <Header>QSqlError</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QSqlQuery</Class>
+ <Header>QSqlQuery</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3PointArray</Class>
+ <Header>Q3PointArray</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3PopupMenu</Class>
+ <Header>Q3PopupMenu</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3Button</Class>
+ <Header>Q3Button</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3BoxLayout</Class>
+ <Header>Q3BoxLayout</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3Signal</Class>
+ <Header>Q3Signal</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTextIStream</Class>
+ <Header>QTextIStream</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>QTextOStream</Class>
+ <Header>QTextOStream</Header>
+ </item>
+ <item Type="NeedHeader" >
+ <Class>Q3PtrCollection</Class>
+ <Header>Q3PtrCollection</Header>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qnamespace.h</Qt4>
+ <Qt3>qkeycode.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qobject.h</Qt4>
+ <Qt3>qobjectlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qwidget.h</Qt4>
+ <Qt3>qwidgetlist.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qapplication.h</Qt4>
+ <Qt3>qapp.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qmessagebox.h</Qt4>
+ <Qt3>qmsgbox.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qicon.h</Qt4>
+ <Qt3>qiconset.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qmatrix.h</Qt4>
+ <Qt3>qwmatrix.h</Qt3>
+ </item>
+ <item Type="RenamedHeader" >
+ <Qt4>qpointer.h</Qt4>
+ <Qt3>qguardedptr.h</Qt3>
+ </item>
+ <item Type="RenamedToken" >
+ <Qt4>q3InitNetworkProtocols</Qt4>
+ <Qt3>qInitNetworkProtocols</Qt3>
+ </item>
+ <item Type="RenamedToken" >
+ <Qt4>qSort</Qt4>
+ <Qt3>qHeapSort</Qt3>
+ </item>
+</Rules>
diff --git a/tools/porting/src/qt3headers0.qrc b/tools/porting/src/qt3headers0.qrc
new file mode 100644
index 0000000..3fa52d8
--- /dev/null
+++ b/tools/porting/src/qt3headers0.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file compress="9">qt3headers0.resource</file>
+ </qresource>
+</RCC> \ No newline at end of file
diff --git a/tools/porting/src/qt3headers0.resource b/tools/porting/src/qt3headers0.resource
new file mode 100644
index 0000000..13be468
--- /dev/null
+++ b/tools/porting/src/qt3headers0.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers1.qrc b/tools/porting/src/qt3headers1.qrc
new file mode 100644
index 0000000..3178598
--- /dev/null
+++ b/tools/porting/src/qt3headers1.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file compress="9">qt3headers1.resource</file>
+ </qresource>
+</RCC> \ No newline at end of file
diff --git a/tools/porting/src/qt3headers1.resource b/tools/porting/src/qt3headers1.resource
new file mode 100644
index 0000000..e06d270
--- /dev/null
+++ b/tools/porting/src/qt3headers1.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers2.qrc b/tools/porting/src/qt3headers2.qrc
new file mode 100644
index 0000000..dad47b6
--- /dev/null
+++ b/tools/porting/src/qt3headers2.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file compress="9">qt3headers2.resource</file>
+ </qresource>
+</RCC> \ No newline at end of file
diff --git a/tools/porting/src/qt3headers2.resource b/tools/porting/src/qt3headers2.resource
new file mode 100644
index 0000000..e44c81d
--- /dev/null
+++ b/tools/porting/src/qt3headers2.resource
Binary files differ
diff --git a/tools/porting/src/qt3headers3.qrc b/tools/porting/src/qt3headers3.qrc
new file mode 100644
index 0000000..77a6661
--- /dev/null
+++ b/tools/porting/src/qt3headers3.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file compress="9">qt3headers3.resource</file>
+ </qresource>
+</RCC> \ No newline at end of file
diff --git a/tools/porting/src/qt3headers3.resource b/tools/porting/src/qt3headers3.resource
new file mode 100644
index 0000000..6d259f2
--- /dev/null
+++ b/tools/porting/src/qt3headers3.resource
Binary files differ
diff --git a/tools/porting/src/qt3to4.pri b/tools/porting/src/qt3to4.pri
new file mode 100644
index 0000000..c10c2f8
--- /dev/null
+++ b/tools/porting/src/qt3to4.pri
@@ -0,0 +1,68 @@
+DEPENDPATH += $$PWD
+INCLUDEPATH += $$PWD
+
+QT += XML
+HEADERS += $$PWD/smallobject.h \
+ $$PWD/tokenengine.h \
+ $$PWD/tokenizer.h \
+ $$PWD/rpplexer.h \
+ $$PWD/rpp.h \
+ $$PWD/rpptreewalker.h \
+ $$PWD/rpptreeevaluator.h \
+ $$PWD/rppexpressionbuilder.h \
+ $$PWD/preprocessorcontrol.h \
+ $$PWD/replacetoken.h \
+ $$PWD/tokenreplacements.h \
+ $$PWD/textreplacement.h \
+ $$PWD/portingrules.h \
+ $$PWD/qtsimplexml.h \
+ $$PWD/projectporter.h \
+ $$PWD/proparser.h \
+ $$PWD/fileporter.h \
+ $$PWD/logger.h \
+ $$PWD/tokens.h \
+ $$PWD/filewriter.h \
+ $$PWD/cpplexer.h \
+ $$PWD/smallobject.h \
+ $$PWD/ast.h \
+ $$PWD/errors.h \
+ $$PWD/parser.h \
+ $$PWD/translationunit.h \
+ $$PWD/treewalker.h \
+ $$PWD/semantic.h \
+ $$PWD/codemodel.h \
+ $$PWD/codemodelwalker.h \
+ $$PWD/codemodelattributes.h
+
+SOURCES += \
+ $$PWD/smallobject.cpp \
+ $$PWD/tokenengine.cpp \
+ $$PWD/tokenizer.cpp \
+ $$PWD/rpplexer.cpp \
+ $$PWD/rpp.cpp \
+ $$PWD/rpptreewalker.cpp \
+ $$PWD/rpptreeevaluator.cpp \
+ $$PWD/rppexpressionbuilder.cpp \
+ $$PWD/preprocessorcontrol.cpp \
+ $$PWD/replacetoken.cpp \
+ $$PWD/tokenreplacements.cpp \
+ $$PWD/textreplacement.cpp \
+ $$PWD/portingrules.cpp \
+ $$PWD/qtsimplexml.cpp \
+ $$PWD/projectporter.cpp \
+ $$PWD/proparser.cpp \
+ $$PWD/fileporter.cpp \
+ $$PWD/logger.cpp \
+ $$PWD/filewriter.cpp \
+ $$PWD/cpplexer.cpp \
+ $$PWD/ast.cpp \
+ $$PWD/errors.cpp \
+ $$PWD/parser.cpp \
+ $$PWD/translationunit.cpp \
+ $$PWD/treewalker.cpp \
+ $$PWD/semantic.cpp \
+ $$PWD/codemodel.cpp \
+ $$PWD/codemodelwalker.cpp \
+ $$PWD/codemodelattributes.cpp
+
+
diff --git a/tools/porting/src/qtsimplexml.cpp b/tools/porting/src/qtsimplexml.cpp
new file mode 100644
index 0000000..7803d7d
--- /dev/null
+++ b/tools/porting/src/qtsimplexml.cpp
@@ -0,0 +1,278 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtsimplexml.h"
+#include <QDomDocument>
+
+QT_BEGIN_NAMESPACE
+
+QtSimpleXml::QtSimpleXml(const QString &name)
+{
+ valid = false;
+ n = name;
+ parent = 0;
+}
+
+QtSimpleXml &QtSimpleXml::operator [](int index)
+{
+ if (index < 0)
+ return *this;
+
+ if (index > children.size()) {
+ static QtSimpleXml NIL;
+ qWarning("QtSimpleXml::operator[], Out of range access: size is %i, index is %i",
+ children.size(), index);
+ return NIL;
+ }
+
+ if (index == children.size()) {
+ QtSimpleXml *item = new QtSimpleXml(QLatin1String("item"));
+ item->parent = this;
+ children.insert(item->name(), item);
+ return *item;
+ }
+
+ QMultiMap<QString, QtSimpleXml *>::Iterator it = children.begin();
+ while (index--) ++it;
+ return *it.value();
+}
+
+QtSimpleXml &QtSimpleXml::operator [](const QString &key)
+{
+ if (!children.contains(key)) {
+ QtSimpleXml *item = new QtSimpleXml(key);
+ item->parent = this;
+ children.insert(item->name(), item);
+ return *item;
+ }
+
+ return *children.find(key).value();
+}
+
+QtSimpleXml &QtSimpleXml::operator =(const QString &text)
+{
+ valid = true;
+ QtSimpleXml *p = parent;
+ while (p && !p->valid) {
+ p->valid = true;
+ p = p->parent;
+ }
+
+ s = text;
+ return *this;
+}
+
+QDomDocument QtSimpleXml::toDomDocument() const
+{
+ QDomDocument doc;
+ QString data = QLatin1String("version=\"1.0\" encoding=\"UTF-8\"");
+ doc.appendChild(doc.createProcessingInstruction(QLatin1String("xml"), data));
+
+ if (!valid)
+ return doc;
+
+ if(!s.isEmpty())
+ doc.appendChild(doc.createTextNode(s));
+
+ {
+ QMultiMap<QString, QtSimpleXml *>::ConstIterator it = children.constBegin();
+ for (; it != children.end(); ++it) {
+ QtSimpleXml *item = it.value();
+ if (item->valid) {
+ QDomNode node = item->toDomElement(&doc);
+ doc.appendChild(node);
+ }
+ }
+ }
+
+ return doc;
+}
+
+QDomElement QtSimpleXml::toDomElement(QDomDocument *doc) const
+{
+ QDomElement elem = doc->createElement(n);
+ QMap<QString, QString>::ConstIterator ita = attr.constBegin();
+ for (; ita != attr.constEnd(); ++ita)
+ elem.setAttribute(ita.key(), ita.value());
+
+ if(!s.isEmpty())
+ elem.appendChild(doc->createTextNode(s));
+
+ {
+ QMultiMap<QString, QtSimpleXml *>::ConstIterator it = children.constBegin();
+ for (; it != children.constEnd(); ++it) {
+ QtSimpleXml *item = it.value();
+ if (item->valid) {
+ QDomNode node = item->toDomElement(doc);
+ elem.appendChild(node);
+ }
+ }
+ }
+
+ return elem;
+}
+
+QString QtSimpleXml::name() const
+{
+ return n;
+}
+
+QString QtSimpleXml::text() const
+{
+ return s;
+}
+
+int QtSimpleXml::numChildren() const
+{
+ return children.count();
+}
+
+bool QtSimpleXml::isValid() const
+{
+ return valid;
+}
+
+void QtSimpleXml::setAttribute(const QString &key, const QString &value)
+{
+ attr.insert(key, QString(value));
+}
+
+QString QtSimpleXml::attribute(const QString &key)
+{
+ return attr[key];
+}
+
+bool QtSimpleXml::setContent(const QString &content)
+{
+ QDomDocument doc;
+ QString errorMsg;
+ int errorLine;
+ int errorColumn;
+
+ if (!doc.setContent(content, false, &errorMsg, &errorLine, &errorColumn)) {
+ errorStr = errorMsg;
+ errorStr += QLatin1String(" at ") + QString::number(errorLine) + QLatin1String(":") + QString::number(errorColumn);
+ return false;
+ }
+
+ parse(doc);
+ return true;
+}
+
+bool QtSimpleXml::setContent(QIODevice *device)
+{
+ QDomDocument doc;
+ QString errorMsg;
+ int errorLine;
+ int errorColumn;
+ if (!doc.setContent(device, false, &errorMsg, &errorLine, &errorColumn)) {
+ errorStr = errorMsg;
+ errorStr += QLatin1String(" at ") + QString::number(errorLine) + QLatin1String(":") + QString::number(errorColumn);
+ return false;
+ }
+
+ QDomNode child = doc.firstChild();
+ while (!child.isNull() && !child.isElement())
+ child = child.nextSibling();
+
+ while (!child.isNull()) {
+ QtSimpleXml *xmlNode = new QtSimpleXml;
+ xmlNode->parse(child);
+ xmlNode->parent=this;
+ children.insert(xmlNode->name(), xmlNode);
+ do {
+ child = child.nextSibling();
+ } while (!child.isNull() && !child.isElement());
+ }
+
+ return true;
+}
+
+
+void QtSimpleXml::parse(QDomNode node)
+{
+ // puts("parse");
+ if (node.isNull())
+ return;
+
+ valid = true;
+ n = node.nodeName();
+ QDomElement element = node.toElement();
+
+ QDomNamedNodeMap attrs = element.attributes();
+ for (int i = 0; i < (int) attrs.count(); ++i) {
+ QDomAttr attribute = attrs.item(i).toAttr();
+ attr.insert(attribute.name(), attribute.value());
+ }
+
+ if (element.firstChild().isText()) {
+ // printf("Got text %s\n", element.text().stripWhiteSpace().latin1());
+ s = element.text().trimmed();
+ return;
+ }
+
+ if (node.hasChildNodes()) {
+
+ // Skip to first element child
+ QDomNode child = node.firstChild();
+ while (!child.isNull() && !child.isElement())
+ child = child.nextSibling();
+
+ while (!child.isNull()) {
+ QtSimpleXml *xmlNode = new QtSimpleXml;
+ xmlNode->parse(child);
+ children.insert(xmlNode->name(), xmlNode);
+
+ node = node.nextSibling();
+
+ do {
+ child = child.nextSibling();
+ } while (!child.isNull() && !child.isElement());
+ }
+ }
+}
+
+QString QtSimpleXml::errorString() const
+{
+ return errorStr;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/qtsimplexml.h b/tools/porting/src/qtsimplexml.h
new file mode 100644
index 0000000..b3d6732
--- /dev/null
+++ b/tools/porting/src/qtsimplexml.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTSIMPLEXML_H
+#define QTSIMPLEXML_H
+
+#include <QString>
+#include <QMultiMap>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+
+class QDomDocument;
+class QDomElement;
+class QDomNode;
+class QIODevice;
+
+class QtSimpleXml
+{
+public:
+ QtSimpleXml(const QString &name = QString());
+
+ QString name() const;
+ QString text() const;
+ int numChildren() const;
+ bool isValid() const;
+
+ const QtSimpleXml &operator [](int index) const;
+ QtSimpleXml &operator [](int index);
+ QtSimpleXml &operator [](const QString &key);
+ QtSimpleXml &operator =(const QString &text);
+
+ void setAttribute(const QString &key, const QString &value);
+ QString attribute(const QString &key);
+
+ bool setContent(const QString &content);
+ bool setContent(QIODevice *device);
+ QString errorString() const;
+
+ QDomDocument toDomDocument() const;
+ QDomElement toDomElement(QDomDocument *doc) const;
+private:
+ void parse(QDomNode node);
+
+ QtSimpleXml *parent;
+
+ QMultiMap<QString, QtSimpleXml *> children;
+ QMap<QString, QString> attr;
+
+ QString s;
+ QString n;
+ bool valid;
+
+ QString errorStr;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/replacetoken.cpp b/tools/porting/src/replacetoken.cpp
new file mode 100644
index 0000000..52757a1
--- /dev/null
+++ b/tools/porting/src/replacetoken.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "replacetoken.h"
+#include "tokenreplacements.h"
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+/*
+ Add an entry to the tokenRuleLookup map for each token replacement rule.
+*/
+ReplaceToken::ReplaceToken(const QList<TokenReplacement*> &tokenReplacementRules)
+:tokenReplacementRules(tokenReplacementRules)
+{
+ foreach (TokenReplacement* rep, tokenReplacementRules) {
+ QByteArray key = rep->getReplaceKey();
+ if(!key.isEmpty()) {
+ tokenRuleLookup.insert(key, rep);
+ }
+ }
+}
+
+TextReplacements ReplaceToken::getTokenTextReplacements(const TokenEngine::TokenContainer &container)
+{
+ TextReplacements textReplacements;
+
+ int t=0;
+ const int numTokens = container.count();
+ while(t < numTokens) {
+ QByteArray tokenText = container.text(t);
+ bool changed = false;
+
+ if(isPreprocessorDirective(tokenText)) {
+ foreach(TokenReplacement *tokenReplacementRule, tokenReplacementRules) {
+ if(!changed)
+ changed = tokenReplacementRule->doReplace(container, t, textReplacements);
+ if(changed)
+ break;
+ }
+ } else if (isInterestingToken(tokenText.trimmed())) {
+ foreach (TokenReplacement* value, tokenRuleLookup.values(tokenText)) {
+ changed = value->doReplace(container, t, textReplacements);
+ if(changed) {
+ goto end;
+ }
+ }
+ }
+ end:
+ ++t;
+ }
+ return textReplacements;
+}
+
+bool ReplaceToken::isInterestingToken(const QByteArray &text)
+{
+ return !(text.isEmpty() || text==";" || text=="(" || text==")" || text=="{" || text=="}" || text=="="
+ || text=="+=" || text=="-=" || text=="if" || text=="then" || text=="else"
+ );
+}
+
+bool ReplaceToken::isPreprocessorDirective(const QByteArray &token)
+{
+ return (token[0]=='#');
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/replacetoken.h b/tools/porting/src/replacetoken.h
new file mode 100644
index 0000000..5df0575
--- /dev/null
+++ b/tools/porting/src/replacetoken.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef REPLACETOKEN_H
+#define REPLACETOKEN_H
+
+#include "tokenengine.h"
+#include "tokenreplacements.h"
+#include "textreplacement.h"
+#include <QList>
+#include <QMultiMap>
+
+QT_BEGIN_NAMESPACE
+
+class ReplaceToken
+{
+public:
+ ReplaceToken(const QList<TokenReplacement*> &tokenReplacementRules);
+ TextReplacements getTokenTextReplacements(const TokenEngine::TokenContainer &tokenContainer);
+private:
+ bool isInterestingToken(const QByteArray &token);
+ bool isPreprocessorDirective(const QByteArray &token);
+ QMultiMap<QByteArray, TokenReplacement*> tokenRuleLookup;
+ const QList<TokenReplacement*> tokenReplacementRules;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/rpp.cpp b/tools/porting/src/rpp.cpp
new file mode 100644
index 0000000..e95138b
--- /dev/null
+++ b/tools/porting/src/rpp.cpp
@@ -0,0 +1,728 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rpp.h"
+#include "rppexpressionbuilder.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+
+namespace Rpp
+{
+
+Preprocessor::Preprocessor()
+ : lexerTokenIndex(0), numTokens(0)
+{
+
+}
+
+Source *Preprocessor::parse(const TokenEngine::TokenContainer &tokenContainer,
+ const QVector<Type> &tokenTypeList, TypedPool<Item> *memoryPool)
+{
+ m_memoryPool = memoryPool;
+ Source *m_source = createNode<Source>(m_memoryPool); //node whith no parent
+ m_tokenContainer = tokenContainer;
+ m_tokenTypeList = tokenTypeList;
+ lexerTokenIndex = 0;
+ numTokens = m_tokenContainer.count();
+
+ if(m_tokenContainer.count() != tokenTypeList.count()) {
+ emit error(QLatin1String("Error"), QLatin1String("Internal error in preprocessor: Number of tokens is not equal to number of types in type list"));
+ return m_source;
+ }
+
+ if(tokenTypeList.isEmpty()) {
+ // emit error("Warning:", "Trying to parse empty source file");
+ return m_source;
+ }
+ Q_ASSERT(m_source->toItemComposite());
+ parseGroup(m_source);
+
+ return m_source;
+}
+
+// group-part
+// group group-part
+bool Preprocessor::parseGroup(Item *group)
+{
+ Q_ASSERT(group->toItemComposite());
+ bool gotGroup = false;
+ while(lexerTokenIndex < numTokens) {
+ if (!parseGroupPart(group))
+ break;
+ gotGroup = true;
+ }
+ return gotGroup;
+}
+
+//if-section (# if / # ifdef / #ifndef )
+//control-line ( #include / etc )
+//# non-directive ( # text newline
+//text-line (text newline )
+bool Preprocessor::parseGroupPart(Item *group)
+{
+ //cout << "parse group part" << endl;
+ Q_ASSERT(group->toItemComposite());
+
+ //look up first significant token
+ Type token = lookAhead();
+ if(token == Token_eof)
+ return false;
+
+ //look for '#'
+ if(token != Token_preproc)
+ return parseTextLine(group);
+
+ //look up first significant token after the '#'
+ token = lookAheadSkipHash();
+ if(token == Token_eof)
+ return false;
+
+ // Check if we are at the end of a group. This is not an neccesarely an
+ // error, it happens when we reach an #endif for example.
+ if (token == Token_directive_elif || token == Token_directive_else ||
+ token == Token_directive_endif)
+ return false;
+
+ // if-section?
+ if(token == Token_directive_if || token == Token_directive_ifdef ||
+ token == Token_directive_ifndef)
+ return parseIfSection(group);
+
+ // control-line?
+ if (token == Token_directive_define)
+ return parseDefineDirective(group);
+ if (token == Token_directive_undef)
+ return parseUndefDirective(group);
+ if (token == Token_directive_include)
+ return parseIncludeDirective(group);
+ if (token == Token_directive_error)
+ return parseErrorDirective(group);
+ if (token == Token_directive_pragma)
+ return parsePragmaDirective(group);
+
+ return parseNonDirective(group);
+}
+
+// if-section -> if-group elif-groups[opt] else-group[opt] endif-line
+bool Preprocessor::parseIfSection(Item *group)
+{
+ // cout << "parse if section" << endl ;
+ Q_ASSERT(group->toItemComposite());
+ IfSection *ifSection = createNode<IfSection>(m_memoryPool, group);
+ group->toItemComposite()->add(ifSection);
+
+ if (!parseIfGroup(ifSection))
+ return false;
+
+ Type type = lookAheadSkipHash();
+ if(type == Token_directive_elif)
+ if(!parseElifGroups(ifSection))
+ return false;
+
+ type = lookAheadSkipHash();
+ if(type == Token_directive_else)
+ if(!parseElseGroup(ifSection))
+ return false;
+
+ return parseEndifLine(ifSection);
+}
+
+bool Preprocessor::parseNonDirective(Item *group)
+{
+ // cout << "parsenondirective" << endl;
+ Q_ASSERT(group->toItemComposite());
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ NonDirective *nonDirective = createNode<NonDirective>(m_memoryPool, group);
+ group->toItemComposite()->add(nonDirective);
+ nonDirective->setTokenSection(tokenSection);
+ return true;
+}
+
+
+bool Preprocessor::parseTextLine(Item *group)
+{
+ //cout << "parsetextline" << endl;
+ Q_ASSERT(group->toItemComposite());
+ const TokenSection tokenSection = readLine();
+ // cout << tokenSection.fullText().constData() << endl;
+
+ if(tokenSection.count() == 0)
+ return false;
+
+ Text *text = createNode<Text>(m_memoryPool, group);
+ group->toItemComposite()->add(text);
+ text->setTokenSection(tokenSection);
+
+ // Create Token-derived nodes and atach to text
+ QVector<Token *> tokens;
+ tokens.reserve(tokenSection.count());
+ for (int t = 0; t < tokenSection.count(); ++t) {
+ Token *node = 0;
+ const int containerIndex = tokenSection.containerIndex(t);
+ switch(m_tokenTypeList.at(containerIndex)) {
+ case Token_identifier:
+ case Token_defined:
+ case Token_directive_if:
+ case Token_directive_elif:
+ case Token_directive_else:
+ case Token_directive_undef:
+ case Token_directive_endif:
+ case Token_directive_ifdef:
+ case Token_directive_ifndef:
+ case Token_directive_define:
+ case Token_directive_include:
+ node = createNode<IdToken>(m_memoryPool, text);
+ break;
+ case Token_line_comment:
+ node = createNode<LineComment>(m_memoryPool, text);
+ break;
+ case Token_multiline_comment:
+ node = createNode<MultiLineComment>(m_memoryPool, text);
+ break;
+ case Token_whitespaces:
+ case Token_char_literal:
+ case Token_string_literal:
+ default:
+ node = createNode<NonIdToken>(m_memoryPool, text);
+ break;
+ }
+ Q_ASSERT(node);
+ node->setToken(containerIndex);
+ tokens.append(node);
+ }
+
+ text->setTokens(tokens);
+
+ return true;
+}
+
+// if-group -> ifDirective
+// if-group -> ifdefDirevtive
+// if-group -> ifndefDirevtive
+bool Preprocessor::parseIfGroup(IfSection *ifSection)
+{
+ // cout << "parse if group" << endl;
+ Q_ASSERT(ifSection->toItemComposite());
+ bool result;
+ const Type type = lookAheadSkipHash();
+ if (type == Token_directive_ifdef) {
+ IfdefDirective *d = createNode<IfdefDirective>(m_memoryPool, ifSection);
+ result = parseIfdefLikeDirective(d);
+ ifSection->setIfGroup(d);
+ } else if (type == Token_directive_ifndef) {
+ IfndefDirective *d = createNode<IfndefDirective>(m_memoryPool, ifSection);
+ result = parseIfdefLikeDirective(d);
+ ifSection->setIfGroup(d);
+ } else if (type == Token_directive_if) {
+ IfDirective *d = createNode<IfDirective>(m_memoryPool, ifSection);
+ result = parseIfLikeDirective(d);
+ ifSection->setIfGroup(d);
+ } else {
+ result = false;
+ }
+ return result;
+}
+
+bool Preprocessor::parseElifGroups(IfSection *ifSection)
+{
+ //cout << "parse ElifGroups" << endl;
+ bool gotElif = false;
+ while(lookAheadSkipHash() == Token_directive_elif ) {
+ if (!parseElifGroup(ifSection))
+ break;
+ gotElif = true;
+ }
+ return gotElif;
+}
+
+bool Preprocessor::parseElifGroup(IfSection *ifSection)
+{
+ //cout << "parse ElifGroup" << endl;
+ ElifDirective *elifDirective = createNode<ElifDirective>(m_memoryPool, ifSection);
+ ifSection->addElifGroup(elifDirective);
+ return parseIfLikeDirective(elifDirective);
+}
+
+bool Preprocessor::parseElseGroup(IfSection *ifSection)
+{
+ //cout << "parse else group" << endl;
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ ElseDirective *elseDirective = createNode<ElseDirective>(m_memoryPool, ifSection);
+ ifSection->setElseGroup(elseDirective);
+ elseDirective->setTokenSection(tokenSection);
+ parseGroup(elseDirective);
+ return true;
+}
+
+//# endif newline
+bool Preprocessor::parseEndifLine(IfSection *ifSection)
+{
+ //cout << "parse endifline" << endl;
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ EndifDirective *endifDirective = createNode<EndifDirective>(m_memoryPool, ifSection);
+ ifSection->setEndifLine(endifDirective);
+ endifDirective->setTokenSection(tokenSection);
+
+ return true;
+}
+
+//parses an "ifdef-like" directive, like #ifdef and #ifndef :)
+//# ifdef identifier newline group[opt]
+bool Preprocessor::parseIfdefLikeDirective(IfdefLikeDirective *node)
+{
+ Q_ASSERT(node->toItemComposite());
+ const TokenSection tokenSection = readLine();
+ const QVector<int> cleanedLine = cleanTokenRange(tokenSection);
+
+ if(cleanedLine.count() < 3)
+ return false;
+
+ node->setTokenSection(tokenSection);
+ node->setIdentifier(TokenList(m_tokenContainer, QVector<int>() << cleanedLine.at(2)));
+ parseGroup(node);
+
+ return true;
+}
+
+//# if constant-expression newline group[opt]
+bool Preprocessor::parseIfLikeDirective(IfLikeDirective *node)
+{
+ //cout << "parse if-like directive" << endl;
+ Q_ASSERT(node->toItemComposite());
+ TokenSection tokenSection = readLine();
+ QVector<int> cleanedSection = cleanTokenRange(tokenSection);
+ if(cleanedSection.count() < 3)
+ return false;
+
+ cleanedSection.erase(cleanedSection.begin(), cleanedSection.begin() + 2); //remove # and if
+ cleanedSection.pop_back(); //remove endl;
+
+ const TokenList sectionList(m_tokenContainer, cleanedSection);
+ ExpressionBuilder expressionBuilder(sectionList, m_tokenTypeList, m_memoryPool);
+ Expression *expr = expressionBuilder.parse();
+ node->setTokenSection(tokenSection);
+ node->setExpression(expr);
+
+ parseGroup(node);
+ return true;
+}
+
+/*
+ # define identifier replacement-list new-line
+ # define identifier lparen identifier-list[opt] ) replacement-list new-line
+ # define identifier lparen ... ) replacement-list new-line
+ # define identifier lparen identifier-list, ... ) replacement-list new-line
+*/
+bool Preprocessor::parseDefineDirective(Item *group)
+{
+ Q_ASSERT(group->toItemComposite());
+ const TokenSection line = readLine();
+ const QVector<int> cleanedLine = cleanTokenRange(line);
+ if(cleanedLine.count() < 3)
+ return false;
+
+ // get identifier
+ const int identifier = cleanedLine.at(2); //skip "#" and "define"
+ DefineDirective *defineDirective = 0;
+ int replacementListStart;
+
+ // check if this is a macro function
+ if (cleanedLine.count() >= 4
+ && m_tokenContainer.text(cleanedLine.at(3)) == "("
+ && !isWhiteSpace(cleanedLine.at(3) - 1)) {
+ MacroFunctionDefinition *macro;
+ macro = createNode<MacroFunctionDefinition>(m_memoryPool, group);
+
+ int tokenIndex = 4; //point to first argument or ')'
+ QVector<int> macroParameterList;
+ while(tokenIndex < cleanedLine.count()) {
+ QByteArray currentText = m_tokenContainer.text(cleanedLine.at(tokenIndex));
+ ++tokenIndex;
+ if(currentText == ")")
+ break;
+ if(currentText == ",")
+ continue;
+ macroParameterList.append(cleanedLine.at(tokenIndex - 1));
+ }
+ macro->setParameters(TokenList(m_tokenContainer, macroParameterList));
+ defineDirective = macro;
+ replacementListStart = tokenIndex;
+ } else {
+ MacroDefinition *macro;
+ macro = createNode<MacroDefinition>(m_memoryPool, group);
+ defineDirective = macro;
+ replacementListStart = 3;
+ }
+ Q_ASSERT(defineDirective);
+
+ // This is a bit hackish.. we want the replacement list with whitepspace
+ // tokens, but cleanedLine() has already removed those. And we can't use
+ // the original line, because that may contain escaped newline tokens.
+ // So we remove the esacped newlines and search for the token number
+ // given by cleanedLine.at(replacementListStart)
+ QVector<int> replacementList;
+ const QVector<int> noEscNewline = cleanEscapedNewLines(line);
+ if (replacementListStart < cleanedLine.count()) {
+ const int cleanedLineReplacementListStart = cleanedLine.at(replacementListStart);
+ const int rListStart = noEscNewline.indexOf(cleanedLineReplacementListStart);
+ if (rListStart != -1) {
+ const int skipNewLineToken = 1;
+ for (int i = rListStart; i < noEscNewline.count() - skipNewLineToken; ++i) {
+ const int tokenContainerIndex = noEscNewline.at(i);
+ const Type type = m_tokenTypeList.at(tokenContainerIndex);
+ // Don't append comment tokens.
+ if (type != Token_line_comment && type != Token_multiline_comment) {
+ replacementList.append(tokenContainerIndex);
+
+ }
+ }
+ }
+ }
+
+ defineDirective->setTokenSection(line);
+ defineDirective->setIdentifier(TokenList(m_tokenContainer, QVector<int>() << identifier));
+ defineDirective->setReplacementList(TokenList(m_tokenContainer, replacementList));
+ group->toItemComposite()->add(defineDirective);
+ return true;
+}
+
+
+// # undef identifier newline
+bool Preprocessor::parseUndefDirective(Item *group)
+{
+ Q_ASSERT(group->toItemComposite());
+ const TokenSection tokenSection = readLine();
+ const QVector<int> cleanedLine = cleanTokenRange(tokenSection);
+
+ if(cleanedLine.count() < 3)
+ return false;
+
+ UndefDirective *undefDirective = createNode<UndefDirective>(m_memoryPool, group);
+ group->toItemComposite()->add(undefDirective);
+ undefDirective->setIdentifier(TokenList(m_tokenContainer, QVector<int>() << cleanedLine.at(2)));
+ undefDirective->setTokenSection(tokenSection);
+ return true;
+}
+
+//include pp-tokens new-line
+bool Preprocessor::parseIncludeDirective(Item *group)
+{
+ // cout << "parseIncludeDirective" << endl;
+ Q_ASSERT(group->toItemComposite());
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ const TokenEngine::TokenContainer tokenContainer = tokenSection.tokenContainer(0);
+ IncludeDirective *includeDirective = createNode<IncludeDirective>(m_memoryPool, group);
+ group->toItemComposite()->add(includeDirective);
+ includeDirective->setTokenSection(tokenSection);
+
+ //remove whitepspace and comment tokens
+ TokenList tokenList(m_tokenContainer, cleanTokenRange(tokenSection));
+
+ //iterate through the tokens, look for a string literal or a '<'.
+ int tokenIndex = 0;
+ const int endIndex = tokenList.count();
+ while (tokenIndex < endIndex) {
+ const int containerTokenIndex = tokenList.containerIndex(tokenIndex);
+ if(m_tokenTypeList.at(containerTokenIndex) == Token_string_literal) {
+ QByteArray tokenText = tokenList.text(tokenIndex);
+ includeDirective->setFilename(tokenText.mid(1, tokenText.size() -2)); //remove quotes
+ includeDirective->setFilenameTokens(TokenEngine::TokenList(tokenContainer, QVector<int>() << containerTokenIndex));
+ includeDirective->setIncludeType(IncludeDirective::QuoteInclude);
+ break;
+ } else if(tokenList.text(tokenIndex) == "<") {
+ // We found a <, all following tokens until we read a
+ // > is a part of the file anme
+ QByteArray filename;
+ ++tokenIndex; //skip '<'
+ QVector<int> filenameTokens;
+ while(tokenIndex < endIndex) {
+ const QByteArray tokenText = tokenList.text(tokenIndex);
+ if(tokenText == ">")
+ break;
+ filenameTokens.append(tokenList.containerIndex(tokenIndex));
+ filename += tokenText;
+ ++tokenIndex;
+ }
+ if(tokenIndex < endIndex) {
+ includeDirective->setFilename(filename);
+ includeDirective->setFilenameTokens(TokenEngine::TokenList(tokenContainer, filenameTokens));
+ includeDirective->setIncludeType(IncludeDirective::AngleBracketInclude);
+ }
+ break;
+ }
+ ++tokenIndex;
+ }
+
+ return true;
+}
+
+//# error pp-tokens[opt] new-line
+bool Preprocessor::parseErrorDirective(Item *group)
+{
+ Q_ASSERT(group->toItemComposite());
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ ErrorDirective *errorDirective = createNode<ErrorDirective>(m_memoryPool, group);
+ group->toItemComposite()->add(errorDirective);
+ errorDirective->setTokenSection(tokenSection);
+ return true;
+}
+
+//# pragma pp-tokens[opt] new-line
+bool Preprocessor::parsePragmaDirective(Item *group)
+{
+ Q_ASSERT(group->toItemComposite());
+ TokenSection tokenSection = readLine();
+ if(tokenSection.count() == 0)
+ return false;
+
+ PragmaDirective *pragmaDirective = createNode<PragmaDirective>(m_memoryPool, group);
+ group->toItemComposite()->add(pragmaDirective);
+ pragmaDirective->setTokenSection(tokenSection);
+ return true;
+}
+/*
+ Reads a preprocessor line from the source by advancing lexerTokenIndex and
+ returing a TokenSection containg the read line. Text lines separated by
+ an escaped newline are joined.
+*/
+TokenSection Preprocessor::readLine()
+{
+ const int startIndex = lexerTokenIndex;
+ bool gotNewline = false;
+
+ while(isValidIndex(lexerTokenIndex) && !gotNewline) {
+ if(m_tokenTypeList.at(lexerTokenIndex) == Token_newline) {
+ if (lexerTokenIndex == 0 || m_tokenTypeList.at(lexerTokenIndex-1) != '\\') {
+ gotNewline = true;
+ break;
+ }
+ }
+ ++lexerTokenIndex;
+ }
+
+ if(gotNewline)
+ ++lexerTokenIndex; //include newline
+ else
+ emit error(QLatin1String("Error"), QLatin1String("Unexpected end of source"));
+
+ return TokenSection(m_tokenContainer, startIndex, lexerTokenIndex - startIndex);
+}
+
+/*
+ Returns false if index is past the end of m_tokenContainer.
+*/
+inline bool Preprocessor::isValidIndex(const int index) const
+{
+ return (index < m_tokenContainer.count());
+}
+
+/*
+ Returns true if the token at index is a whitepsace token.
+*/
+inline bool Preprocessor::isWhiteSpace(const int index) const
+{
+ return (m_tokenTypeList.at(index) == Token_whitespaces);
+}
+
+/*
+ Looks ahead from lexerTokenIndex, returns the token type found at the first
+ token that is not a comment or whitespace token.
+*/
+Type Preprocessor::lookAhead() const
+{
+ const int index = skipWhiteSpaceAndComments();
+ if (index == -1)
+ return Token_eof;
+ return m_tokenTypeList.at(index);
+}
+/*
+ Looks ahead from lexerTokenIndex, returns the token type found at the first
+ token that is not a comment, whitespace or '#' token.
+*/
+Type Preprocessor::lookAheadSkipHash() const
+{
+ const int index = skipWhiteSpaceCommentsHash();
+ if (index == -1)
+ return Token_eof;
+ return m_tokenTypeList.at(index);
+}
+
+/*
+ Returns the index for the first token after lexerTokenIndex that is not a
+ whitespace or comment token.
+*/
+inline int Preprocessor::skipWhiteSpaceAndComments() const
+{
+ int index = lexerTokenIndex;
+ if(!isValidIndex(index))
+ return -1;
+ while(m_tokenTypeList.at(index) == Token_whitespaces
+ || m_tokenTypeList.at(index) == Token_comment
+ || m_tokenTypeList.at(index) == Token_line_comment
+ || m_tokenTypeList.at(index) == Token_multiline_comment ) {
+ ++index;
+ if(!isValidIndex(index))
+ return -1;
+ }
+ return index;
+}
+
+/*
+ Returns the index for the first token after lexerTokenIndex that is not a
+ whitespace, comment or '#' token.
+*/
+inline int Preprocessor::skipWhiteSpaceCommentsHash() const
+{
+ int index = lexerTokenIndex;
+ if(!isValidIndex(index))
+ return -1;
+ while(m_tokenTypeList.at(index) == Token_whitespaces
+ || m_tokenTypeList.at(index) == Token_comment
+ || m_tokenTypeList.at(index) == Token_line_comment
+ || m_tokenTypeList.at(index) == Token_multiline_comment
+ || m_tokenTypeList.at(index) == Token_preproc ) {
+ ++index;
+ if(!isValidIndex(index))
+ return -1;
+ }
+ return index;
+}
+
+/*
+ Removes escaped newlines from tokenSection. Both the escape token ('\')
+ and the newline token ('\n') are removed.
+*/
+QVector<int> Preprocessor::cleanEscapedNewLines(const TokenSection &tokenSection) const
+{
+ QVector<int> indexList;
+
+ int t = 0;
+ const int numTokens = tokenSection.count();
+ while (t < numTokens) {
+ const int containerIndex = tokenSection.containerIndex(t);
+ const int currentToken = t;
+ ++t;
+
+ //handle escaped newlines
+ if (tokenSection.text(currentToken) == "\\"
+ && currentToken + 1 < numTokens
+ && m_tokenTypeList.at(containerIndex + 1) == Token_newline)
+ continue;
+
+ indexList.append(containerIndex);
+ }
+ return indexList;
+}
+
+/*
+ Removes escaped newlines, whitespace and comment tokens from tokenSection
+*/
+QVector<int> Preprocessor::cleanTokenRange(const TokenSection &tokenSection) const
+{
+ QVector<int> indexList;
+
+ int t = 0;
+ const int numTokens = tokenSection.count();
+ while (t < numTokens) {
+ const int containerIndex = tokenSection.containerIndex(t);
+ const Type tokenType = m_tokenTypeList.at(containerIndex);
+ const int currentToken = t;
+ ++t;
+
+ if(tokenType == Token_whitespaces ||
+ tokenType == Token_line_comment ||
+ tokenType == Token_multiline_comment )
+ continue;
+
+ //handle escaped newlines
+ if(tokenSection.text(currentToken) == "\\" &&
+ currentToken + 1 < numTokens &&
+ m_tokenTypeList.at(containerIndex + 1) == Token_newline)
+ continue;
+
+ indexList.append(containerIndex);
+ }
+ return indexList;
+}
+/*
+ Returns the text for an Item node and all its children.
+*/
+QByteArray visitGetText(Item *item)
+{
+ QByteArray text;
+
+ text += item->text().fullText();
+
+ if(item->toItemComposite()) {
+ ItemComposite *composite = item->toItemComposite();
+ for (int i=0; i <composite->count(); ++i)
+ text += visitGetText(composite->item(i));
+ }
+
+ return text;
+}
+
+void Source::setFileName(const QString &fileName)
+{
+ m_fileName = fileName;
+}
+
+} // namespace Rpp
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/rpp.h b/tools/porting/src/rpp.h
new file mode 100644
index 0000000..ae19e27
--- /dev/null
+++ b/tools/porting/src/rpp.h
@@ -0,0 +1,1072 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RPP_H
+#define RPP_H
+
+#include "tokenengine.h"
+#include "rpplexer.h"
+#include "tokens.h"
+#include "smallobject.h"
+#include <QHash>
+#include <QStringList>
+#include <QFile>
+#include <QByteArray>
+#include <QDir>
+#include <QMultiMap>
+#include <ctype.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp
+{
+
+struct Item;
+struct ItemComposite;
+
+struct Source;
+
+struct Directive;
+struct EmptyDirective;
+struct ErrorDirective;
+struct PragmaDirective;
+struct IncludeDirective;
+struct ConditionalDirective;
+struct DefineDirective;
+struct UndefDirective;
+struct LineDirective;
+struct NonDirective;
+
+struct IfSection;
+struct IfLikeDirective;
+struct IfDirective;
+struct ElifDirective;
+struct IfdefLikeDirective;
+struct IfdefDirective;
+struct IfndefDirective;
+struct ElseDirective;
+struct EndifDirective;
+
+struct Text;
+struct Token;
+struct TokenComposite;
+struct IdToken;
+struct NonIdToken;
+struct PastingToken;
+struct LineComment;
+struct MultiLineComment;
+struct WhiteSpace;
+
+struct MacroDefinition;
+struct MacroFunctionDefinition;
+struct MacroParameters;
+struct MacroParameter;
+
+struct Expression;
+struct UnaryExpression;
+struct BinaryExpression;
+struct ConditionalExpression;
+
+struct StringLiteral;
+struct IntLiteral;
+struct MacroReference;
+struct MacroFunctionReference;
+struct MacroArguments;
+struct MacroArgument;
+
+struct Item
+{
+ virtual ~Item() {}
+
+ virtual Item *parent() const = 0;
+
+ virtual ItemComposite *toItemComposite() const
+ { return 0; }
+
+ virtual Item *toItem() const
+ { return const_cast<Item *>(this); }
+
+ virtual Directive *toDirective() const
+ { return 0; }
+
+ virtual Text *toText() const
+ { return 0; }
+
+ virtual Token *toToken() const
+ { return 0; }
+
+ virtual Source *toSource() const
+ { return 0; }
+
+ virtual Expression *toExpression() const
+ { return 0; }
+
+ virtual IfSection *toIfSection() const
+ { return 0; }
+
+ // Text returns the original text for an item, e.g.
+ // the way it is found in the source
+ virtual TokenEngine::TokenSection text() const
+ { return TokenEngine::TokenSection(); }
+
+protected:
+ //using the default constructor for an item is
+ //only allowded for subclasses.
+ Item() {};
+};
+
+struct ItemComposite
+{
+ virtual ~ItemComposite() {}
+ virtual int count() const = 0;
+ virtual Item *item(int index) const = 0;
+ virtual void add(Item *item) = 0;
+/*
+ Classes that inherit ItemComposite must implement this
+ function themselves
+ virtual ItemComposite *toItemComposite() const
+ { return const_cast<ItemComposite *>(this); }
+*/
+};
+
+struct Directive: public Item
+{
+ inline Directive(Item *parent = 0)
+ : m_parent(parent), m_numLines(0) {}
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ inline void setParent(Item *parent)
+ { m_parent = parent;}
+
+ void setNumLines(const int numLines)
+ {m_numLines = numLines;}
+
+ virtual Directive *toDirective() const
+ { return const_cast<Directive *>(this); }
+
+ virtual EmptyDirective *toEmptyDirective() const
+ { return 0; }
+
+ virtual ErrorDirective *toErrorDirective() const
+ { return 0; }
+
+ virtual PragmaDirective *toPragmaDirective() const
+ { return 0; }
+
+ virtual IncludeDirective *toIncludeDirective() const
+ { return 0; }
+
+ virtual ConditionalDirective *toConditionalDirective() const
+ { return 0; }
+
+ virtual DefineDirective *toDefineDirective() const
+ { return 0; }
+
+ virtual UndefDirective *toUndefDirective() const
+ { return 0; }
+
+ virtual LineDirective *toLineDirective() const
+ { return 0; }
+
+ virtual NonDirective *toNonDirective() const
+ { return 0; }
+
+ void setTokenSection(TokenEngine::TokenSection section)
+ { m_tokenSection = section; }
+
+ TokenEngine::TokenSection text() const
+ { return m_tokenSection; }
+
+protected:
+ Item *m_parent;
+ int m_numLines;
+ TokenEngine::TokenSection m_tokenSection;
+};
+
+
+struct Token: public Item
+{
+ inline Token(Item *parent = 0)
+ : m_tokenIndex(0), m_parent(parent) {}
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ virtual MacroArguments *toMacroArguments() const
+ { return 0; }
+
+ virtual IdToken *toIdToken() const
+ { return 0; }
+
+ virtual NonIdToken *toNonIdToken() const
+ { return 0; }
+
+ virtual LineComment *toLineComment() const
+ { return 0; }
+
+ virtual MultiLineComment *toMultiLineComment() const
+ { return 0; }
+
+ virtual WhiteSpace *toWhiteSpace() const
+ { return 0; }
+
+ virtual Token *toToken() const
+ { return const_cast<Token *>(this); }
+
+ void setToken(int tokenIndex)
+ { m_tokenIndex = tokenIndex;}
+
+ int index() const
+ { return m_tokenIndex; }
+
+protected:
+ int m_tokenIndex;
+ Item *m_parent;
+};
+
+struct Text: public Item
+{
+ inline Text(Item *parent = 0)
+ : m_parent(parent) {}
+
+ virtual Text *toText() const
+ { return const_cast<Text *>(this); }
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ void setTokenSection(TokenEngine::TokenSection tokenSection)
+ {m_tokenSection = tokenSection; }
+
+ TokenEngine::TokenSection text() const
+ { return m_tokenSection; }
+
+ QVector<TokenEngine::TokenSection> cleanedText() const
+ { return m_cleanedSection; }
+
+ void setTokens( const QVector<Token *> &tokens )
+ { m_tokens = tokens; }
+
+ void addToken(Token *token)
+ {m_tokens.append(token);}
+
+ Token *token(int index) const
+ {return m_tokens.at(index);}
+
+ inline int count() const
+ {return m_tokens.count();}
+
+ QVector<Token *> tokenList() const
+ { return m_tokens; }
+
+protected:
+ Item *m_parent;
+ TokenEngine::TokenSection m_tokenSection; // all tokens
+ QVector<TokenEngine::TokenSection> m_cleanedSection; //comments removed
+ QVector<Token *> m_tokens;
+};
+
+struct IdToken: public Token
+{
+ inline IdToken(Item *parent = 0)
+ : Token(parent) {}
+
+ virtual IdToken *toIdToken() const
+ { return const_cast<IdToken *>(this); }
+};
+
+struct NonIdToken: public Token
+{
+ inline NonIdToken(Item *parent = 0)
+ : Token(parent) {}
+
+ virtual NonIdToken *toNonIdToken() const
+ { return const_cast< NonIdToken *>(this); }
+};
+
+struct LineComment : public NonIdToken
+{
+ inline LineComment(Item *parent = 0)
+ : NonIdToken(parent) {}
+
+ virtual LineComment *toLineComment() const
+ { return const_cast< LineComment *>(this); }
+};
+
+struct MultiLineComment: public NonIdToken
+{
+ inline MultiLineComment(Item *parent = 0)
+ : NonIdToken(parent) {}
+
+ virtual MultiLineComment *toMultiLineComment() const
+ { return const_cast< MultiLineComment *>(this); }
+protected:
+};
+
+struct WhiteSpace: public NonIdToken
+{
+ inline WhiteSpace(Item *parent = 0)
+ : NonIdToken(parent) {}
+
+ virtual WhiteSpace *toWhiteSpace() const
+ { return const_cast<WhiteSpace *>(this); }
+};
+
+struct Source: public Item, public ItemComposite
+{
+ Source(Item *parent = 0)
+ :m_parent(parent) {}
+
+ virtual Source *toSource() const
+ { return const_cast<Source *>(this); }
+
+ ItemComposite *toItemComposite() const
+ { return const_cast<Source *>(this); }
+
+ virtual int count() const
+ { return m_items.count(); }
+
+ virtual Item *item(int index) const
+ { return m_items.at(index); }
+
+ inline QString fileName() const
+ { return m_fileName; }
+
+ void setFileName(const QString &fileName);
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ inline void add(Item *item)
+ { m_items.append(item); }
+
+private:
+ Item *m_parent;
+ QVector<Item *> m_items;
+ QString m_fileName;
+};
+
+struct EmptyDirective: public Directive
+{
+ EmptyDirective(Item *item)
+ : Directive(item) {}
+
+ virtual EmptyDirective *toEmptyDirective() const
+ { return const_cast<EmptyDirective *>(this); }
+};
+
+struct ErrorDirective: public Directive
+{
+ ErrorDirective(Item *item)
+ : Directive(item) {}
+
+ virtual ErrorDirective *toErrorDirective() const
+ { return const_cast<ErrorDirective *>(this); }
+};
+
+struct PragmaDirective: public Directive
+{
+ PragmaDirective(Item *item)
+ : Directive(item) {}
+
+ virtual PragmaDirective *toPragmaDirective() const
+ { return const_cast<PragmaDirective *>(this); }
+};
+
+struct IncludeDirective: public Directive
+{
+ enum IncludeType {QuoteInclude, AngleBracketInclude};
+
+ IncludeDirective(Item *item)
+ : Directive(item), m_includeType(QuoteInclude) {}
+
+ IncludeDirective() : Directive() {}
+
+ virtual IncludeDirective *toIncludeDirective() const
+ { return const_cast<IncludeDirective *>(this); }
+
+ void setFilenameTokens(const TokenEngine::TokenList &filenameTokens)
+ { m_filenameTokens = filenameTokens; }
+
+ TokenEngine::TokenList filenameTokens() const
+ { return m_filenameTokens; }
+
+ void setFilename(const QByteArray &filename)
+ { m_filename = filename; }
+
+ QByteArray filename() const
+ { return m_filename;}
+
+ void setIncludeType(IncludeType includeType)
+ { m_includeType = includeType; }
+
+ IncludeType includeType() const
+ { return m_includeType; }
+private:
+ TokenEngine::TokenList m_filenameTokens;
+ QByteArray m_filename;
+ IncludeType m_includeType;
+};
+
+struct ConditionalDirective: public Directive, public ItemComposite
+{
+ inline ConditionalDirective(Item *parent = 0)
+ :Directive(parent) {}
+
+ virtual ConditionalDirective *toConditionalDirective() const
+ { return const_cast<ConditionalDirective *>(this); }
+
+ ItemComposite *toItemComposite() const
+ { return const_cast<ConditionalDirective *>(this); }
+
+ virtual IfDirective *toIfDirective() const
+ { return 0; }
+
+ virtual IfdefDirective *toIfdefDirective() const
+ { return 0; }
+
+ virtual IfndefDirective *toIfndefDirective() const
+ { return 0; }
+
+ virtual ElifDirective *toElifDirective() const
+ { return 0; }
+
+ virtual ElseDirective *toElseDirective() const
+ { return 0; }
+
+ int count() const
+ { return m_items.count(); }
+
+ Item *item(int index) const
+ { return m_items.at(index); }
+
+ void add(Item *item)
+ { m_items.append(item); }
+protected:
+ QVector<Item *> m_items;
+};
+
+struct IfSection: public Item, public ItemComposite
+{
+ IfSection(Item *parent)
+ :m_parent(parent), m_ifGroup(0), m_elseGroup(0), m_endifLine(0) {}
+
+ IfSection *toIfSection() const
+ { return const_cast<IfSection *>(this); }
+
+ ItemComposite *toItemComposite() const
+ { return const_cast<IfSection *>(this); }
+
+ void setParent(Item *parent)
+ { m_parent = parent; }
+
+ Item *parent() const
+ { return m_parent; }
+
+ void setIfGroup(ConditionalDirective *ifGroup)
+ { m_ifGroup = ifGroup; m_items.append(ifGroup); }
+
+ ConditionalDirective *ifGroup() const
+ { return m_ifGroup; }
+
+ void addElifGroup(ConditionalDirective *elifGroup)
+ { m_elifGroups.append(elifGroup); m_items.append(elifGroup); }
+
+ QVector<ConditionalDirective *> elifGroups() const
+ { return m_elifGroups; }
+
+ void setElseGroup(ConditionalDirective *elseGroup)
+ { m_elseGroup = elseGroup; m_items.append(elseGroup); }
+
+ ConditionalDirective *elseGroup() const
+ { return m_elseGroup; }
+
+ void setEndifLine(Directive *endifLine)
+ { m_endifLine = endifLine; m_items.append(endifLine); }
+
+ Directive *endifLine() const
+ { return m_endifLine; }
+
+ int count() const
+ { return m_items.count(); }
+
+ Item *item(int index) const
+ { return m_items.at(index);}
+
+ private:
+ void add(Item *item)
+ { Q_UNUSED(item); }
+
+ Item *m_parent;
+ QVector<Item *> m_items;
+ ConditionalDirective *m_ifGroup;
+ QVector<ConditionalDirective *> m_elifGroups;
+ ConditionalDirective *m_elseGroup;
+ Directive *m_endifLine;
+};
+
+struct Expression: public Item
+{
+ enum Operator
+ {
+ LtEqOp = 300,
+ GtEqOp,
+ LtOp,
+ GtOp,
+ EqOp,
+ NotEqOp,
+ OrOp,
+ AndOp,
+ LShiftOp,
+ RShiftOp
+ };
+
+ inline Expression(Item *parent = 0)
+ : m_parent(parent) {}
+
+ inline Expression *parentExpression() const
+ { return m_parent ? m_parent->toExpression() : 0; }
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ virtual Expression *toExpression() const
+ { return const_cast<Expression *>(this); }
+
+ virtual UnaryExpression *toUnaryExpression() const
+ { return 0; }
+
+ virtual BinaryExpression *toBinaryExpression() const
+ { return 0; }
+
+ virtual StringLiteral *toStringLiteral() const
+ { return 0; }
+
+ virtual IntLiteral *toIntLiteral() const
+ { return 0; }
+
+ virtual MacroReference *toMacroReference() const
+ { return 0; }
+
+ virtual MacroFunctionReference *toMacroFunctionReference() const
+ { return 0; }
+
+ virtual ConditionalExpression *toConditionalExpression() const
+ { return 0; }
+
+ int evaluate(bool *ok = 0);
+
+private:
+ Item *m_parent;
+};
+
+struct StringLiteral: public Expression
+{
+ inline StringLiteral(const QByteArray &value, Item *parent)
+ : Expression(parent), m_value(value) {}
+
+ QByteArray value() const
+ { return m_value; }
+
+ virtual StringLiteral *toStringLiteral() const
+ { return const_cast<StringLiteral *>(this); }
+
+private:
+ QByteArray m_value;
+};
+
+struct IntLiteral: public Expression
+{
+ inline IntLiteral(int value, Item *parent = 0)
+ : Expression(parent), m_value(value) {}
+
+ inline int value() const
+ { return m_value; }
+
+ virtual IntLiteral *toIntLiteral() const
+ { return const_cast<IntLiteral *>(this); }
+
+private:
+ int m_value;
+};
+
+struct MacroReference: public Expression
+{
+ enum Type {
+ DefinedRef, //#if defined(foo)
+ ValueRef
+ };
+
+ inline MacroReference(const TokenEngine::TokenList &name, Type type, Item *parent = 0)
+ : Expression(parent), m_type(type), m_name(name) {}
+
+ virtual MacroReference *toMacroReference() const
+ { return const_cast<MacroReference *>(this); }
+
+ inline TokenEngine::TokenList name() const
+ { return m_name; }
+
+ inline void setName(const TokenEngine::TokenList &name)
+ { m_name = name; }
+
+ inline int type() const
+ { return m_type; }
+
+private:
+ int m_type;
+ TokenEngine::TokenList m_name;
+};
+
+struct MacroFunctionReference: public Expression
+{
+ MacroFunctionReference(const QByteArray &name, Item *parent);
+
+ inline QByteArray name() const
+ { return m_name; }
+
+ inline void setName(const QByteArray &name)
+ { m_name = name; }
+
+ inline MacroArguments *arguments() const
+ { return m_arguments; }
+
+ virtual MacroFunctionReference *toMacroFunctionReference() const
+ { return const_cast<MacroFunctionReference *>(this); }
+
+private:
+ QByteArray m_name;
+ MacroArguments *m_arguments;
+};
+
+struct UnaryExpression: public Expression
+{
+ inline UnaryExpression(int op, Expression *e, Expression *parent = 0)
+ : Expression(parent), m_op(op), m_expression(e) {}
+
+ inline int op() const
+ { return m_op; }
+
+ inline Expression *expression() const
+ { return m_expression; }
+
+ virtual UnaryExpression *toUnaryExpression() const
+ { return const_cast<UnaryExpression *>(this); }
+
+private:
+ int m_op;
+ Expression *m_expression;
+};
+
+struct BinaryExpression: public Expression
+{
+ inline BinaryExpression(int op, Expression *left, Expression *right, Expression *parent = 0)
+ : Expression(parent),
+ m_op(op),
+ m_leftExpression(left),
+ m_rightExpression(right) {}
+
+ inline int op() const
+ { return m_op; }
+
+ inline Expression *leftExpression() const
+ { return m_leftExpression; }
+
+ inline Expression *rightExpression() const
+ { return m_rightExpression; }
+
+ virtual BinaryExpression *toBinaryExpression() const
+ { return const_cast<BinaryExpression *>(this); }
+
+private:
+ int m_op;
+ Expression *m_leftExpression;
+ Expression *m_rightExpression;
+};
+
+struct ConditionalExpression: public Expression
+{
+ inline ConditionalExpression(Expression *condition, Expression *left, Expression *right, Expression *parent = 0)
+ : Expression(parent),
+ m_condition(condition),
+ m_leftExpression(left),
+ m_rightExpression(right) {}
+
+ inline Expression *condition() const
+ { return m_condition; }
+
+ inline Expression *leftExpression() const
+ { return m_leftExpression; }
+
+ inline Expression *rightExpression() const
+ { return m_rightExpression; }
+
+ virtual ConditionalExpression *toConditionalExpression() const
+ { return const_cast<ConditionalExpression *>(this); }
+
+private:
+ Expression *m_condition;
+ Expression *m_leftExpression;
+ Expression *m_rightExpression;
+};
+
+
+struct IfLikeDirective: public ConditionalDirective
+{
+ inline IfLikeDirective(Item *parent = 0)
+ :ConditionalDirective(parent), m_expression(0) {}
+
+ void setExpression(Expression *expression)
+ { m_expression = expression; }
+
+ Expression *expression() const
+ { return m_expression; }
+
+protected:
+ Expression *m_expression;
+};
+
+struct IfDirective: public IfLikeDirective
+{
+ inline IfDirective(Item *parent = 0)
+ :IfLikeDirective(parent) {}
+
+ virtual IfDirective *toIfDirective() const
+ { return const_cast<IfDirective *>(this); }
+};
+
+
+struct ElifDirective: public IfLikeDirective
+{
+ inline ElifDirective(Item *parent = 0)
+ :IfLikeDirective(parent) {}
+
+ virtual ElifDirective *toElifDirective() const
+ { return const_cast<ElifDirective *>(this); }
+};
+
+struct IfdefLikeDirective: public ConditionalDirective
+{
+ inline IfdefLikeDirective(Item *parent = 0)
+ :ConditionalDirective(parent) {}
+
+ inline TokenEngine::TokenList identifier() const
+ { return m_identifier; }
+
+ inline void setIdentifier(const TokenEngine::TokenList &identifier)
+ { m_identifier = identifier; }
+protected:
+ TokenEngine::TokenList m_identifier;
+};
+
+struct IfdefDirective: public IfdefLikeDirective
+{
+ IfdefDirective(Item *parent)
+ :IfdefLikeDirective(parent) {}
+
+ virtual IfdefDirective *toIfdefDirective() const
+ { return const_cast<IfdefDirective *>(this); }
+};
+
+struct IfndefDirective: public IfdefLikeDirective
+{
+ inline IfndefDirective(Item *parent)
+ :IfdefLikeDirective(parent) {}
+
+ virtual IfndefDirective *toIfndefDirective() const
+ { return const_cast<IfndefDirective *>(this); }
+};
+
+struct ElseDirective: public ConditionalDirective
+{
+ ElseDirective(Item *parent)
+ :ConditionalDirective(parent) {}
+
+ virtual ElseDirective *toElseDirective() const
+ { return const_cast<ElseDirective *>(this); }
+};
+
+struct EndifDirective : public Directive
+{
+ EndifDirective(Item *parent)
+ :Directive(parent) {}
+
+ EndifDirective *toEndifDirective() const
+ { return const_cast<EndifDirective *>(this); }
+};
+
+struct DefineDirective: public Directive
+{
+ DefineDirective(Item *parent)
+ : Directive(parent) {};
+
+ inline TokenEngine::TokenList identifier() const
+ { return m_identifier; }
+
+ inline void setIdentifier(TokenEngine::TokenList identifier)
+ { m_identifier = identifier; }
+
+ inline void setReplacementList(TokenEngine::TokenList replacementList)
+ { m_replacementList = replacementList; }
+
+ inline TokenEngine::TokenList replacementList() const
+ { return m_replacementList; }
+
+ virtual DefineDirective *toDefineDirective() const
+ { return const_cast<DefineDirective *>(this); }
+
+ virtual MacroDefinition *toMacroDefinition() const
+ { return 0; }
+
+ virtual MacroFunctionDefinition *toMacroFunctionDefinition() const
+ { return 0; }
+private:
+ TokenEngine::TokenList m_identifier;
+ TokenEngine::TokenList m_replacementList;
+};
+
+struct MacroDefinition: public DefineDirective
+{
+ MacroDefinition(Item *parent)
+ : DefineDirective(parent) {};
+
+ virtual MacroDefinition *toMacroDefinition() const
+ { return const_cast<MacroDefinition *>(this); }
+};
+
+struct MacroFunctionDefinition: public DefineDirective
+{
+ MacroFunctionDefinition(Item *parent)
+ : DefineDirective(parent) {}
+
+ virtual MacroFunctionDefinition *toMacroFunctionDefinition() const
+ { return const_cast<MacroFunctionDefinition *>(this); }
+
+ void setParameters(TokenEngine::TokenList macroParameters)
+ { m_parameters = macroParameters;}
+
+ inline TokenEngine::TokenList parameters() const
+ { return m_parameters; }
+
+private:
+ TokenEngine::TokenList m_parameters;
+};
+
+struct MacroParameter: public Item
+{
+ inline MacroParameter(Item *parent)
+ : m_parent(parent) {}
+
+ inline QByteArray name() const
+ { return m_name; }
+
+ inline void setName(const QByteArray &name)
+ { m_name = name; }
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+private:
+ Item *m_parent;
+ QByteArray m_name;
+};
+
+struct MacroParameters: public Item, public ItemComposite
+{
+ MacroParameters(MacroFunctionDefinition *parent)
+ : m_parent(parent) {}
+
+ ItemComposite *toItemComposite() const
+ { return const_cast<MacroParameters *>(this); }
+
+ virtual Item *parent() const
+ { return m_parent; }
+
+ virtual int count() const
+ { return m_items.count(); }
+
+ virtual Item *item(int index) const
+ { return m_items.at(index); }
+
+ void addParameter(MacroParameter *param)
+ { Q_ASSERT(param->parent() == this); m_items.append(param); }
+
+ int indexOf(const QByteArray &param) const
+ {
+ for (int i=0; i<m_items.count(); ++i) {
+ // cout <<"checking |" << param.constData() << "| against |" << m_items.at(i)->name().constData() <<"|" << endl;
+ if (m_items.at(i)->name() == param)
+ return i;
+ }
+ return -1;
+ }
+
+ inline bool contains(const QByteArray &param) const
+ { return indexOf(param) != -1; }
+/*
+ void add(const QByteArray &param)
+ {
+ MacroParameter *p = createNode<MacroParameter>(this);
+ p->setName(param);
+ addParameter(p);
+ }
+*/
+private:
+ MacroFunctionDefinition *m_parent;
+ QVector<MacroParameter*> m_items;
+};
+
+struct UndefDirective: public Directive
+{
+ UndefDirective(Item *parent)
+ :Directive(parent) {}
+
+ inline TokenEngine::TokenList identifier() const
+ { return m_identifier; }
+
+ inline void setIdentifier(const TokenEngine::TokenList &identifier)
+ { m_identifier = identifier; }
+
+ virtual UndefDirective *toUndefDirective() const
+ { return const_cast<UndefDirective *>(this); }
+private:
+ TokenEngine::TokenList m_identifier;
+};
+
+struct LineDirective: public Directive
+{
+ LineDirective(Item *parent)
+ :Directive(parent) {}
+
+ virtual LineDirective *toLineDirective() const
+ { return const_cast<LineDirective *>(this); }
+};
+
+struct NonDirective: public Directive
+{
+ NonDirective(Item *parent)
+ :Directive(parent) {}
+
+ virtual NonDirective *toNonDirective() const
+ { return const_cast<NonDirective *>(this); }
+};
+
+class Preprocessor : public QObject
+{
+Q_OBJECT
+public:
+ Preprocessor();
+ Source *parse(const TokenEngine::TokenContainer &tokenContainer,
+ const QVector<Type> &tokenTypeList, TypedPool<Item> *memoryPool);
+signals:
+ void error(const QString type, const QString message);
+private:
+ bool parseGroup(Item *node);
+ bool parseGroupPart(Item *node);
+
+ bool parseIfSection(Item *node);
+ bool parseNonDirective(Item *node);
+ bool parseTextLine(Item *node);
+
+ bool parseIfGroup(IfSection *node);
+ bool parseElifGroups(IfSection *node);
+ bool parseElifGroup(IfSection *node);
+ bool parseElseGroup(IfSection *node);
+ bool parseEndifLine(IfSection *node);
+
+ bool parseIfdefLikeDirective(IfdefLikeDirective *node);
+ bool parseIfLikeDirective(IfLikeDirective *node);
+
+ bool parseDefineDirective(Item *node);
+ bool parseUndefDirective(Item *node);
+ bool parseIncludeDirective(Item *node);
+ bool parseErrorDirective(Item *node);
+ bool parsePragmaDirective(Item*node);
+
+ TokenEngine::TokenSection readLine();
+ inline bool isValidIndex(const int index) const;
+ inline bool isWhiteSpace(const int index) const;
+ Type lookAhead() const;
+ Type lookAheadSkipHash() const;
+ inline int skipWhiteSpaceAndComments() const;
+ inline int skipWhiteSpaceCommentsHash() const;
+ QVector<int> cleanEscapedNewLines(const TokenEngine::TokenSection &tokenSection) const;
+ QVector<int> cleanTokenRange(const TokenEngine::TokenSection &tokenSection) const;
+
+ Source *m_source;
+ TokenEngine::TokenContainer m_tokenContainer;
+ QVector<Type> m_tokenTypeList;
+ TypedPool<Item> *m_memoryPool;
+ int lexerTokenIndex;
+ int numTokens;
+};
+
+/*
+ T must be a subclass of Item, parent must implment
+ the ItemComposite interface
+*/
+template <typename T>
+T *createNode(TypedPool<Item> *memPool, Item *parent)
+{
+ Q_ASSERT(parent);
+ T* node = new (memPool->allocate(sizeof(T))) T(parent);
+ Q_ASSERT(node);
+ return node;
+}
+
+template <typename T>
+T *createNode(TypedPool<Item> *memPool)
+{
+ T* node = new (memPool->allocate(sizeof(T))) T(0);
+ Q_ASSERT(node);
+ return node;
+}
+
+
+QByteArray visitGetText(Item *item);
+
+} // namespace Rpp
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/rppexpressionbuilder.cpp b/tools/porting/src/rppexpressionbuilder.cpp
new file mode 100644
index 0000000..6695924
--- /dev/null
+++ b/tools/porting/src/rppexpressionbuilder.cpp
@@ -0,0 +1,330 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rppexpressionbuilder.h"
+#include "tokens.h"
+#include "rpp.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+namespace Rpp {
+
+ExpressionBuilder::ExpressionBuilder(const TokenList &tokenList, const QVector<Type> &typeList, TypedPool<Item> *memoryPool)
+:i(0)
+,m_tokenList(tokenList)
+,m_typeList(typeList)
+,m_memoryPool(memoryPool)
+{}
+
+Rpp::Expression *ExpressionBuilder::parse()
+{
+ if(unary_expression_lookup())
+ return conditional_expression();
+ else
+ return createIntLiteral(0);
+}
+Type ExpressionBuilder::next()
+{
+ if(!hasNext())
+ return Token_eof;
+ return typeAt(i++);
+}
+
+inline bool ExpressionBuilder::test(int token)
+{
+ if (i < m_tokenList.count() && typeAt(i) == token) {
+ ++i;
+ return true;
+ }
+ return false;
+}
+
+inline bool ExpressionBuilder::moreTokens(int delta)
+{
+ return (i + delta < m_tokenList.count());
+}
+
+inline Type ExpressionBuilder::lookup(int k)
+{
+ const int l = i - 1 + k;
+ return l < m_tokenList.count() ? typeAt(l) : Token_eof;
+}
+
+Expression *ExpressionBuilder::conditional_expression()
+{
+ Expression *value = logical_OR_expression();
+ if (test('?')) {
+ Expression *leftExpression = conditional_expression();
+ Expression *rightExpression;
+ if(test(':'))
+ rightExpression = conditional_expression();
+ else
+ rightExpression = createIntLiteral(0);
+ return createConditionalExpression(value, leftExpression, rightExpression);
+ }
+ return value;
+}
+
+Expression *ExpressionBuilder::logical_OR_expression()
+{
+ Expression *value = logical_AND_expression();
+ if (test(Token_or))
+ return createBinaryExpression(Expression::OrOp, value, logical_OR_expression());
+ return value;
+}
+
+Expression *ExpressionBuilder::logical_AND_expression()
+{
+ Expression *value = inclusive_OR_expression();
+ if (test(Token_and))
+ return createBinaryExpression(Expression::AndOp, value, logical_AND_expression());
+ return value;
+}
+
+Expression *ExpressionBuilder::inclusive_OR_expression()
+{
+ Expression *value = exclusive_OR_expression();
+ if (test('|'))
+ return createBinaryExpression('|', value, inclusive_OR_expression());
+ return value;
+}
+
+Expression *ExpressionBuilder::exclusive_OR_expression()
+{
+ Expression *value = AND_expression();
+ if (test('^'))
+ return createBinaryExpression('^', value, exclusive_OR_expression());
+ return value;
+}
+
+Expression *ExpressionBuilder::AND_expression()
+{
+ Expression *value = equality_expression();
+ if (test('&'))
+ return createBinaryExpression('&', value, AND_expression());
+ return value;
+}
+
+Expression *ExpressionBuilder::equality_expression()
+{
+ Expression *value = relational_expression();
+ switch (next()) {
+ case Token_eq:
+ return createBinaryExpression(Expression::EqOp, value, equality_expression());
+ case Token_not_eq:
+ return createBinaryExpression(Expression::NotEqOp, value, equality_expression());
+ default:
+ prev();
+ return value;
+ }
+}
+
+Expression *ExpressionBuilder::relational_expression()
+{
+ Expression *value = shift_expression();
+ switch (next()) {
+ case '<':
+ return createBinaryExpression('<', value, relational_expression());
+ case '>':
+ return createBinaryExpression('>', value, relational_expression());
+ case Token_leq:
+ return createBinaryExpression(Expression::LtEqOp, value, relational_expression());
+ case Token_geq:
+ return createBinaryExpression(Expression::GtEqOp, value, relational_expression());
+ default:
+ prev();
+ return value;
+ }
+}
+
+Expression *ExpressionBuilder::shift_expression()
+{
+ Expression *value = additive_expression();
+ switch (next()) {
+ case Token_left_shift:
+ return createBinaryExpression(Expression::LShiftOp, value, shift_expression());
+ case Token_right_shift:
+ return createBinaryExpression(Expression::RShiftOp, value, shift_expression());
+ default:
+ prev();
+ return value;
+ }
+}
+
+Expression *ExpressionBuilder::additive_expression()
+{
+ Expression *value = multiplicative_expression();
+ switch (next()) {
+ case '+':
+ return createBinaryExpression('+', value, additive_expression());
+ case '-':
+ return createBinaryExpression('-', value, additive_expression());
+ default:
+ prev();
+ return value;
+ }
+}
+
+Expression *ExpressionBuilder::multiplicative_expression()
+{
+ Expression *value = unary_expression();
+ switch (next()) {
+ case '*':
+ return createBinaryExpression('*', value, multiplicative_expression());
+ case '%':
+ return createBinaryExpression('%', value, multiplicative_expression());
+ case '/':
+ return createBinaryExpression('/', value, multiplicative_expression());
+ default:
+ prev();
+ return value;
+ };
+}
+
+Expression *ExpressionBuilder::unary_expression()
+{
+ switch (next()) {
+ case '+':
+ return createUnaryExpression('+', unary_expression());
+ case '-':
+ return createUnaryExpression('-', unary_expression());
+ case '!':
+ return createUnaryExpression('!', unary_expression());
+ case '~':
+ return createUnaryExpression('~', unary_expression());
+ case Token_defined:
+ {
+ int identifierIndex = 0;
+ if (test(Token_identifier)) {
+ identifierIndex = i - 1;
+ } else if (test('(')) {
+ if (test(Token_identifier))
+ identifierIndex = i -1;
+ test(')');
+ }
+ return createMacroReference(MacroReference::DefinedRef, createTokenList(identifierIndex));
+ }
+ default:
+ prev();
+ return primary_expression();
+ }
+}
+
+bool ExpressionBuilder::unary_expression_lookup()
+{
+ Type t = lookup();
+ return (primary_expression_lookup()
+ || t == '+'
+ || t == '-'
+ || t == '!'
+ || t == '~'
+ || t == Token_defined);
+}
+
+Expression *ExpressionBuilder::primary_expression()
+{
+ Expression *value;
+ if (test('(')) {
+ if (moreTokens(1))
+ value = conditional_expression();
+ else
+ value = createIntLiteral(0); // Syntax error.
+ test(')');
+ } else {
+ next();
+ bool ok;
+ int val = QString::fromLatin1(lexem()).toInt(&ok, 0);
+ if(ok)
+ value = createIntLiteral(val);
+ else
+ value = createMacroReference(MacroReference::ValueRef, createTokenList(i -1));
+ }
+ return value;
+}
+
+bool ExpressionBuilder::primary_expression_lookup()
+{
+ Type t = lookup();
+ return (t == Token_identifier
+ || t == Token_number_literal
+/* || t == PP_FLOATING_LITERAL*/
+ || t == '(');
+}
+/*
+ Creates a tokenList containing one token
+*/
+TokenList ExpressionBuilder::createTokenList(int tokenIndex) const
+{
+ return TokenList(m_tokenList.tokenContainer(tokenIndex),
+ QVector<int>() << m_tokenList.containerIndex(tokenIndex));
+}
+/*
+ Node cration helper functions
+*/
+UnaryExpression *ExpressionBuilder::createUnaryExpression(int op, Expression *expression)
+{
+ return new (m_memoryPool->allocate(sizeof(UnaryExpression))) UnaryExpression(op, expression);
+}
+
+BinaryExpression *ExpressionBuilder::createBinaryExpression(int op, Expression *leftExpresson, Expression *rightExpression)
+{
+ return new (m_memoryPool->allocate(sizeof(BinaryExpression))) BinaryExpression(op, leftExpresson, rightExpression);
+}
+
+ConditionalExpression *ExpressionBuilder::createConditionalExpression(Expression *condition, Expression *leftExpression, Expression *rightExpression)
+{
+ return new (m_memoryPool->allocate(sizeof(ConditionalExpression))) ConditionalExpression(condition, leftExpression, rightExpression);
+}
+
+MacroReference *ExpressionBuilder::createMacroReference(MacroReference::Type type, TokenEngine::TokenList token)
+{
+ return new (m_memoryPool->allocate(sizeof(MacroReference))) MacroReference(token, type);
+}
+
+IntLiteral *ExpressionBuilder::createIntLiteral(const int arg)
+{
+ return new (m_memoryPool->allocate(sizeof(IntLiteral))) IntLiteral(arg);
+}
+
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/rppexpressionbuilder.h b/tools/porting/src/rppexpressionbuilder.h
new file mode 100644
index 0000000..bca90b1
--- /dev/null
+++ b/tools/porting/src/rppexpressionbuilder.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RPPEXPRESSIONBUILDER_H
+#define RPPEXPRESSIONBUILDER_H
+
+#include "tokens.h"
+#include "tokenengine.h"
+#include "smallobject.h"
+#include "rpp.h"
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp {
+
+class ExpressionBuilder
+{
+public:
+ ExpressionBuilder(const TokenEngine::TokenList &tokenList, const QVector<Type> &typeList, TypedPool<Item> *memoryPool);
+ Rpp::Expression *parse();
+private:
+
+ inline bool hasNext() const { return (i < m_tokenList.count()); }
+ Type next();
+ bool test(int);
+ bool moreTokens(int delta);
+ inline void prev() {--i;}
+ Type lookup(int k = 1);
+ inline Type token() { return typeAt(i-1);}
+ inline QByteArray lexem() { return m_tokenList.text(i-1);}
+ inline Type typeAt(int t) { return m_typeList.at(m_tokenList.containerIndex(t));}
+
+ Expression *conditional_expression();
+ Expression *logical_OR_expression();
+ Expression *logical_AND_expression();
+ Expression *inclusive_OR_expression();
+ Expression *exclusive_OR_expression();
+ Expression *AND_expression();
+ Expression *equality_expression();
+ Expression *relational_expression();
+ Expression *shift_expression();
+ Expression *additive_expression();
+ Expression *multiplicative_expression();
+ Expression *unary_expression();
+ Expression *primary_expression();
+
+ bool unary_expression_lookup();
+ bool primary_expression_lookup();
+
+ UnaryExpression *createUnaryExpression(int op, Expression *expression);
+ BinaryExpression *createBinaryExpression(int op, Expression *leftExpresson, Expression *rightExpression);
+ ConditionalExpression *createConditionalExpression(Expression *condition, Expression *leftExpression, Expression *rightExpression);
+ MacroReference *createMacroReference(MacroReference::Type type, TokenEngine::TokenList token);
+ IntLiteral *createIntLiteral(const int arg);
+
+ TokenEngine::TokenList createTokenList(int tokenIndex) const;
+
+ int i;
+ TokenEngine::TokenList m_tokenList;
+ QVector<Type> m_typeList;
+ TypedPool<Item> *m_memoryPool;
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/rpplexer.cpp b/tools/porting/src/rpplexer.cpp
new file mode 100644
index 0000000..7a606bf
--- /dev/null
+++ b/tools/porting/src/rpplexer.cpp
@@ -0,0 +1,381 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rpplexer.h"
+#include <QChar>
+#include <ctype.h>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+
+namespace Rpp {
+RppLexer::RppLexer()
+ : m_buffer(0), m_ptr(0), m_len(0)
+{
+ setupScanTable();
+}
+
+void RppLexer::setupScanTable()
+{
+ memset(s_attr_table, 0, 256);
+
+ for (int i=0; i<128; ++i) {
+ switch (i) {
+ case ':':
+ case '*':
+ case '%':
+ case '^':
+ case '=':
+ case '!':
+ case '&':
+ case '|':
+ case '+':
+ case '<':
+ case '>':
+ case '-':
+ case '.':
+ s_scan_table[i] = &RppLexer::scanOperator;
+ break;
+
+ case '\r':
+ case '\n':
+ s_scan_table[i] = &RppLexer::scanNewline;
+ break;
+
+ case '\'':
+ s_scan_table[i] = &RppLexer::scanCharLiteral;
+ break;
+
+ case '"':
+ s_scan_table[i] = &RppLexer::scanStringLiteral;
+ break;
+ case '#':
+ s_scan_table[i] = &RppLexer::scanPreprocessor;
+ break;
+
+ case '/':
+ s_scan_table[i] = &RppLexer::scanComment;
+ break;
+
+ default:
+ if (isspace(i)) {
+ s_scan_table[i] = &RppLexer::scanWhiteSpaces;
+ s_attr_table[i] |= A_Whitespace;
+ } else if (isalpha(i) || i == '_') {
+ s_scan_table[i] = &RppLexer::scanKeyword;
+ s_attr_table[i] |= A_Alpha;
+ } else if (isdigit(i)) {
+ s_scan_table[i] = &RppLexer::scanNumberLiteral;
+ s_attr_table[i] |= A_Digit;
+ } else
+ s_scan_table[i] = &RppLexer::scanChar;
+ }
+ }
+
+ s_scan_table[128] = &RppLexer::scanUnicodeChar;
+}
+
+QVector<Type> RppLexer::lex(const TokenContainer &tokenContainer)
+{
+ QVector<Type> tokenTypes;
+ const int numTokens = tokenContainer.count();
+ tokenTypes.reserve(numTokens);
+ QByteArray text = tokenContainer.fullText();
+ m_buffer = text.constData();
+ for(int t=0; t<numTokens; ++t) {
+ TokenEngine::Token token = tokenContainer.token(t);
+ tokenTypes.append(indentify(token.start, token.length));
+ }
+ return tokenTypes;
+}
+
+Type RppLexer::indentify(int pos, int length)
+{
+ Q_ASSERT(length > 0);
+ m_ptr = pos;
+ m_len = length;
+ int kind = 0;
+ const unsigned char ch = m_buffer[pos];
+ (this->*s_scan_table[ch < 128 ? ch : 128])(&kind);
+ return (Type)kind;
+}
+
+void RppLexer::scanChar(int *kind)
+{
+ *kind = m_buffer[m_ptr];
+}
+
+void RppLexer::scanWhiteSpaces(int *kind)
+{
+ *kind = Token_whitespaces;
+
+ while (unsigned char ch = m_buffer[m_ptr]) {
+ if (s_attr_table[ch] & A_Whitespace)
+ ++m_ptr;
+ else
+ break;
+ }
+}
+
+void RppLexer::scanNewline(int *kind)
+{
+ *kind = '\n';
+}
+
+void RppLexer::scanUnicodeChar(int *kind)
+{
+ *kind = m_buffer[m_ptr];
+}
+
+void RppLexer::scanCharLiteral(int *kind)
+{
+ *kind = Token_char_literal;
+}
+
+void RppLexer::scanStringLiteral(int *kind)
+{
+ *kind = Token_string_literal;
+}
+
+void RppLexer::scanIdentifier(int *kind)
+{
+ *kind = Token_identifier;
+}
+
+void RppLexer::scanNumberLiteral(int *kind)
+{
+ *kind = Token_number_literal;
+}
+
+void RppLexer::scanPreprocessor(int *kind)
+{
+ *kind = Token_preproc;
+}
+
+void RppLexer::scanComment(int *kind)
+{
+ switch(m_buffer[m_ptr + 1]) {
+ case '/':
+ *kind = Token_line_comment;
+ break;
+ case '*':
+ *kind = Token_multiline_comment;
+ break;
+ default:
+ scanOperator(kind);
+ }
+}
+
+void RppLexer::scanOperator(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case ':':
+ if (m_buffer[m_ptr+1] == ':') {
+ *kind = Token_scope;
+ return;
+ }
+ break;
+
+ case '*':
+ case '/':
+ case '%':
+ case '^':
+ if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '=':
+ if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_eq;
+ return;
+ }
+ break;
+ case '!':
+ if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_not_eq;
+ return;
+ }
+ break;
+
+ case '&':
+ if (m_buffer[m_ptr+1] == '&') {
+ *kind = Token_and;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '|':
+ if (m_buffer[m_ptr+1] == '|' ) {
+ *kind = Token_or;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '+':
+ if (m_buffer[m_ptr+1] == '+' ) {
+ *kind = Token_incr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '<':
+ if (m_buffer[m_ptr+1] == '<') {
+ if (m_buffer[m_ptr+2] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ *kind = Token_left_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_leq;
+ return;
+ }
+ break;
+
+ case '>':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ *kind = Token_right_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_geq;
+ return;
+ }
+ break;
+
+ case '-':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '*') {
+ *kind = Token_ptrmem;
+ return;
+ }
+ *kind = Token_arrow;
+ return;
+ } else if (m_buffer[m_ptr+1] == '-') {
+ *kind = Token_decr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '.':
+ if (m_buffer[m_ptr+1] == '.' && m_buffer[m_ptr+2] == '.') {
+ *kind = Token_ellipsis;
+ return;
+ } else if (m_buffer[m_ptr+1] == '*') {
+ *kind = Token_ptrmem;
+ return;
+ }
+ break;
+
+ }
+
+ *kind = m_buffer[m_ptr++];
+}
+
+bool RppLexer::match(const char *buf, int len)
+{
+ if (m_len != len)
+ return false;
+ for (int i = 0; i < len; ++i) {
+ if(m_buffer[m_ptr + i] != buf[i])
+ return false;
+ }
+ return true;
+}
+
+void RppLexer::scanKeyword(int *kind)
+{
+ if(match("if", 2))
+ *kind = Token_directive_if;
+ else if(match("elif", 4))
+ *kind = Token_directive_elif;
+ else if(match("else", 4))
+ *kind = Token_directive_else;
+ else if(match("line", 4))
+ *kind = Token_directive_line;
+ else if(match("else", 4))
+ *kind = Token_directive_else;
+ else if(match("line", 4))
+ *kind = Token_directive_line;
+ else if(match("endif", 5))
+ *kind = Token_directive_endif;
+ else if(match("ifdef", 5))
+ *kind = Token_directive_ifdef;
+ else if(match("error", 5))
+ *kind = Token_directive_error;
+ else if(match("undef", 5))
+ *kind = Token_directive_undef;
+ else if(match("pragma", 6))
+ *kind = Token_directive_pragma;
+ else if(match("ifndef", 6))
+ *kind = Token_directive_ifndef;
+ else if(match("define", 6))
+ *kind = Token_directive_define;
+ else if(match("include", 7))
+ *kind = Token_directive_include;
+ else if(match("defined", 7))
+ *kind = Token_defined;
+ else
+ *kind = Token_identifier;
+}
+
+} //namespace Rpp
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/rpplexer.h b/tools/porting/src/rpplexer.h
new file mode 100644
index 0000000..2d725f4
--- /dev/null
+++ b/tools/porting/src/rpplexer.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RPPLEXER_H
+#define RPPLEXER_H
+
+#include "tokens.h"
+#include "tokenengine.h"
+#include <QByteArray>
+#include <QVector>
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp {
+
+class RppLexer
+{
+public:
+
+ RppLexer();
+ QVector<Type> lex(const TokenEngine::TokenContainer &tokenContainer);
+private:
+ Type indentify(int pos, int length);
+ void setupScanTable();
+
+ void scanChar(int *kind);
+ void scanUnicodeChar(int *kind);
+ void scanNewline(int *kind);
+ void scanWhiteSpaces(int *kind);
+ void scanCharLiteral(int *kind);
+ void scanStringLiteral(int *kind);
+ void scanNumberLiteral(int *kind);
+ void scanIdentifier(int *kind);
+ void scanPreprocessor(int *kind);
+ void scanComment(int *kind);
+ void scanOperator(int *kind);
+ void scanKeyword(int *kind);
+
+ bool match(const char *buf, int len);
+ typedef void (RppLexer::*scan_fun_ptr)(int *kind);
+ RppLexer::scan_fun_ptr s_scan_table[128+1];
+ int s_attr_table[256];
+
+ enum
+ {
+ A_Alpha = 0x01,
+ A_Digit = 0x02,
+ A_Alphanum = A_Alpha | A_Digit,
+ A_Whitespace = 0x04
+ };
+
+ const char *m_buffer;
+ int m_ptr;
+ int m_len;
+};
+
+} //namespace Rpp
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/rpptreeevaluator.cpp b/tools/porting/src/rpptreeevaluator.cpp
new file mode 100644
index 0000000..4fbd581
--- /dev/null
+++ b/tools/porting/src/rpptreeevaluator.cpp
@@ -0,0 +1,554 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rpptreeevaluator.h"
+#include <QChar>
+#include <QtDebug>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+namespace Rpp {
+
+RppTreeEvaluator::RppTreeEvaluator()
+{
+ QByteArray text(" ");
+ TokenEngine::Token token;
+ token.start = 0;
+ token.length = 1;
+ QVector<TokenEngine::Token> tokenList;
+ tokenList.append(token);
+ TokenContainer newLineContainer(text, tokenList, new TokenEngine::GeneratedInfo());
+ newlineSection= new TokenSection(newLineContainer, 0, 1);
+}
+
+RppTreeEvaluator::~RppTreeEvaluator()
+{
+ delete newlineSection;
+}
+
+TokenSectionSequence RppTreeEvaluator::evaluate(const Source *source,
+ DefineMap *activeDefinitions)
+{
+ m_tokenSections.clear();
+ m_activeDefinitions = activeDefinitions;
+ evaluateSource(source);
+ return TokenSectionSequence(m_tokenSections);
+}
+
+void RppTreeEvaluator::evaluateText(const Text *textLine)
+{
+ const int numTokens = textLine->count();
+ const TokenContainer tokenContainer = textLine->text().tokenContainer(0);
+
+ int t = 0;
+ int startTokenRun = 0;
+ while(t < numTokens) {
+ const Token *currentToken = textLine->token(t);
+ int currentContainerIndex = currentToken->index();
+ //handle macro replacements
+ if(currentToken->toIdToken()) {
+ const int tokenIndex = currentToken->index();
+ const QByteArray tokenText = tokenContainer.tempText(tokenIndex);
+ if(m_activeDefinitions->contains(tokenText)) {
+ //crate section
+ TokenSection section(tokenContainer, textLine->token(startTokenRun)->index(), t - startTokenRun);
+ m_tokenSections.append(section);
+ //evaluate macro
+ const int oldContainerIndex = currentContainerIndex;
+ TokenContainer evaluatedText = evaluateMacro(tokenContainer, currentContainerIndex);
+ TokenSection evalSection(evaluatedText, 0, evaluatedText.count());
+ m_tokenSections.append(evalSection);
+ t += currentContainerIndex - oldContainerIndex;
+ startTokenRun = t;
+ }
+ ++t;
+ continue;
+ }
+
+ //handle comments
+ if(currentToken->toLineComment() || currentToken->toMultiLineComment()) {
+ //create section
+ TokenSection section(tokenContainer, textLine->token(startTokenRun)->index(), t - startTokenRun );
+ m_tokenSections.append(section);
+ t++; //skip comment
+ startTokenRun = t;
+ t++;
+ continue;
+ }
+
+ // handle escaped newlines
+ if (currentContainerIndex + 1 < numTokens) {
+ const TokenTempRef tokenRef1 = tokenContainer.tokenTempRef(currentContainerIndex);
+ const TokenTempRef tokenRef2 = tokenContainer.tokenTempRef(currentContainerIndex + 1);
+ // This is i slight hack. We want to check if the next token is a newline token,
+ // but since we don't have any lexical info at this point we just check if it starts
+ // with \r or \n
+ if (tokenRef1.at(0) == '\\' && (tokenRef2.at(0) == '\n' || tokenRef2.at(0) == '\r')) {
+ //create section
+ TokenSection section(tokenContainer, textLine->token(startTokenRun)->index(), t - startTokenRun );
+ m_tokenSections.append(section);
+ t += 2;
+ startTokenRun = t;
+ t++;
+ continue;
+ }
+ }
+
+ t++;
+ }
+ //round up any tokens at the end and put them in a section
+ if(t - startTokenRun > 1) {
+ TokenSection section(tokenContainer, textLine->token(startTokenRun)->index(), t - startTokenRun );
+ m_tokenSections.append(section);
+ }
+
+ m_tokenSections.append(*newlineSection);
+}
+
+/*
+ Evaluates and ifsection by selecting which one of the if-elif-else
+ groups and then evaling that.
+*/
+void RppTreeEvaluator::evaluateIfSection(const IfSection *ifSection)
+{
+ ConditionalDirective *ifGroup = ifSection->ifGroup();
+ if(evaluateCondition(ifGroup)) {
+ evaluateConditionalDirective(ifGroup);
+ return;
+ }
+
+ QVector<ConditionalDirective *> elifGroups = ifSection->elifGroups();
+ foreach(ConditionalDirective *elifGroup, elifGroups) {
+ if(evaluateCondition(elifGroup)) {
+ evaluateConditionalDirective(elifGroup);
+ return;
+ }
+ }
+
+ ConditionalDirective *elseGroup = ifSection->elseGroup();
+ if(elseGroup)
+ evaluateConditionalDirective(elseGroup);
+}
+
+/*
+ Evaluate an IncludeDirective by evaluating the Source for the included
+ file. The source is found by emitting the includeCallback signal, which
+ must be handled outside RppTreeEvaluator.
+*/
+void RppTreeEvaluator::evaluateIncludeDirective(const IncludeDirective *directive)
+{
+ Source *currentSource = getParentSource(directive);
+ IncludeType includeType = includeTypeFromDirective(directive);
+ Source *newSource = 0;
+ emit includeCallback(newSource, currentSource, QString::fromLatin1(directive->filename().constData()), includeType);
+ Q_ASSERT(newSource); // If you get an assert here you probably
+ // forgot to connect to the includeCallback signal
+ evaluateSource(newSource);
+}
+
+void RppTreeEvaluator::evaluateDefineDirective(const DefineDirective *directive)
+{
+ m_tokenSections.append(*newlineSection);
+ m_activeDefinitions->insert(directive->identifier().fullText(), directive);
+}
+
+void RppTreeEvaluator::evaluateUndefDirective(const UndefDirective *directive)
+{
+ m_tokenSections.append(*newlineSection);
+ const QByteArray text = directive->identifier().fullText();
+ m_activeDefinitions->remove(text);
+}
+
+/*
+ Evaluate the truth-value of an conditionalDirective
+*/
+bool RppTreeEvaluator::evaluateCondition(const ConditionalDirective *conditionalDirective)
+{
+ if (IfDirective *ifDirective = conditionalDirective->toIfDirective())
+ return (evaluateExpression(ifDirective->expression()) != 0);
+ if (ElifDirective *elifDirective = conditionalDirective->toElifDirective())
+ return (evaluateExpression(elifDirective->expression()) != 0);
+ if (IfdefDirective *ifdefDirective = conditionalDirective->toIfdefDirective())
+ return m_activeDefinitions->contains(ifdefDirective->identifier().fullText());
+ if (IfndefDirective *ifndefDirective = conditionalDirective->toIfndefDirective())
+ return !m_activeDefinitions->contains(ifndefDirective->identifier().fullText());
+ else
+ return false; //error!
+}
+
+/*
+ Recursively evaluates an Expression
+*/
+int RppTreeEvaluator::evaluateExpression(Expression *expression)
+{
+ if (IntLiteral *e = expression->toIntLiteral()) {
+ return e->value();
+ } else if (StringLiteral *e = expression->toStringLiteral()) {
+ return e->value().size();
+ } else if (MacroReference *e = expression->toMacroReference()) {
+ switch(e->type()) {
+ case MacroReference::DefinedRef: {
+ return m_activeDefinitions->contains(e->name().fullText()) ? 1 : 0;
+ } case MacroReference::ValueRef: {
+ const QByteArray identifier = e->name().fullText();
+ if (m_activeDefinitions->contains(identifier)) {
+ int token = e->name().containerIndex(0);
+ TokenContainer value = evaluateMacro(e->name().tokenContainer(token), token);
+ return QString(QLatin1String(value.fullText())).toInt(0, 0);
+ } else {
+ return 0; // error
+ }
+ }
+ default: Q_ASSERT(0);
+ }
+ } else if (MacroFunctionReference *e = expression->toMacroFunctionReference()) {
+ Q_UNUSED(e);
+ //TODO handle MacroFunctionReference
+// DefineDirective *def = e->findDefinition(e->name());
+// Q_ASSERT(def->toMacroFunctionDefinition());
+// qWarning("not implemented yet");
+ return 0;
+ } else if (UnaryExpression *e = expression->toUnaryExpression()) {
+ int result = evaluateExpression(e->expression());
+ switch (e->op()) {
+ case '+': return + result;
+ case '-': return - result;
+ case '!': return ! result;
+ case '~': return ~ result;
+ default: Q_ASSERT(0);
+ }
+ } else if (BinaryExpression *e = expression->toBinaryExpression()) {
+ int v1 = evaluateExpression(e->leftExpression());
+ int v2 = evaluateExpression(e->rightExpression());
+
+ switch (e->op()) {
+ case '/': { return v2 ? v1 / v2 : 0; } //avoid division by zero
+ case '*': return v1 * v2;
+ case '%': { return v2 ? v1 % v2 : 0; } //avoid modulus by zero
+ case '+': return v1 + v2;
+ case '-': return v1 - v2;
+ case '<': return v1 < v2;
+ case '>': return v1 > v2;
+ case '&': return v1 & v2;
+ case '^': return v1 ^ v2;
+ case '|': return v1 | v2;
+ case Expression::LtEqOp: return v1 <= v2;
+ case Expression::GtEqOp: return v1 >= v2;
+ case Expression::EqOp: return v1 == v2;
+ case Expression::NotEqOp: return v1 != v2;
+ case Expression::AndOp: return v1 && v2;
+ case Expression::OrOp: return v1 || v2;
+ case Expression::LShiftOp: return v1 << v2;
+ case Expression::RShiftOp: return v1 >> v2;
+ default: Q_ASSERT(0);
+ }
+
+ } else if ( ConditionalExpression *e = expression->toConditionalExpression()){
+ return e->condition() ? evaluateExpression(e->leftExpression()) : evaluateExpression(e->rightExpression());
+ }
+ return 0;
+}
+/*
+ Expands a macro at index identiferTokenIndex in tokenContainer. Returns
+ the expanded macro text, and updates identiferTokenIndex to point after
+ the last token consumed.
+
+ Given the construct 'FN(a)', the '(a)' part will be consumed if FN is
+ defined to be a macro function, but not if it is an ordenary macro.
+*/
+TokenContainer RppTreeEvaluator::evaluateMacro(TokenContainer tokenContainer, int &identiferTokenIndex)
+{
+ QByteArray identifierText = tokenContainer.text(identiferTokenIndex);
+ if(!m_activeDefinitions->contains(identifierText))
+ return TokenContainer();
+
+ const Rpp::DefineDirective *directive = m_activeDefinitions->value(identifierText);
+ Q_ASSERT(directive);
+
+ // To prevent infinite recursive macro expansions, the skip set contains
+ // a set of identifers already seen.
+ QSet<QByteArray> skip;
+
+ if(directive->toMacroDefinition()) {
+ ++identiferTokenIndex;
+ QVector<TokenEngine::Token> tokenList;
+ tokenList.append(TokenEngine::Token(0, identifierText.count()));
+ return evaluateMacroInternal(skip, TokenContainer(identifierText, tokenList));
+ } else if (Rpp::MacroFunctionDefinition *macro = directive->toMacroFunctionDefinition()) {
+ MacroFunctionParser macroFunctionParser(tokenContainer, identiferTokenIndex);
+ if (macroFunctionParser.isValid() && macro->parameters().count() == macroFunctionParser.argumentCount()) {
+ TokenContainer macroFunctionContainer =
+ TokenEngine::copy(tokenContainer, identiferTokenIndex, macroFunctionParser.tokenCount());
+ identiferTokenIndex += macroFunctionParser.tokenCount();
+ return evaluateMacroInternal(skip, macroFunctionContainer);
+ } else {
+ // Error case, such as calling a macro function with the wrong number of parameters,
+ // or calling a macro function witout a parameter list.
+ return TokenEngine::copy(tokenContainer, identiferTokenIndex++, 1);
+ }
+ }
+ return TokenContainer();
+}
+
+/*
+ Recursively expands all macroes in macroInvokeTokens, returns a
+ TokenContainer with the new tokens.
+*/
+TokenEngine::TokenContainer RppTreeEvaluator::evaluateMacroInternal(QSet<QByteArray> skip, TokenEngine::TokenContainer macroInvokeTokens)
+{
+ bool changed = false;
+ QByteArray tokenText;
+ QVector<TokenEngine::Token> tokenList;
+ const int numTokens = macroInvokeTokens.count();
+
+ for (int t = 0; t < numTokens; ++t) {
+ const QByteArray identifierText = macroInvokeTokens.text(t);
+
+ // if the current token text is not a part of a macro definition we just copy it.
+ if (!m_activeDefinitions->contains(identifierText)) {
+ tokenList.append(TokenEngine::Token(tokenText.count(), identifierText.count()));
+ tokenText.append(identifierText);
+ continue;
+ }
+
+ // If the token text is in the skip list we copy it.
+ if (skip.contains(identifierText)) {
+ tokenList.append(TokenEngine::Token(tokenText.count(), identifierText.count()));
+ tokenText.append(identifierText);
+ continue;
+ }
+
+ skip.insert(identifierText);
+ changed = true;
+ const Rpp::DefineDirective *directive = m_activeDefinitions->value(identifierText);
+ Q_ASSERT(directive);
+ // if it is a macro, we copy in the replacement list.
+ if (Rpp::MacroDefinition *macro = directive->toMacroDefinition()) {
+ TokenList replacementList = macro->replacementList();
+ TokenEngine::copy(tokenText, tokenList, replacementList, 0, replacementList.count());
+
+ // To avoid infinite loops, set changed to false if the replacement
+ // text is identical to the identifier text.
+ if (replacementList.fullText().simplified() == identifierText.simplified())
+ changed = false;
+ } else if (Rpp::MacroFunctionDefinition *macro = directive->toMacroFunctionDefinition()) {
+ TokenList replacementList = macro->replacementList();
+ TokenList paramenterList = macro->parameters();
+
+ MacroFunctionParser macroFunctionParser(macroInvokeTokens, t);
+ if (macroFunctionParser.isValid() && macro->parameters().count() == macroFunctionParser.argumentCount()) {
+ t += macroFunctionParser.tokenCount();
+ // For each token in the replacement list: If the token matches a
+ // token in the parameter list, replace it with the
+ // corresponding argument tokens from the argument list.
+ for (int replacementToken = 0; replacementToken < replacementList.count(); ++replacementToken) {
+ const QByteArray replacementTokenText = replacementList.text(replacementToken);
+ bool replaced = false;
+ for (int parameterToken = 0; parameterToken < paramenterList.count(); ++parameterToken) {
+ const QByteArray parameterTokenText = paramenterList.text(parameterToken);
+ if (parameterTokenText == replacementTokenText) {
+ TokenSection argumentTokenSection = macroFunctionParser.argument(parameterToken);
+ TokenEngine::copy(tokenText, tokenList, argumentTokenSection, 0, argumentTokenSection.count());
+ replaced = true;
+ break;
+ }
+ }
+ if (! replaced) {
+ TokenEngine::copy(tokenText, tokenList, replacementList, replacementToken, 1);
+ }
+ }
+ }
+ }
+ }
+ if (!changed)
+ return macroInvokeTokens;
+ return evaluateMacroInternal(skip, TokenContainer(tokenText, tokenList));
+}
+
+TokenContainer RppTreeEvaluator::cloneTokenList(const TokenList &list)
+{
+ QByteArray text;
+ QVector<TokenEngine::Token> tokens;
+ int index = 0;
+ for (int t = 0; t<list.count(); ++t) {
+ const QByteArray tokenText = list.text(t);
+ const int textLength = tokenText.count();
+ text += tokenText;
+ TokenEngine::Token token;
+ token.start = index;
+ token.length = textLength;
+ tokens.append(token);
+ index += textLength;
+ }
+ TokenContainer container(text, tokens, new GeneratedInfo());
+ return container;
+}
+
+/*
+ Returns the parent Source for a given item.
+*/
+Source *RppTreeEvaluator::getParentSource(const Item *item) const
+{
+ Q_ASSERT(item);
+ while(item->toSource() == 0) {
+ item = item->parent();
+ Q_ASSERT(item);
+ }
+
+ return item->toSource();
+}
+/*
+ We have two IncludeType enums, one in IncludeDirective and one in
+ RppTreeEvaluator. This function translates between them.
+*/
+RppTreeEvaluator::IncludeType RppTreeEvaluator::includeTypeFromDirective(
+ const IncludeDirective *includeDirective) const
+{
+ if(includeDirective->includeType() == IncludeDirective::QuoteInclude)
+ return QuoteInclude;
+ else
+ return AngleBracketInclude;
+}
+
+/*
+ The MacrofunctionParser class is used to parse a macro function call (not
+ a macro function definition.)
+
+ startToken should give the token index for the identifier token for the macro function.
+*/
+MacroFunctionParser::MacroFunctionParser(const TokenEngine::TokenContainer &tokenContainer, int startToken)
+:m_tokenContainer(tokenContainer)
+,m_startToken(startToken)
+,m_numTokens(0)
+,m_valid(false)
+{
+ int tokenIndex = startToken;
+ ++tokenIndex; //skip identifier token
+ int parenthesisCount = 0;
+ int currentArgumentStartToken = tokenIndex;
+
+ // Parse argument tokens, add arguments to the m_arguments list.
+ // Arguments may consist of multiple tokens. Parenthesis in arguments
+ // are allowed, as long as they match. Inside a pair of argument
+ // parenthesis, ',' no longer signals a new argument. For example,
+ // FN((a,b)) is legal and contains one argument.
+ while(tokenIndex < tokenContainer.count()) {
+ QByteArray currentText = tokenContainer.text(tokenIndex);
+ ++tokenIndex;
+ if (currentText == "(") {
+ ++parenthesisCount;
+ if (parenthesisCount == 1) {
+ // first parenthesis
+ currentArgumentStartToken = tokenIndex;
+ continue;
+ }
+ }
+ if (currentText == ")") {
+ --parenthesisCount;
+ if (parenthesisCount == 0) {
+ //end of argument
+ m_arguments.append(TokenSection(tokenContainer, currentArgumentStartToken, tokenIndex - currentArgumentStartToken - 1));
+ currentArgumentStartToken = tokenIndex;
+ //end of argument list
+ break;
+ }
+ }
+ if (currentText == "," && parenthesisCount == 1) {
+ //end of argument
+ m_arguments.append(TokenSection(tokenContainer, currentArgumentStartToken, tokenIndex - currentArgumentStartToken - 1));
+ currentArgumentStartToken = tokenIndex;
+ continue;
+ }
+
+ if (QChar::fromLatin1(currentText.at(0)).isSpace()) {
+ continue;
+ }
+
+ // If we get here without having seen a paranthesis we have a syntax
+ // error in the macro function call.
+ if (parenthesisCount == 0) {
+ parenthesisCount = -1;
+ break;
+ }
+ }
+ m_numTokens = tokenIndex - startToken;
+ m_valid = (parenthesisCount == 0);
+}
+
+/*
+ Returns true if the MacroFunctionParser contains a valid macro function
+*/
+bool MacroFunctionParser::isValid()
+{
+ return m_valid;
+}
+
+/*
+ Returns the number of tokens in the tokenContainer that is covered by
+ the macro function.
+*/
+int MacroFunctionParser::tokenCount()
+{
+ return m_numTokens;
+}
+
+/*
+ Returns the number of arguments for the macro function.
+*/
+int MacroFunctionParser::argumentCount()
+{
+ return m_arguments.count();
+}
+
+/*
+ Returns the tokens for the argument given by argumentIndex.
+*/
+TokenSection MacroFunctionParser::argument(int argumentIndex)
+{
+ Q_ASSERT(argumentIndex < m_arguments.count());
+ return m_arguments.at(argumentIndex);
+}
+
+} //namespace Rpp
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/rpptreeevaluator.h b/tools/porting/src/rpptreeevaluator.h
new file mode 100644
index 0000000..4492d64
--- /dev/null
+++ b/tools/porting/src/rpptreeevaluator.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RPPTREEEVALUATOR_H
+#define RPPTREEEVALUATOR_H
+
+#include "tokenengine.h"
+#include "rpp.h"
+#include "rpptreewalker.h"
+#include <QObject>
+#include <QList>
+#include <QHash>
+#include <QSet>
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp {
+
+class DefineMap : public QHash<QByteArray, const DefineDirective *>
+{
+
+};
+
+class RppTreeEvaluator: public QObject, public RppTreeWalker
+{
+Q_OBJECT
+public:
+ RppTreeEvaluator();
+ ~RppTreeEvaluator();
+ TokenEngine::TokenSectionSequence evaluate(const Source *source,
+ DefineMap *activedefinitions);
+ enum IncludeType {QuoteInclude, AngleBracketInclude};
+signals:
+ void includeCallback(Rpp::Source *&includee,
+ const Rpp::Source *includer,
+ const QString &filename,
+ Rpp::RppTreeEvaluator::IncludeType includeType);
+protected:
+ void evaluateIncludeDirective(const IncludeDirective *directive);
+ void evaluateDefineDirective(const DefineDirective *directive);
+ void evaluateUndefDirective(const UndefDirective *directive);
+ void evaluateIfSection(const IfSection *ifSection);
+ void evaluateText(const Text *text);
+ bool evaluateCondition(const ConditionalDirective *conditionalDirective);
+ int evaluateExpression(Expression *expression);
+
+ TokenEngine::TokenContainer evaluateMacro(TokenEngine::TokenContainer tokenContainer, int &identiferTokenIndex);
+ TokenEngine::TokenContainer evaluateMacroInternal(QSet<QByteArray> skip, TokenEngine::TokenContainer tokenContainer);
+ TokenEngine::TokenContainer cloneTokenList(const TokenEngine::TokenList &list);
+ Source *getParentSource(const Item *item) const;
+ IncludeType includeTypeFromDirective(
+ const IncludeDirective *includeDirective) const;
+private:
+ QVector<TokenEngine::TokenSection> m_tokenSections;
+ DefineMap *m_activeDefinitions;
+ TokenEngine::TokenSection *newlineSection;
+};
+
+class MacroFunctionParser
+{
+public:
+ MacroFunctionParser(const TokenEngine::TokenContainer &tokenContainer, int startToken);
+ bool isValid();
+ int tokenCount();
+ int argumentCount();
+ TokenEngine::TokenSection argument(int argumentIndex);
+private:
+ const TokenEngine::TokenContainer &m_tokenContainer;
+ const int m_startToken;
+ int m_numTokens;
+ bool m_valid;
+ QVector<TokenEngine::TokenSection> m_arguments;
+};
+
+}//namespace Rpp
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/rpptreewalker.cpp b/tools/porting/src/rpptreewalker.cpp
new file mode 100644
index 0000000..be2feda
--- /dev/null
+++ b/tools/porting/src/rpptreewalker.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rpptreewalker.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp {
+
+void RppTreeWalker::evaluateItem(const Item *item)
+{
+ if(!item)
+ return;
+ if (Source *source = item->toSource())
+ evaluateSource(source);
+ else if (Directive *directive = item->toDirective())
+ evaluateDirective(directive);
+ else if (IfSection *ifSection = item->toIfSection())
+ evaluateIfSection(ifSection);
+ else if (Text *text = item->toText())
+ evaluateText(text);
+}
+
+void RppTreeWalker::evaluateItemComposite(const ItemComposite *itemComposite)
+{
+ if (!itemComposite)
+ return;
+ for (int i = 0; i < itemComposite->count(); ++i) {
+ evaluateItem(itemComposite->item(i));
+ }
+}
+
+void RppTreeWalker::evaluateSource(const Source *source)
+{
+ evaluateItemComposite(source->toItemComposite());
+}
+
+void RppTreeWalker::evaluateDirective(const Directive *directive)
+{
+ if (!directive)
+ return;
+ if (EmptyDirective *dir = directive->toEmptyDirective())
+ evaluateEmptyDirective(dir);
+ else if (ErrorDirective *dir = directive->toErrorDirective())
+ evaluateErrorDirective(dir);
+ else if (PragmaDirective *dir = directive->toPragmaDirective())
+ evaluatePragmaDirective(dir);
+ else if (IncludeDirective *dir = directive->toIncludeDirective())
+ evaluateIncludeDirective(dir);
+ else if (DefineDirective *dir = directive->toDefineDirective())
+ evaluateDefineDirective(dir);
+ else if (UndefDirective *dir = directive->toUndefDirective())
+ evaluateUndefDirective(dir);
+ else if (LineDirective *dir = directive->toLineDirective())
+ evaluateLineDirective(dir);
+ else if (NonDirective *dir = directive->toNonDirective())
+ evaluateNonDirective(dir);
+ else if (NonDirective *dir = directive->toNonDirective())
+ evaluateNonDirective(dir);
+ else if (ConditionalDirective *dir = directive->toConditionalDirective())
+ evaluateConditionalDirective(dir);
+}
+
+/*
+ This function evaluates all the branches of an IfSection. You should
+ override it if you want to only evaluate the "correct" branch.
+*/
+void RppTreeWalker::evaluateIfSection(const IfSection *ifSection)
+{
+ if (!ifSection)
+ return;
+ evaluateItemComposite(ifSection->toItemComposite());
+}
+
+void RppTreeWalker::evaluateConditionalDirective(const ConditionalDirective *conditionalDirective)
+{
+ if (!conditionalDirective)
+ return;
+ if (IfdefDirective *dir = conditionalDirective->toIfdefDirective())
+ evaluateIfdefDirective(dir);
+ else if (IfndefDirective *dir = conditionalDirective->toIfndefDirective())
+ evaluateIfndefDirective(dir);
+ else if (IfDirective *dir = conditionalDirective->toIfDirective())
+ evaluateIfDirective(dir);
+ else if (ElifDirective *dir = conditionalDirective->toElifDirective())
+ evaluateElifDirective(dir);
+ else if (ElseDirective *dir = conditionalDirective->toElseDirective())
+ evaluateElseDirective(dir);
+}
+
+void RppTreeWalker::evaluateIfdefDirective(const IfdefDirective *directive)
+{
+ if (!directive)
+ return;
+ evaluateItemComposite(directive->toItemComposite());
+}
+
+void RppTreeWalker::evaluateIfndefDirective(const IfndefDirective *directive)
+{
+ if (!directive)
+ return;
+ evaluateItemComposite(directive->toItemComposite());
+}
+
+void RppTreeWalker::evaluateIfDirective(const IfDirective *directive)
+{
+ if (!directive)
+ return;
+ evaluateItemComposite(directive->toItemComposite());
+}
+
+void RppTreeWalker::evaluateElifDirective(const ElifDirective *directive)
+{
+ if (!directive)
+ return;
+ evaluateItemComposite(directive->toItemComposite());
+}
+
+void RppTreeWalker::evaluateElseDirective(const ElseDirective *directive)
+{
+ if (!directive)
+ return;
+ evaluateItemComposite(directive->toItemComposite());
+}
+
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/rpptreewalker.h b/tools/porting/src/rpptreewalker.h
new file mode 100644
index 0000000..a0af418
--- /dev/null
+++ b/tools/porting/src/rpptreewalker.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RPPTREEWALKER_H
+#define RPPTREEWALKER_H
+
+#include "rpp.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace Rpp {
+
+class RppTreeWalker
+{
+public:
+ virtual ~RppTreeWalker(){};
+ virtual void evaluateItem(const Item *item);
+ virtual void evaluateItemComposite(const ItemComposite *itemComposite);
+ virtual void evaluateSource(const Source *source);
+ virtual void evaluateDirective(const Directive *directive);
+ virtual void evaluateIfSection(const IfSection *ifSection);
+ virtual void evaluateConditionalDirective(const ConditionalDirective *conditionalDirective);
+
+ virtual void evaluateText(const Text *textLine) {Q_UNUSED(textLine);}
+ virtual void evaluateEmptyDirective(const EmptyDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateErrorDirective(const ErrorDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluatePragmaDirective(const PragmaDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateIncludeDirective(const IncludeDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateDefineDirective(const DefineDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateUndefDirective(const UndefDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateLineDirective(const LineDirective *directive) {Q_UNUSED(directive);}
+ virtual void evaluateNonDirective(const NonDirective *directive) {Q_UNUSED(directive);}
+
+ virtual void evaluateIfdefDirective(const IfdefDirective *directive);
+ virtual void evaluateIfndefDirective(const IfndefDirective *directive);
+ virtual void evaluateIfDirective(const IfDirective *directive);
+ virtual void evaluateElifDirective(const ElifDirective *directive);
+ virtual void evaluateElseDirective(const ElseDirective *directive);
+
+ virtual void evaluateEndifDirective(const EndifDirective *directive) {Q_UNUSED(directive);}
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp
new file mode 100644
index 0000000..0f9a2d7
--- /dev/null
+++ b/tools/porting/src/semantic.cpp
@@ -0,0 +1,1227 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "smallobject.h"
+#include "tokenengine.h"
+#include "semantic.h"
+#include <QtDebug>
+#include <QString>
+#include <QRegExp>
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenStreamAdapter;
+using namespace TokenEngine;
+using namespace CodeModel;
+
+Semantic::Semantic(CodeModel::NamespaceScope *globalScope,
+ TokenStreamAdapter::TokenStream *tokenStream,
+ TypedPool<CodeModel::Item> *storage)
+{
+ m_storage = storage;
+ m_tokenStream = tokenStream;
+
+ m_currentAccess = CodeModel::Member::Public;
+ m_inSlots = false;
+ m_inSignals = false;
+ m_inStorageSpec = false;
+ m_inTypedef = false;
+
+ globalScope->setName("::");
+ currentScope.push(globalScope);
+
+ //create global UnknownType and UnknownTypeMember
+ UnknownType *type = Create<UnknownType>(m_storage);
+ type->setName("__UnknownType");
+ globalScope->addType(type);
+ type->setParent(globalScope);
+
+ m_sharedUnknownMember = Create<TypeMember>(m_storage);
+ m_sharedUnknownMember->setNameToken(TokenRef());
+ m_sharedUnknownMember->setName("Unknown");
+ m_sharedUnknownMember->setType(type);
+ globalScope->addMember(m_sharedUnknownMember);
+ m_sharedUnknownMember->setParent(globalScope);
+
+}
+
+void Semantic::parseAST(TranslationUnitAST *node)
+{
+ TreeWalker::parseTranslationUnit(node);
+}
+
+
+void Semantic::parseLinkageSpecification(LinkageSpecificationAST *ast)
+{
+ if(!ast)
+ return;
+ int inStorageSpec = m_inStorageSpec;
+ m_inStorageSpec = true;
+ TreeWalker::parseLinkageSpecification(ast);
+ m_inStorageSpec = inStorageSpec;
+}
+
+void Semantic::parseNamespace(NamespaceAST *ast)
+{
+ CodeModel::NamespaceScope *parent = currentScope.top()->toNamespaceScope();
+ if(!parent->toNamespaceScope()) {
+ emit error("Error in Semantic::parseNamespace: parent scope was not a namespace");
+ return;
+ }
+
+ QByteArray nsName;
+ if (!ast->namespaceName() || textOf(ast->namespaceName()).isEmpty()){
+ nsName = "(__QT_ANON_NAMESPACE)";
+ } else {
+ nsName = textOf(ast->namespaceName());
+ }
+
+ CodeModel::NamespaceScope *namespaceScope = 0;
+
+ // Look up namespace scope in case it is already defined.
+ // (Unlike classes, C++ namespaces are "open" and can be added to.)
+ CodeModel::Scope *scope = parent->scopes().value(nsName);
+ if (scope)
+ namespaceScope = scope->toNamespaceScope();
+
+ // Create new namespace if not found.
+ if (!namespaceScope) {
+ namespaceScope = CodeModel::Create<CodeModel::NamespaceScope>(m_storage);
+ namespaceScope->setName(nsName);
+ parent->addScope(namespaceScope);
+
+ NamespaceMember *namespaceMember = Create<NamespaceMember>(m_storage);
+ namespaceMember->setNameToken(tokenRefFromAST(ast->namespaceName()));
+ namespaceMember->setName(nsName);
+ namespaceMember->setNamespaceScope(namespaceScope);
+ currentScope.top()->addMember(namespaceMember);
+ namespaceMember->setParent(currentScope.top());
+ }
+
+ currentScope.push(namespaceScope);
+ TreeWalker::parseNamespace(ast);
+ currentScope.pop();
+}
+
+void Semantic::parseClassSpecifier(ClassSpecifierAST *ast)
+{
+ if (!ast->name()){
+ return;
+ }
+
+ QByteArray kind = textOf(ast->classKey());
+ if (kind == "class")
+ m_currentAccess = CodeModel::Member::Private;
+ else // kind =="struct"
+ m_currentAccess = CodeModel::Member::Public;
+
+ QByteArray className = textOf(ast->name()->unqualifiedName());
+
+ //create ClassScope
+ CodeModel::ClassScope *klass = CodeModel::Create<CodeModel::ClassScope>(m_storage);
+ klass->setName(className);
+ currentScope.top()->addScope(klass);
+
+ //create ClassType
+ CodeModel::ClassType *type = CodeModel::Create<CodeModel::ClassType>(m_storage);
+ type->setScope(klass);
+ currentScope.top()->addType(type);
+ type->setParent(currentScope.top());
+
+ //create TypeMember
+ CodeModel::TypeMember *typeMember = CodeModel::Create<CodeModel::TypeMember>(m_storage);
+ typeMember->setNameToken(tokenRefFromAST(ast->name()->unqualifiedName()));
+ typeMember->setName(className);
+ typeMember->setType(type);
+ currentScope.top()->addMember(typeMember);
+ typeMember->setParent(currentScope.top());
+
+ currentScope.push(klass);
+ if (ast->baseClause())
+ parseBaseClause(ast->baseClause(), klass);
+
+ //TreeWalker::parseClassSpecifier(ast);
+ parseNode(ast->winDeclSpec());
+ parseNode(ast->classKey());
+ parseNode(ast->baseClause());
+
+ // Here's the trick for parsing c++ classes:
+ // All inline function definitions must be interpreted as if they were
+ // written after any other declarations in the class.
+ QList<DeclarationAST *> functionDefinitions;
+ if (ast->declarationList())
+ foreach(DeclarationAST *decl, *ast->declarationList()) {
+ if(decl->nodeType() == NodeType_FunctionDefinition)
+ functionDefinitions.append(decl);
+ else
+ parseNode(decl);
+ }
+ foreach(DeclarationAST *decl, functionDefinitions)
+ parseNode(decl);
+
+ currentScope.pop();
+}
+/*
+ Parse a class, struct or enum forward decalration.
+*/
+void Semantic::parseElaboratedTypeSpecifier(ElaboratedTypeSpecifierAST *node)
+{
+ if (!node)
+ return;
+ AST *kind = node->kind();
+ if (!kind)
+ return;
+
+ const QByteArray kindText = textOf(kind);
+ const QByteArray nameText = textOf(node->name());
+
+ // Don't do anything if the class, struct or enum has already been declared or defined.
+ if (lookupNameInScope(currentScope.top(), node->name()).count() > 0)
+ return;
+
+ if (kindText == "class" || kindText == "struct") {
+ // Create ClassType.
+ CodeModel::ClassType *type = CodeModel::Create<CodeModel::ClassType>(m_storage);
+ type->setScope(0);
+ currentScope.top()->addType(type);
+ type->setParent(currentScope.top());
+
+ // Create TypeMember.
+ CodeModel::TypeMember *typeMember = CodeModel::Create<CodeModel::TypeMember>(m_storage);
+ typeMember->setNameToken(tokenRefFromAST(node->name()->unqualifiedName()));
+ typeMember->setName(nameText);
+ typeMember->setType(type);
+ currentScope.top()->addMember(typeMember);
+ typeMember->setParent(currentScope.top());
+ } else if (kindText == "enum") {
+ //create a Type
+ CodeModel::EnumType *enumType = CodeModel::Create<CodeModel::EnumType>(m_storage);
+ enumType->setName(nameText);
+ currentScope.top()->addType(enumType);
+ enumType->setParent(currentScope.top());
+
+ //create a TypeMember
+ CodeModel::TypeMember *typeMember = CodeModel::Create<CodeModel::TypeMember>(m_storage);
+ if(node->name())
+ typeMember->setNameToken(tokenRefFromAST(node->name()->unqualifiedName()));
+ typeMember->setName(nameText);
+ typeMember->setType(enumType);
+ currentScope.top()->addMember(typeMember);
+ typeMember->setParent(currentScope.top());
+ }
+}
+
+void Semantic::parseSimpleDeclaration(SimpleDeclarationAST *ast)
+{
+ TypeSpecifierAST *typeSpec = ast->typeSpec();
+ InitDeclaratorListAST *declarators = ast->initDeclaratorList();
+
+ if (typeSpec)
+ parseTypeSpecifier(typeSpec);
+
+ if (declarators){
+ List<InitDeclaratorAST*> l = *declarators->initDeclaratorList();
+
+ foreach (InitDeclaratorAST *current, l) {
+ parseDeclaration(ast->functionSpecifier(), ast->storageSpecifier(), typeSpec, current);
+ }
+ }
+}
+
+void Semantic::parseDeclaration(AST *funSpec, AST *storageSpec, TypeSpecifierAST *typeSpec, InitDeclaratorAST *decl)
+{
+ if (m_inStorageSpec)
+ return;
+
+ if(!decl)
+ return;
+
+ DeclaratorAST *d = decl->declarator();
+ if (!d)
+ return;
+
+ if (!d->subDeclarator() && d->parameterDeclarationClause()) {
+ parseFunctionDeclaration(funSpec, storageSpec, typeSpec, decl);
+ return;
+ }
+ if(!typeSpec || !typeSpec->name())
+ return;
+
+ DeclaratorAST *t = d;
+ while (t && t->subDeclarator())
+ t = t->subDeclarator();
+
+ QByteArray id;
+ if (t && t->declaratorId() && t->declaratorId()->unqualifiedName())
+ id = textOf(t->declaratorId()->unqualifiedName());
+
+ if (!t || !t->declaratorId() || !t->declaratorId()->unqualifiedName())
+ return;
+ AST *nameAST = t->declaratorId()->unqualifiedName();
+ QByteArray name = textOf(nameAST);
+
+
+ if (!scopeOfDeclarator(d, QList<QByteArray>()).isEmpty()){
+ return;
+ }
+
+ //Check if this is possibly a function call by searching for '(' and ')'
+ const QByteArray declText = textOf(decl);
+ if (declText.contains("(") && declText.contains(")")) {
+ if (decl->declarator() && decl->declarator()->subDeclarator()) {
+
+ NameAST * name = decl->declarator()->subDeclarator()->declaratorId();
+ if (name)
+ parseNameUse(name);
+ return;
+ }
+ }
+
+ //create VariableMember
+ CodeModel::VariableMember *variableMember = CodeModel::Create<CodeModel::VariableMember>(m_storage);
+ variableMember->setNameToken(tokenRefFromAST(nameAST));
+ variableMember->setName(name);
+ variableMember->setAccess(m_currentAccess);
+ variableMember->setParent(currentScope.top());
+ currentScope.top()->addMember(variableMember);
+
+ //look up type of variableMember,
+
+ TypeMember *typeMember = typeLookup(currentScope.top(), typeSpec->name());
+ if(typeMember) {
+ variableMember->setType(typeMember->type());
+ } else {
+ QByteArray text = typeOfDeclaration(typeSpec, d);
+ CodeModel::UnknownType *type = CodeModel::Create<CodeModel::UnknownType>(m_storage);
+ type->setName(text);
+ variableMember->setType(type);
+ }
+
+ if (decl)
+ parseNode(decl->initializer());
+
+}
+
+void Semantic::parseFunctionDeclaration(AST *funSpec, AST *storageSpec,
+ TypeSpecifierAST * typeSpec, InitDeclaratorAST * initDeclarator)
+{
+ bool isFriend = false;
+ bool isVirtual = false;
+ bool isStatic = false;
+ bool isInline = false;
+ bool isPure = initDeclarator->initializer() != 0;
+
+ if (funSpec){
+ List<AST*> l = *funSpec->children();
+ foreach (AST *current, l) {
+ QByteArray text = textOf(current);
+ if (text == "virtual") isVirtual = true;
+ else if (text == "inline") isInline = true;
+ }
+ }
+
+ if (storageSpec){
+ List<AST*> l = *storageSpec->children();
+ foreach (AST *current, l) {
+ QByteArray text = textOf(current);
+ if (text == "friend") isFriend = true;
+ else if (text == "static") isStatic = true;
+ }
+ }
+ DeclaratorAST *declarator = initDeclarator->declarator();
+ if(!declarator || !declarator->declaratorId())
+ return;
+ AST *nameAST = declarator->declaratorId()->unqualifiedName();
+ QByteArray name = textOf(nameAST);
+
+ CodeModel::FunctionMember *method = CodeModel::Create<CodeModel::FunctionMember>(m_storage);
+ method->setNameToken(tokenRefFromAST(nameAST));
+ method->setName(name);
+ method->setAccess(m_currentAccess);
+ method->setStatic(isStatic);
+ method->setVirtual(isVirtual);
+ method->setAbstract(isPure);
+
+ parseFunctionArguments(declarator, method);
+
+ if (m_inSignals)
+ method->setSignal(true);
+
+ if (m_inSlots)
+ method->setSlot(true);
+
+ method->setConstant(declarator->constant() != 0);
+
+ QByteArray text = typeOfDeclaration(typeSpec, declarator);
+ if (!text.isEmpty()) {
+ CodeModel::UnknownType *type = CodeModel::Create<CodeModel::UnknownType>(m_storage);
+ type->setName(text);
+ method->setReturnType(type);
+ }
+
+ method->setParent(currentScope.top());
+ currentScope.top()->addMember(method);
+}
+
+
+void Semantic::parseBaseClause(BaseClauseAST * baseClause, CodeModel::ClassScope *klass)
+{
+ if(!baseClause)
+ return;
+ if(!klass)
+ return;
+ List<BaseSpecifierAST*> *l = baseClause->baseSpecifierList();
+ if (!l)
+ return;
+ foreach (BaseSpecifierAST *baseSpecifier, *l) {
+ QByteArray baseName;
+ if (!baseSpecifier->name())
+ continue;
+
+ // Look up a class with the correct name.
+ QList<Member *> candidates = nameLookup(klass, baseSpecifier->name());
+ if (candidates.count() == 1 ) {
+ Member *member = candidates.at(0);
+ Q_ASSERT(member);
+ TypeMember *typeMember = member->toTypeMember();
+ if (typeMember) {
+ Q_ASSERT(typeMember->type());
+ ClassType *classType = typeMember->type()->toClassType();
+ if (classType) {
+ klass->addBaseClass(classType);
+ }
+ }
+ }
+ }
+}
+void Semantic::parseFunctionArguments(const DeclaratorAST *declarator, CodeModel::FunctionMember *method)
+{
+ if(!declarator || !method)
+ return;
+
+ ParameterDeclarationClauseAST *clause = declarator->parameterDeclarationClause();
+
+ if (clause && clause->parameterDeclarationList()){
+ ParameterDeclarationListAST *params = clause->parameterDeclarationList();
+ List<ParameterDeclarationAST*> *l = params->parameterList();
+ if (!l)
+ return;
+ foreach (ParameterDeclarationAST *param, *l) {
+ CodeModel::Argument *arg = CodeModel::Create<CodeModel::Argument>(m_storage);
+ arg->setParent(method);
+
+ if (param->declarator()){
+ QByteArray text = declaratorToString(param->declarator(), QByteArray(), true);
+ if(param->declarator()->declaratorId())
+ arg->setNameToken(tokenRefFromAST(param->declarator()->declaratorId()->unqualifiedName()));
+ if (!text.isEmpty())
+ arg->setName(text);
+ }
+
+ QByteArray tp = typeOfDeclaration(param->typeSpec(), param->declarator());
+ if (!tp.isEmpty()) {
+ CodeModel::UnknownType *type = CodeModel::Create<CodeModel::UnknownType>(m_storage);
+ type->setName(tp);
+ arg->setType(type);
+ }
+
+ method->addArgument(arg);
+ }
+ }
+}
+
+// using directive (using namespace A)
+void Semantic::parseUsingDirective(UsingDirectiveAST *ast)
+{
+ QByteArray qualifiedname = textOf(ast->name());
+ QByteArray name = textOf(ast->name()->unqualifiedName());
+
+ //look up target namespace name
+ QList<Member *> memberList = nameLookup(currentScope.top(), ast->name());
+
+ NamespaceScope *targetNamespace = 0;
+
+ // search for namespace in member list.
+ QList<Member *>::ConstIterator it = memberList.constBegin();
+ while(it != memberList.constEnd()) {
+ if (NamespaceMember *namespaceMember = (*it)->toNamespaceMember()) {
+ targetNamespace = namespaceMember->namespaceScope();
+ break;
+ }
+ ++it;
+ }
+
+ if (targetNamespace == 0)
+ return;
+
+ // Find the insertion namespace, which is the first common
+ // ancesotor namespace for the current scope and the target namespace
+
+ // currentScope might be a block scope, find its first namespace parent
+ CodeModel::Scope *currentParent = currentScope.top();
+ while (currentParent->toNamespaceScope() == 0) {
+ currentParent = currentParent->parent();
+ }
+
+ CodeModel::Scope *namespaceA = currentParent;
+ while (namespaceA != 0) {
+ CodeModel::Scope *namespaceB = targetNamespace;
+ while (namespaceB != 0) {
+ if (namespaceB == namespaceA)
+ break;
+ namespaceB = namespaceB->parent();
+ }
+ if (namespaceB == namespaceA)
+ break;
+ namespaceA = namespaceA->parent();
+ }
+
+ if (namespaceA == 0 || namespaceA->toNamespaceScope() == 0)
+ return;
+
+ NamespaceScope *insertionNamespace = namespaceA->toNamespaceScope();
+
+ // Create using directive link
+ UsingDirectiveLink *usingDirectiveLink = Create<UsingDirectiveLink>(m_storage);
+ usingDirectiveLink->setParent(currentScope.top());
+ usingDirectiveLink->setTargetNamespace(targetNamespace);
+ usingDirectiveLink->setInsertionNamespace(insertionNamespace);
+
+ // add it to current namespace
+ if (NamespaceScope *namespaceScope = currentScope.top()->toNamespaceScope())
+ namespaceScope->addUsingDirectiveLink(usingDirectiveLink);
+ else if (BlockScope *blockScope = currentScope.top()->toBlockScope())
+ blockScope->addUsingDirectiveLink(usingDirectiveLink);
+}
+
+void Semantic::parseFunctionDefinition(FunctionDefinitionAST *ast)
+{
+ AST *funSpec = ast->functionSpecifier();
+ AST *storageSpec = ast->storageSpecifier();
+ TypeSpecifierAST *typeSpec = ast->typeSpec();
+ InitDeclaratorAST *initDeclarator = ast->initDeclarator();
+ if (!ast->initDeclarator())
+ return;
+
+ DeclaratorAST *d = initDeclarator->declarator();
+
+ if (!d->declaratorId())
+ return;
+
+ parseFunctionDeclaration(funSpec, storageSpec, typeSpec, initDeclarator);
+ CodeModel::FunctionMember *method = functionLookup(currentScope.top(), d);
+
+ if(!method) {
+ emit error("Error in Semantic::parseFunctionDefinition: Could not find declaration for function definition");
+ return;
+ }
+
+ CodeModel::Scope *parent = method->parent();
+
+ if(!ast->functionBody()) {
+ emit error("Error in Semantic::parseFunctionDefinition: no function body in function definition");
+ return;
+ }
+
+ //create child function scope
+ QByteArray id = textOf(d->declaratorId()->unqualifiedName());
+ CodeModel::BlockScope *functionScope = CodeModel::Create<CodeModel::BlockScope>(m_storage);
+ functionScope->setName(QByteArray("__QT_ANON_BLOCK_SCOPE(Function: ") + id + QByteArray(")"));
+ functionScope->setParent(parent);
+ method->setFunctionBodyScope(functionScope);
+
+ //add arguments to child scope
+ ArgumentCollection arguments = method->arguments();
+ ArgumentCollection::ConstIterator it = arguments.constBegin();
+ while(it != arguments.constEnd()) {
+ CodeModel::Argument *argument = *it;
+ CodeModel::VariableMember *variableMember = CodeModel::Create<CodeModel::VariableMember>(m_storage);
+ variableMember->setNameToken(argument->nameToken());
+ variableMember->setType(argument->type());
+ variableMember->setName(argument->name());
+ variableMember->setParent(functionScope);
+ functionScope->addMember(variableMember);
+ ++it;
+ }
+
+ //push function scope and parse function body
+ currentScope.push(functionScope);
+ parseStatementList(ast->functionBody());
+ currentScope.pop();
+}
+
+void Semantic::parseStatementList(StatementListAST *statemenList)
+{
+ if(!statemenList)
+ return;
+ CodeModel::BlockScope *blockScope = CodeModel::Create<CodeModel::BlockScope>(m_storage);
+ blockScope->setName("__QT_ANON_BLOCK_SCOPE");
+ blockScope->setParent(currentScope.top());
+ currentScope.top()->addScope(blockScope);
+
+ currentScope.push(blockScope);
+ TreeWalker::parseStatementList(statemenList);
+ currentScope.pop();
+}
+
+void Semantic::parseExpression(AbstractExpressionAST* node)
+{
+ if(!node)
+ return;
+ if(node->nodeType() == NodeType_ClassMemberAccess)
+ parseClassMemberAccess(static_cast<ClassMemberAccessAST *>(node));
+ else
+ TreeWalker::parseExpression(node);
+}
+
+/*
+ Pretty hardwired code for handling class member access of the types:
+ object.member and objectPtr->member.
+
+ This function creates a name use for object to its declaration, and a
+ name use from member to its declaration in the class.
+*/
+void Semantic::parseClassMemberAccess(ClassMemberAccessAST *node)
+{
+ if(!node)
+ return;
+ parseExpression(node->expression());
+ // Get a name use for the 'object' name.
+ NameUse *nameUse = findNameUse(node->expression());
+ // Since the NameUse refers to an object, its decalaration must be
+ // a ClassType. Get the scope of this class type.
+ if( nameUse
+ && nameUse->declaration()
+ && nameUse->declaration()->toVariableMember()
+ && nameUse->declaration()->toVariableMember()->type()
+ && nameUse->declaration()->toVariableMember()->type()->toClassType()
+ && nameUse->declaration()->toVariableMember()->type()->toClassType()->scope()) {
+
+ CodeModel::Scope *scope = nameUse->declaration()->toVariableMember()->type()->toClassType()->scope();
+ QList<CodeModel::Member *> members = lookupNameInScope(scope, node->name());
+ if(members.count() != 0) {
+ createNameUse(members.at(0), node->name());
+ return;
+ }
+ }
+ // Create a NameUse that refers to the global shared unknown type.
+ createNameUse(m_sharedUnknownMember, node->name());
+}
+
+void Semantic::parseExpressionStatement(ExpressionStatementAST *node)
+{
+ TreeWalker::parseExpressionStatement(node);
+}
+
+// using declaration (using A::b)
+void Semantic::parseUsing(UsingAST *ast)
+{
+ //CodeModel::Scope *s = lookUpScope(currentScope.top(), ast->name());
+ QList<CodeModel::Member *> members = nameLookup(currentScope.top(), ast->name());
+ if(members.isEmpty()) {
+ emit error("Error in Semantic::parseUsing: could not look up using target");
+ return;
+ }
+ //TODO: handle multiple members (when nameLookup returns a set of overloded functions)
+ CodeModel::Member *member = members[0];
+ CodeModel::Scope *targetScope = member->parent();
+ if(!targetScope) {
+ emit error("Error in Semantic::parseUsing: target has no parent scope");
+ return;
+ }
+
+ if(!ast->name())
+ return;
+ AST *nameAST = ast->name()->unqualifiedName();
+ if(!nameAST)
+ return;
+ QByteArray name = textOf(nameAST);
+}
+
+void Semantic::parseEnumSpecifier(EnumSpecifierAST *ast)
+{
+ if (!ast->name())
+ return;
+
+ QByteArray name = textOf(ast->name());
+
+ //create a Type
+ CodeModel::EnumType *enumType = CodeModel::Create<CodeModel::EnumType>(m_storage);
+ enumType->setName(name);
+ currentScope.top()->addType(enumType);
+ enumType->setParent(currentScope.top());
+
+ //create a TypeMember
+ CodeModel::TypeMember *typeMember = CodeModel::Create<CodeModel::TypeMember>(m_storage);
+ if(ast->name())
+ typeMember->setNameToken(tokenRefFromAST(ast->name()->unqualifiedName()));
+ typeMember->setName(name);
+ typeMember->setType(enumType);
+ currentScope.top()->addMember(typeMember);
+ typeMember->setParent(currentScope.top());
+
+ //parse the eneumerators
+ List<EnumeratorAST*> *list = ast->enumeratorList();
+ if (!list)
+ return;
+ foreach (EnumeratorAST *current, *list) {
+ CodeModel::VariableMember *enumerator = CodeModel::Create<CodeModel::VariableMember>(m_storage);
+ enumerator->setNameToken(tokenRefFromAST(current->id()));
+ enumerator->setName(textOf(current->id()));
+ enumerator->setAccess(m_currentAccess);
+ enumerator->setStatic(true);
+ enumerator->setType(enumType);
+ currentScope.top()->addMember(enumerator);
+ enumerator->setParent(currentScope.top());
+ }
+
+}
+
+void Semantic::parseTypedef(TypedefAST *ast)
+{
+ TypeSpecifierAST *typeSpec = ast->typeSpec();
+ InitDeclaratorListAST *declarators = ast->initDeclaratorList();
+
+ if (typeSpec && declarators){
+ QByteArray typeId;
+
+ if (typeSpec->name())
+ typeId = textOf(typeSpec->name());
+
+ List<InitDeclaratorAST*> *l = declarators->initDeclaratorList();
+ if (!l)
+ return;
+ foreach (InitDeclaratorAST *initDecl, *l) {
+ QByteArray type, id;
+ if (initDecl->declarator()){
+ type = typeOfDeclaration(typeSpec, initDecl->declarator());
+
+ DeclaratorAST *d = initDecl->declarator();
+ while (d->subDeclarator()){
+ d = d->subDeclarator();
+ }
+
+ if (d->declaratorId())
+ id = textOf(d->declaratorId());
+ }
+
+ //create a type
+ CodeModel::Scope *scope = currentScope.top();
+ CodeModel::AliasType *typeAlias = CodeModel::Create<CodeModel::AliasType>(m_storage);
+ //typeAlias->setName(id);
+ //typeAlias->setParent(scope);
+ scope->addType(typeAlias);
+
+ //create a TypeMember
+ CodeModel::TypeMember *typeMember = CodeModel::Create<CodeModel::TypeMember>(m_storage);
+ if(typeSpec->name())
+ typeMember->setNameToken(tokenRefFromAST(typeSpec->name()->unqualifiedName()));
+ typeMember->setName(id);
+ typeMember->setType(typeAlias);
+ currentScope.top()->addMember(typeMember);
+ typeMember->setParent(currentScope.top());
+
+ }
+
+ }
+}
+
+void Semantic::parseTypeSpecifier(TypeSpecifierAST *ast)
+{
+ // If this is a classSpecifier or a EnumSpecifier we skip the name lookup,
+ // becuase looking up the name "E" in a class definition like
+ // "class E { ..." makes no sense. (There might be a variable named E
+ // already declared, but that variable is now shadowed by the class type.)
+ if( ast->nodeType() != NodeType_EnumSpecifier
+ && ast->nodeType() != NodeType_ClassSpecifier
+ && ast->nodeType() != NodeType_ElaboratedTypeSpecifier )
+ parseNameUse(ast->name());
+ TreeWalker::parseTypeSpecifier(ast);
+}
+
+/*
+ Parses a name: looks up name, creates name use.
+*/
+void Semantic::parseNameUse(NameAST* name)
+{
+ if(!name)
+ return;
+
+ // Look up name
+ QList<CodeModel::Member *> members = nameLookup(currentScope.top(), name);
+ if(members.isEmpty()) {
+ //cout << "no declaration found for " << textOf(name).constData() << endl;
+ // Create NameUse that refer to a shared UnknownMember
+ createNameUse(m_sharedUnknownMember, name);
+ return;
+ }
+
+ //TODO: handle multiple members (when nameLookup returns a set of overloaded functions)
+ CodeModel::Member *member = members[0];
+ if(!member->parent()) {
+ emit error("Error in Semantic::parseUsing: target has no parent scope");
+ return;
+ }
+
+ createNameUse(member, name);
+}
+
+/*
+ looks up name used in basescope. If name->isGlobal() is true or if classOrNamespaceList()
+ returns a non-emty list, the C++ qualified name lookup rules are used. Otherwise the
+ unquialified name lookup rules are used. Returns the a list of members that was found,
+ In most cases this list will contain zero or one element, exept in the case of overloaded functions.
+ TODO: Argument-dependent name lookup
+*/
+QList<CodeModel::Member *> Semantic::nameLookup(CodeModel::Scope *baseScope, const NameAST* name)
+{
+ if (name->isGlobal() || (name->classOrNamespaceNameList()
+ && name->classOrNamespaceNameList()->size()>0 )) {
+ return qualifiedNameLookup(baseScope, name);
+ } else {
+ return unqualifiedNameLookup(baseScope, name);
+ }
+}
+
+//look up an unqualified name
+QList<CodeModel::Member *> Semantic::unqualifiedNameLookup(CodeModel::Scope *baseScope, const NameAST* name)
+{
+ QList<UsingDirectiveLink *> usingDirectiveLinks;
+ CodeModel::Scope *currentScope = baseScope;
+ QList<CodeModel::Member *> entities;
+
+ while (currentScope != 0) {
+ // Add any "using namespace" directive links for the current scope to
+ // usingDirectiveLinks
+ if (NamespaceScope *namespaceScope = currentScope->toNamespaceScope())
+ usingDirectiveLinks += namespaceScope->usingDirectiveLinks();
+ if (BlockScope *blockScope = currentScope->toBlockScope())
+ usingDirectiveLinks += blockScope->usingDirectiveLinks();
+
+ // Search usingDirectiveLinks for a link where currentScope is the
+ // insertion namespace. If found look up name in the target namespace
+ // for that link.
+ if (NamespaceScope *namespaceScope = currentScope->toNamespaceScope()) {
+ QList<UsingDirectiveLink *>::ConstIterator it = usingDirectiveLinks.constBegin();
+ while (it != usingDirectiveLinks.constEnd()) {
+ if ((*it)->insertionNamespace() == namespaceScope)
+ entities = lookupNameInScope((*it)->targetNamespace(), name);
+ ++it;
+ }
+ }
+
+ // Look up names in this scope.
+ entities += lookupNameInScope(currentScope, name);
+ if (!entities.isEmpty())
+ break;
+ currentScope = currentScope->parent();
+ }
+ return entities;
+}
+
+//look up a qualified name
+QList<CodeModel::Member *> Semantic::qualifiedNameLookup(CodeModel::Scope *baseScope, const NameAST* name)
+{
+ QList<CodeModel::Member *> entities;
+ CodeModel::Scope *currentScope = baseScope;
+
+ // Check if the global ("::") scope has been specified.
+ if(name->isGlobal()) {
+ while (currentScope->parent())
+ currentScope = currentScope->parent();
+ }
+
+ while (entities.isEmpty() && currentScope != 0) {
+ CodeModel::Scope *targetScope = scopeLookup(currentScope, name);
+ entities = lookupNameInScope(targetScope, name);
+ currentScope = currentScope->parent();
+ }
+
+ return entities;
+}
+
+//looks up a name in a scope, includes base classes if scope is a class scope
+QList<CodeModel::Member *> Semantic::lookupNameInScope(CodeModel::Scope *scope, const NameAST* name)
+{
+ QList<CodeModel::Member *> entities;
+
+ if(!scope || !name)
+ return entities;
+
+ QByteArray nameText = textOf(name->unqualifiedName()->name());
+ //look up name in members of current scope
+ const CodeModel::MemberCollection members = scope->members();
+ if (members.contains(nameText))
+ entities.append(members.value(nameText));
+
+ // if not found, look up name in base classes (if any)
+ CodeModel::ClassScope *classScope = scope->toClassScope();
+ if (entities.isEmpty() && classScope) {
+ const TypeCollection baseClasses = classScope->baseClasses();
+ TypeCollection::ConstIterator it = baseClasses.constBegin();
+ while (it != baseClasses.constEnd()) {
+ CodeModel::Scope *baseClass = it.value()->toClassType()->scope();
+ if (scope != baseClass)
+ entities += lookupNameInScope(baseClass, name);
+ ++it;
+ }
+
+ if (entities.count() > 1)
+ emit error("Error in Semantic::lookupNameInScope: name "
+ + nameText + " is ambigous");
+ }
+ return entities;
+}
+
+/*
+ Resolves the classOrNamespaceNameList part of a NameAST against a base scope.
+*/
+CodeModel::Scope *Semantic::scopeLookup(CodeModel::Scope *baseScope, const NameAST* name)
+{
+ CodeModel::Scope *currentScope = baseScope;
+ const List<ClassOrNamespaceNameAST *> *scopeList = name->classOrNamespaceNameList();
+ // if there is no scope list, then the scope we are looking for is baseScope
+ if (!scopeList)
+ return baseScope;
+
+ // Check if the global ("::") scope has been specified.
+ if(name->isGlobal()) {
+ while (currentScope->parent())
+ currentScope = currentScope->parent();
+ }
+
+ while(currentScope != 0) {
+ int nestingCounter = 0;
+ CodeModel::Scope *nestedScope = currentScope;
+ while (nestingCounter < scopeList->count()) {
+ const QByteArray nameText = textOf((*scopeList)[nestingCounter]->name());
+ nestedScope = nestedScope->scopes().value(nameText);
+ if (!nestedScope)
+ break;
+ ++nestingCounter;
+ }
+ if(nestedScope) // found target scope?
+ return nestedScope;
+
+ currentScope = currentScope->parent(); //look in parent scope
+ }
+
+ return 0;
+}
+
+TypeMember *Semantic::typeLookup(CodeModel::Scope *baseScope, const NameAST* name)
+{
+ QList<CodeModel::Member *> memberList = nameLookup(baseScope, name);
+
+ foreach(Member *member, memberList) {
+ if(TypeMember *typeMember = member->toTypeMember())
+ return typeMember;
+ }
+ return 0;
+}
+
+FunctionMember *Semantic::functionLookup(CodeModel::Scope *baseScope,
+ const DeclaratorAST *functionDeclarator)
+{
+
+ QList<CodeModel::Member*> candidateList =
+ nameLookup(baseScope, functionDeclarator->declaratorId());
+ return selectFunction(candidateList, functionDeclarator);
+}
+
+/*
+ This is a simplified function lookup routine, for matching member function
+ definitions with member function declarations. It does not implement
+ the general C++ function overload resolution rules.
+*/
+FunctionMember *Semantic::selectFunction(QList<CodeModel::Member*> candidatateList, const DeclaratorAST *functionDeclarator)
+{
+ // get arguments for funciton we are looking for
+ FunctionMember testFunction;
+ parseFunctionArguments(functionDeclarator, &testFunction);
+ const ArgumentCollection testArgumentCollection = testFunction.arguments();
+
+ //test againts functions in overload list.
+ foreach(Member* member, candidatateList) {
+ FunctionMember *function = member->toFunctionMember();
+ if (!function)
+ continue;
+ const ArgumentCollection argumentCollection = function->arguments();
+
+ //test argument types and number of arguments
+ ArgumentCollection::ConstIterator arg1 = argumentCollection.constBegin();
+ ArgumentCollection::ConstIterator arg2 = testArgumentCollection.constBegin();
+ bool match = true;
+ while(arg1 != argumentCollection.constEnd() && arg2 != testArgumentCollection.constEnd()) {
+ if( arg1.value()->type()->name() != arg2.value()->type()->name() ) {
+ match = false;
+ break;
+ }
+ ++arg1;
+ ++arg2;
+ }
+ if(match)
+ return function;
+ }
+ return 0;
+}
+
+QByteArray Semantic::typeOfDeclaration(TypeSpecifierAST *typeSpec, DeclaratorAST *declarator)
+{
+ if (!typeSpec)
+ return QByteArray();
+
+ QByteArray text;
+
+ if (typeSpec->cvQualify()) {
+ List<AST*> cv = *typeSpec->cvQualify()->children();
+ foreach (AST *current, cv) {
+ text += " " + textOf(current);
+ }
+ text += " ";
+ }
+
+
+ text += textOf(typeSpec);
+
+ if (typeSpec->cv2Qualify()) {
+ List<AST*> cv = *typeSpec->cv2Qualify()->children();
+ foreach (AST *current, cv) {
+ text += textOf(current) + " ";
+ }
+ }
+
+ if (declarator && declarator->ptrOpList()) {
+ List<AST*> ptrOpList = *declarator->ptrOpList();
+ foreach (AST *current, ptrOpList) {
+ text += " " + textOf(current);
+ }
+ text += " ";
+ }
+
+ return text.trimmed().simplified();
+}
+
+
+
+QList<QByteArray> Semantic::scopeOfName(NameAST *id, const QList<QByteArray>& startScope)
+{
+ QList<QByteArray> scope = startScope;
+ if (id && id->classOrNamespaceNameList()){
+ if (id->isGlobal())
+ scope.clear();
+
+ List<ClassOrNamespaceNameAST*> l = *id->classOrNamespaceNameList();
+ foreach (ClassOrNamespaceNameAST *current, l) {
+ if (current->name())
+ scope << textOf(current->name());
+ }
+ }
+
+ return scope;
+}
+
+QList<QByteArray> Semantic::scopeOfDeclarator(DeclaratorAST *d, const QList<QByteArray>& startScope)
+{
+ if(!d)
+ return QList<QByteArray>();
+ return scopeOfName(d->declaratorId(), startScope);
+}
+
+QByteArray Semantic::typeSpecToString(TypeSpecifierAST* typeSpec)
+{
+ if (!typeSpec)
+ return QByteArray();
+
+ QByteArray tp;
+ if (typeSpec->cvQualify()) {
+ tp += "const ";
+ }
+
+ tp += (QString::fromLatin1(textOf(typeSpec)).replace(QRegExp(QLatin1String(" :: ")), QString::fromUtf8("::"))).toLatin1();
+ return tp;
+}
+
+QByteArray Semantic::declaratorToString(DeclaratorAST* declarator, const QByteArray& scope, bool skipPtrOp)
+{
+ if (!declarator)
+ return QByteArray();
+
+ QByteArray text;
+
+ if (!skipPtrOp && declarator->ptrOpList()){
+ List<AST*> ptrOpList = *declarator->ptrOpList();
+ foreach (AST *current, ptrOpList) {
+ text += textOf(current);
+ }
+ text += QByteArray(" ");
+ }
+
+ text += scope;
+
+ if (declarator->subDeclarator())
+ text += QByteArray("(") + declaratorToString(declarator->subDeclarator()) + QByteArray(")");
+
+ if (declarator->declaratorId())
+ text += textOf(declarator->declaratorId());
+
+ if (declarator->arrayDimensionList()) {
+ List<AST*> arrays = *declarator->arrayDimensionList();
+ foreach (AST *current, arrays) {
+ current=current; //silence unused symbol warning
+ text += QByteArray("[]");
+ }
+ }
+
+ if (declarator->parameterDeclarationClause()){
+ text += QByteArray("(");
+
+ ParameterDeclarationListAST* l = declarator->parameterDeclarationClause()->parameterDeclarationList();
+ if (l != 0){
+ List<ParameterDeclarationAST*> params = *l->parameterList();
+ foreach (ParameterDeclarationAST *current, params) {
+ QByteArray type = typeSpecToString(current->typeSpec());
+ text += type;
+ if (!type.isEmpty())
+ text += QByteArray(" ");
+ text += declaratorToString(current->declarator());
+
+ // ### FIXME if (it.current())
+ text += QByteArray(", ");
+ }
+ }
+
+ text += QByteArray(")");
+
+ if (declarator->constant() != 0)
+ text += QByteArray(" const");
+ }
+
+ return QString::fromLatin1(text).replace(QRegExp(QLatin1String(" :: ")), QLatin1String("::")).simplified().toLatin1();
+}
+
+QByteArray Semantic::textOf(const AST *node) const
+{
+ if (!node)
+ return QByteArray();
+ QByteArray text;
+ for (int i = node->startToken(); i < node->endToken(); ++i) {
+ if (!m_tokenStream->isHidden(i)) {
+ if (i != node->startToken())
+ text += QByteArray(" ");
+ text += m_tokenStream->tokenText(i);
+ }
+ }
+ return text;
+}
+
+void Semantic::createNameUse(Member *member, NameAST *name)
+{
+ if (!name)
+ return;
+
+ AST *unqualifedName = name->unqualifiedName()->name();
+
+ if(!unqualifedName || !member)
+ return;
+
+ CodeModel::NameUse *nameUse = CodeModel::Create<CodeModel::NameUse>(m_storage);
+ nameUse->setParent(currentScope.top());
+ nameUse->setNameToken(tokenRefFromAST(unqualifedName));
+ nameUse->setName(textOf(unqualifedName));
+ nameUse->setDeclaration(member);
+
+ currentScope.top()->addNameUse(nameUse);
+ addNameUse(unqualifedName, nameUse);
+}
+
+void Semantic::addNameUse(AST *node, NameUse *nameUse)
+{
+ const int tokenIndex = node->startToken();
+ m_nameUses.insert(tokenIndex, nameUse);
+}
+
+/*
+ Searches a AST node and all its children for a nameUse. The name use is
+ found by looking up each node's tokens in the m_nameUses map. A depth-first
+ search is used.
+*/
+NameUse *Semantic::findNameUse(AST *node)
+{
+ if(!node)
+ return 0;
+
+ List<AST*> *children = node->children();
+ if(children) {
+ NameUse *nameUse = 0;
+ foreach(AST* child , *children) {
+ nameUse = findNameUse(child);
+ if(nameUse)
+ break;
+ }
+ if (nameUse)
+ return nameUse;
+ }
+
+ for (int t = node->startToken(); t < node->endToken(); ++t) {
+ // cout << t <<" |" <<m_tokenStream->tokenText(t).constData() << "|" << endl;
+ if (m_nameUses.contains(t))
+ return m_nameUses.value(t);
+ }
+ return 0;
+}
+
+/*
+ Gets a TokenRef from an AST node.
+ Assumes that the node only covers one token, which means that
+ node->statToken() == node->endToken(). If this is not the case
+ then the TokenRef will reference the token at startToken.
+*/
+TokenEngine::TokenRef Semantic::tokenRefFromAST(AST *node)
+{
+ const int startTokenIndex = node->startToken();
+ const TokenEngine::TokenContainer tokenContainer = m_tokenStream->tokenContainer(startTokenIndex);
+ const int containerIndex = m_tokenStream->containerIndex(startTokenIndex);
+ return TokenEngine::TokenRef(tokenContainer, containerIndex);
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/semantic.h b/tools/porting/src/semantic.h
new file mode 100644
index 0000000..18d41b3
--- /dev/null
+++ b/tools/porting/src/semantic.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SEMANTIC_H
+#define SEMANTIC_H
+
+#include "treewalker.h"
+#include "codemodel.h"
+#include "tokenstreamadapter.h"
+
+#include <QObject>
+#include <QStack>
+#include <QList>
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+class Semantic: public QObject, public TreeWalker
+{
+Q_OBJECT
+public:
+ Semantic(CodeModel::NamespaceScope *globalScope,
+ TokenStreamAdapter::TokenStream *tokenStream,
+ TypedPool<CodeModel::Item> *storage);
+
+ void parseAST(TranslationUnitAST *node);
+signals:
+ void error(const QByteArray &message);
+ void warning(const QByteArray &message);
+protected:
+ virtual void parseNamespace(NamespaceAST *);
+ virtual void parseClassSpecifier(ClassSpecifierAST *);
+ virtual void parseElaboratedTypeSpecifier(ElaboratedTypeSpecifierAST *node);
+ virtual void parseSimpleDeclaration(SimpleDeclarationAST *);
+ virtual void parseDeclaration(AST *funSpec, AST *storageSpec, TypeSpecifierAST *typeSpec, InitDeclaratorAST *decl);
+ virtual void parseFunctionDeclaration(AST *funSpec, AST *storageSpec, TypeSpecifierAST *typeSpec, InitDeclaratorAST *decl);
+ virtual void parseFunctionArguments(const DeclaratorAST *declarator, CodeModel::FunctionMember *method);
+ virtual void parseFunctionDefinition(FunctionDefinitionAST *);
+ virtual void parseStatementList(StatementListAST *);
+ virtual void parseBaseClause(BaseClauseAST *baseClause, CodeModel::ClassScope * klass);
+ virtual void parseLinkageSpecification(LinkageSpecificationAST *);
+ virtual void parseUsing(UsingAST *);
+ virtual void parseUsingDirective(UsingDirectiveAST *);
+ virtual void parseExpression(AbstractExpressionAST*);
+ virtual void parseExpressionStatement(ExpressionStatementAST *node);
+ virtual void parseClassMemberAccess(ClassMemberAccessAST *node);
+ virtual void parseNameUse(NameAST*);
+ virtual void parseEnumSpecifier(EnumSpecifierAST *);
+ virtual void parseTypedef(TypedefAST *);
+ virtual void parseTypeSpecifier(TypeSpecifierAST *);
+
+ QList<CodeModel::Member *> nameLookup(CodeModel::Scope *baseScope, const NameAST* name);
+ QList<CodeModel::Member *> unqualifiedNameLookup(CodeModel::Scope *baseScope, const NameAST* name);
+ QList<CodeModel::Member *> qualifiedNameLookup(CodeModel::Scope *baseScope, const NameAST* name);
+ QList<CodeModel::Member *> lookupNameInScope(CodeModel::Scope *scope, const NameAST* name);
+
+ CodeModel::TypeMember *typeLookup(CodeModel::Scope *baseScope, const NameAST* name);
+ CodeModel::FunctionMember *functionLookup(CodeModel::Scope *baseScope, const DeclaratorAST *functionDeclarator);
+ CodeModel::Scope *scopeLookup(CodeModel::Scope *baseScope, const NameAST* name);
+ CodeModel::FunctionMember *selectFunction(QList<CodeModel::Member*> candidatateList, const DeclaratorAST *functionDeclarator);
+
+ QByteArray typeOfDeclaration(TypeSpecifierAST *typeSpec, DeclaratorAST *declarator);
+ QList<QByteArray> scopeOfName(NameAST *id, const QList<QByteArray> &scope);
+ QList<QByteArray> scopeOfDeclarator(DeclaratorAST *d, const QList<QByteArray> &scope);
+ QByteArray declaratorToString(DeclaratorAST* declarator, const QByteArray& scope = QByteArray(), bool skipPtrOp = false);
+ QByteArray typeSpecToString(TypeSpecifierAST* typeSpec);
+
+ QByteArray textOf(const AST *node) const;
+ void createNameUse(CodeModel::Member *member, NameAST *name);
+ void addNameUse(AST *node, CodeModel::NameUse *nameUse);
+ CodeModel::NameUse *findNameUse(AST *node);
+ TokenEngine::TokenRef tokenRefFromAST(AST *node);
+private:
+ TokenStreamAdapter::TokenStream *m_tokenStream;
+ TypedPool<CodeModel::Item> *m_storage;
+ CodeModel::Member::Access m_currentAccess;
+ bool m_inSlots;
+ bool m_inSignals;
+ bool m_inStorageSpec;
+ bool m_inTypedef;
+
+ QMap<int, CodeModel::NameUse *> m_nameUses;
+ QStack<CodeModel::Scope *> currentScope;
+ CodeModel::TypeMember *m_sharedUnknownMember;
+private:
+ Semantic(const Semantic &source);
+ void operator = (const Semantic &source);
+};
+
+QT_END_NAMESPACE
+
+#endif // SEMANTIC_H
diff --git a/tools/porting/src/smallobject.cpp b/tools/porting/src/smallobject.cpp
new file mode 100644
index 0000000..704e802
--- /dev/null
+++ b/tools/porting/src/smallobject.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "smallobject.h"
+
+QT_BEGIN_NAMESPACE
+
+int block_t::N = 0;
+static pool mem_pool;
+
+void *SmallObject::operator new(size_t size)
+{
+ return mem_pool.allocate(size);
+}
+
+void SmallObject::operator delete(void * /*p*/ )
+{
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/smallobject.h b/tools/porting/src/smallobject.h
new file mode 100644
index 0000000..f086b70
--- /dev/null
+++ b/tools/porting/src/smallobject.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SMALLOBJECT_H
+#define SMALLOBJECT_H
+
+#include <QList>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+QT_BEGIN_NAMESPACE
+
+struct block_t
+{
+ static int N;
+
+ block_t *chain;
+ char *data;
+ char *ptr;
+ char *end;
+
+ inline void init(int block_size = 256)
+ {
+ ++N;
+ chain = 0;
+ data = (char*) malloc(block_size);
+ ptr = data;
+ end = data + block_size;
+ }
+
+ inline void init0(int block_size)
+ {
+ init();
+ memset(data, '0', block_size);
+ }
+
+ inline void destroy()
+ {
+ --N;
+ if (chain) {
+ chain->destroy();
+ free(chain);
+ }
+
+ free(data);
+ }
+
+ inline void *allocate(size_t size, block_t **right_most)
+ {
+ const unsigned int block_size = 1 << 16;
+ if (end < ptr + size) {
+ assert( size < block_size );
+
+ if (!chain) {
+ chain = (block_t*) malloc(sizeof(block_t));
+ Q_ASSERT(chain);
+ chain->init(block_size);
+ }
+
+ return chain->allocate(size, right_most);
+ }
+
+ char *r = ptr;
+ ptr += size;
+
+ if (right_most)
+ *right_most = this;
+
+ return r;
+ }
+
+};
+
+// a stupid memory pool
+struct pool
+{
+ block_t blk;
+ block_t *right_most;
+
+ inline pool() { blk.init(); right_most = &blk; }
+ inline ~pool() { blk.destroy(); }
+
+ inline void *allocate(size_t size)
+ {
+ void *ptr = right_most->allocate(size, &right_most);
+ Q_ASSERT(ptr);
+ return ptr;
+
+ }
+ inline void *reallocate(void *old, size_t old_size, size_t size)
+ {
+ void *alloc = right_most->allocate(size, &right_most);
+ memcpy(alloc, old, old_size);
+ return alloc;
+ }
+private:
+ Q_DISABLE_COPY(pool)
+};
+
+/*
+ A memory pool that calls the destructor for each stored item when memory is
+ freed, at the expence storing one BaseType* per item.
+
+ Note that allocations for types that does not inherit BaseType
+ is not allowed and will result in a crash when the memory is freed.
+*/
+template <typename BaseType>
+class TypedPool
+{
+public:
+ inline TypedPool() { blk.init(); right_most = &blk; }
+ inline ~TypedPool()
+ {
+ foreach(BaseType *item, allocated)
+ item->~BaseType();
+ blk.destroy();
+ }
+
+ inline void *allocate(size_t size)
+ {
+ void *memory = right_most->allocate(size, &right_most);
+ allocated.append(reinterpret_cast<BaseType *>(memory));
+ Q_ASSERT(memory);
+ return memory;
+ }
+private:
+ Q_DISABLE_COPY(TypedPool)
+ block_t blk;
+ block_t *right_most;
+ QList<BaseType *> allocated;
+};
+
+struct SmallObject
+{
+ static void *operator new(size_t size);
+ static void operator delete(void *p);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/src.pro b/tools/porting/src/src.pro
new file mode 100644
index 0000000..d626b19
--- /dev/null
+++ b/tools/porting/src/src.pro
@@ -0,0 +1,93 @@
+TEMPLATE = app
+CONFIG -= moc
+CONFIG += console
+CONFIG -= app_bundle
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+QT = xml core
+DEPENDPATH += .
+TARGET =qt3to4
+DESTDIR = ../../../bin
+DEFINES += QT_NO_CAST_TO_ASCII
+
+HEADERS += smallobject.h \
+ tokenengine.h \
+ tokenizer.h \
+ rpplexer.h \
+ rpp.h \
+ rpptreewalker.h \
+ rpptreeevaluator.h \
+ rppexpressionbuilder.h \
+ preprocessorcontrol.h \
+ replacetoken.h \
+ tokenreplacements.h \
+ textreplacement.h \
+ portingrules.h \
+ qtsimplexml.h \
+ projectporter.h \
+ proparser.h \
+ fileporter.h \
+ logger.h \
+ tokens.h \
+ filewriter.h \
+ cpplexer.h \
+ smallobject.h \
+ ast.h \
+ errors.h \
+ parser.h \
+ translationunit.h \
+ treewalker.h \
+ semantic.h \
+ codemodel.h \
+ codemodelwalker.h \
+ codemodelattributes.h
+
+SOURCES += port.cpp \
+ smallobject.cpp \
+ tokenengine.cpp \
+ tokenizer.cpp \
+ rpplexer.cpp \
+ rpp.cpp \
+ rpptreewalker.cpp \
+ rpptreeevaluator.cpp \
+ rppexpressionbuilder.cpp \
+ preprocessorcontrol.cpp \
+ replacetoken.cpp \
+ tokenreplacements.cpp \
+ textreplacement.cpp \
+ portingrules.cpp \
+ qtsimplexml.cpp \
+ projectporter.cpp \
+ proparser.cpp \
+ fileporter.cpp \
+ logger.cpp \
+ filewriter.cpp \
+ cpplexer.cpp \
+ ast.cpp \
+ errors.cpp \
+ parser.cpp \
+ translationunit.cpp \
+ treewalker.cpp \
+ semantic.cpp \
+ codemodel.cpp \
+ codemodelwalker.cpp \
+ codemodelattributes.cpp
+
+RESOURCES += qt3headers0.qrc qt3headers1.qrc qt3headers2.qrc qt3headers3.qrc
+
+target.path=$$[QT_INSTALL_BINS]
+INSTALLS += target
+
+RULESXML = q3porting.xml
+RULESXML.files = q3porting.xml
+RULESXML.path = $$[QT_INSTALL_DATA]
+INSTALLS += RULESXML
+
+win32-msvc.net|win32-msvc2* {
+ QMAKE_CXXFLAGS -= -Zm200 -Zm300
+ QMAKE_CXXFLAGS += -Zm1000
+ QMAKE_CFLAGS -= -Zm200 -Zm300
+ QMAKE_CFLAGS += -Zm1000
+}
diff --git a/tools/porting/src/textreplacement.cpp b/tools/porting/src/textreplacement.cpp
new file mode 100644
index 0000000..1123e4f
--- /dev/null
+++ b/tools/porting/src/textreplacement.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textreplacement.h"
+
+QT_BEGIN_NAMESPACE
+
+bool TextReplacements::insert(QByteArray newText, int insertPosition, int currentLenght)
+{
+ //bubble sort the new replacement into the list
+ int i;
+ for(i=0; i<textReplacementList.size(); ++i) {
+ if (insertPosition == textReplacementList.at(i).insertPosition)
+ return false; // multiple replacements on the same insertPosition is not allowed.
+ if(insertPosition < textReplacementList.at(i).insertPosition)
+ break; //we found the right position
+ }
+ //++i;
+ // cout << "inserting new text " << newText.constData() << endl;
+ // %s at %d overwriting %d bytes at list pos %d\n", newText.constData(), insertPosition, currentLenght, i);
+ TextReplacement rep;
+ rep.newText=newText;
+ rep.insertPosition=insertPosition;
+ rep.currentLenght=currentLenght;
+
+ textReplacementList.insert(i, rep);
+ return true;
+}
+
+void TextReplacements::clear()
+{
+ textReplacementList.clear();
+}
+
+QByteArray TextReplacements::apply(QByteArray current)
+{
+ QByteArray newData=current;
+ int i;
+ int replacementOffset=0;
+
+ for(i=0; i<textReplacementList.size(); ++i) {
+ TextReplacement rep=textReplacementList.at(i);
+ //printf("applying new text %s insert at %d overwriting %d bytes \n", rep.newText.constData(), rep.insertPosition, rep.currentLenght);
+ newData.remove(rep.insertPosition+replacementOffset, rep.currentLenght);
+ newData.insert(rep.insertPosition+replacementOffset, rep.newText);
+
+ //modify all remaining replacements if we change the document length
+ replacementOffset+=(rep.newText.size() - rep.currentLenght);
+ }
+
+ return newData;
+}
+
+TextReplacements &TextReplacements::operator+=(const TextReplacements &other)
+{
+ foreach(TextReplacement rep, other.replacements()) {
+ insert(rep.newText, rep.insertPosition, rep.currentLenght);
+ }
+ return *this;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/textreplacement.h b/tools/porting/src/textreplacement.h
new file mode 100644
index 0000000..e8bfaf1
--- /dev/null
+++ b/tools/porting/src/textreplacement.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTREPLACEMENT_H
+#define TEXTREPLACEMENT_H
+
+#include <QByteArray>
+#include <QList>
+#include <QtAlgorithms>
+
+QT_BEGIN_NAMESPACE
+
+class TextReplacement
+{
+public:
+ QByteArray newText;
+ int insertPosition;
+ int currentLenght; //lenght of the text that is going to be replaced.
+ bool operator<(const TextReplacement &other) const
+ {
+ return (insertPosition < other.insertPosition);
+ }
+};
+
+class TextReplacements
+{
+public:
+ /*
+ creates a TextReplacement that inserts newText at insertPosition. currentLength bytes
+ are overwritten in the original text. If there already is an insert at insertPosition,
+ the insert will not be performed.
+
+ insert maintains the TextReplacement list in sorted order.
+
+ Returns true if the insert was successfull, false otherwise;
+ */
+ bool insert(QByteArray newText, int insertPosition, int currentLenght);
+ void clear();
+ QList<TextReplacement> replacements() const
+ {
+ return textReplacementList;
+ }
+ QByteArray apply(QByteArray current);
+
+ TextReplacements &operator+=(const TextReplacements &other);
+
+private:
+ QList<TextReplacement> textReplacementList;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/tokenengine.cpp b/tools/porting/src/tokenengine.cpp
new file mode 100644
index 0000000..151d18e
--- /dev/null
+++ b/tools/porting/src/tokenengine.cpp
@@ -0,0 +1,402 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tokenengine.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace TokenEngine {
+
+/*
+ Add a container-global attribute.
+*/
+void TokenAttributes::addAttribute(const QByteArray &name, const QByteArray &value)
+{
+ const QByteArray keyText = makeKeyText(-1, name);
+ attributes.insert(keyText, value);
+}
+
+/*
+ Retrieve container-global attribute.
+*/
+QByteArray TokenAttributes::attribute(const QByteArray &name) const
+{
+ const QByteArray keyText = makeKeyText(-1, name);
+ return attributes.value(keyText);
+}
+
+/*
+ Add an attribute. Note: Don't use names starting with a number, that will
+ break the indexing.
+*/
+void TokenAttributes::addAttribute(const int index, const QByteArray &name, const QByteArray &value)
+{
+ const QByteArray keyText = makeKeyText(index, name);
+ attributes.insert(keyText, value);
+}
+
+QByteArray TokenAttributes::attribute(const int index, const QByteArray &name) const
+{
+ const QByteArray keyText = makeKeyText(index, name);
+ return attributes.value(keyText);
+}
+
+QByteArray TokenAttributes::makeKeyText(const int index, const QByteArray &name) const
+{
+ QByteArray indexText;
+ return indexText.setNum(index) + name;
+}
+
+
+/*
+ Construnct an empty TokenContainer.
+*/
+TokenContainer::TokenContainer()
+{
+ d = new TokenContainerData();
+ d->typeInfo = 0;
+}
+
+/*
+ Construnct a TokenContainer from data
+*/
+TokenContainer::TokenContainer(QByteArray text, QVector<Token> tokens, TypeInfo *typeInfo)
+{
+ d = new TokenContainerData();
+ d->text = text;
+ d->tokens = tokens;
+ if(typeInfo == 0)
+ d->typeInfo = new TypeInfo();
+ else
+ d->typeInfo = typeInfo;
+}
+
+int TokenContainer::count() const
+{
+ return d->tokens.count();
+}
+
+QByteArray TokenContainer::text(const int index) const
+{
+ Token token = d->tokens.at(index);
+ return d->text.mid(token.start, token.length);
+}
+
+QByteArray TokenContainer::tempText(const int index) const
+{
+ Token token = d->tokens.at(index);
+ return QByteArray::fromRawData(d->text.constData() + token.start, token.length);
+}
+
+QByteArray TokenContainer::fullText() const
+{
+ return d->text;
+}
+
+TokenContainer TokenContainer::tokenContainer(const int index) const
+{
+ Q_UNUSED(index);
+ return *this;
+}
+
+Token TokenContainer::token(const int index) const
+{
+ return d->tokens.at(index);
+}
+
+TypeInfo *TokenContainer::typeInfo()
+{
+ return d->typeInfo;
+}
+
+TokenAttributes *TokenContainer::tokenAttributes()
+{
+ return d->tokenAttributes;
+}
+
+const TokenAttributes *TokenContainer::tokenAttributes() const
+{
+ return d->tokenAttributes;
+}
+
+/*
+ Returns the line number for the given index.
+*/
+int TokenContainer::line(int index) const
+{
+ //This algorithm is a bit more complicated than it should be,
+ //since we have to search for newlines inside comments.
+ //(Comments are tokenized as one token)
+ QByteArray contents = fullText();
+ int pos=0;
+ int lines=0;
+ for(int t=0; t < index; ++t) {
+ int tokenLength = d->tokens.at(t).length;
+ if((tokenLength == 1) && (text(t) == "\n")) {
+ ++lines;
+ } else if(tokenLength > 2) {// 3 is the minimum size for a comment (// + newline)
+ int newpos = d->tokens.at(t).length;
+ for(int p = pos; p < newpos; ++p) {
+ if(contents[p] == '\n')
+ ++lines;
+ }
+ }
+ pos += d->tokens.at(t).length;
+ }
+ return lines;
+}
+
+/*
+ Returns the column number for the given index.
+*/
+int TokenContainer::column(int index) const
+{
+ //Scan backwards, find \n.
+ int chars = 0;
+ int t = index;
+ while (t>0) {
+ if((d->tokens.at(t).length == 1) && (text(t) == "\n"))
+ break;
+ chars += d->tokens.at(t).length;
+ --t;
+ }
+ return chars;
+}
+
+TokenTempRef TokenContainer::tokenTempRef(const int index) const
+{
+ Q_ASSERT(index < d->tokens.count());
+ const Token token = d->tokens.at(index);
+ return TokenTempRef(d->text.constData() + token.start, token.length);
+}
+
+QByteArray TokenSection::fullText() const
+{
+ QByteArray text;
+ for (int t = m_start; t < m_start + m_count; ++t) {
+ text += m_tokenContainer.text(t);
+ }
+ return text;
+}
+
+QByteArray TokenList::fullText() const
+{
+ QByteArray text;
+ for (int t = 0; t < m_tokenList.count(); ++t) {
+ text += m_tokenContainer.text(m_tokenList.at(t));
+ }
+ return text;
+}
+
+TokenSectionSequence::TokenSectionSequence(QVector<TokenSection> tokenSections)
+:m_tokenSections(tokenSections), m_count(0)
+{
+ for(int s = 0; s < m_tokenSections.count(); ++s) {
+ m_startIndexes.append(m_count);
+ m_count += m_tokenSections.at(s).count();
+ }
+}
+
+QByteArray TokenSectionSequence::fullText() const
+{
+ QByteArray text;
+ foreach(TokenSection section, m_tokenSections) {
+ text += section.fullText();
+ }
+ return text;
+}
+
+int TokenSectionSequence::count() const
+{
+ return m_count;
+}
+
+QVector<TokenSection> TokenSectionSequence::tokenSections() const
+{
+ return m_tokenSections;
+}
+
+QByteArray TokenSectionSequence::text(const int index) const
+{
+ const int sectionIndex = findSection(index);
+ const int sectionInternalIndex = calculateInternalIndex(index, sectionIndex);
+ return m_tokenSections.at(sectionIndex).text(sectionInternalIndex);
+}
+
+QByteArray TokenSectionSequence::tempText(const int index) const
+{
+ const int sectionIndex = findSection(index);
+ const int sectionInternalIndex = calculateInternalIndex(index, sectionIndex);
+ return m_tokenSections.at(sectionIndex).tempText(sectionInternalIndex);
+}
+
+
+TokenContainer TokenSectionSequence::tokenContainer(const int index) const
+{
+ const int sectionIndex = findSection(index);
+ const int sectionInternalIndex = calculateInternalIndex(index, sectionIndex);
+ return m_tokenSections.at(sectionIndex).tokenContainer(sectionInternalIndex);
+}
+
+int TokenSectionSequence::containerIndex(const int index) const
+{
+ const int sectionIndex = findSection(index);
+ const int sectionInternalIndex = calculateInternalIndex(index, sectionIndex);
+ return m_tokenSections.at(sectionIndex).containerIndex(sectionInternalIndex);
+}
+
+int TokenSectionSequence::findSection(const int index) const
+{
+ int c = 0;
+ bool found = false;
+ //Here we do a linear search through all collections in the list,
+ //which could turn out to be to slow.
+ while(!found && c < m_tokenSections.count()) {
+ const int sectionEnd = m_startIndexes.at(c)
+ + m_tokenSections.at(c).count();
+ if (index < sectionEnd)
+ found = true;
+ else
+ ++c;
+ }
+ if(!found) {
+ //error
+ Q_ASSERT(0);
+ return -1;
+ }
+ Q_ASSERT(c < m_tokenSections.count());
+ return c;
+}
+
+int TokenSectionSequence::calculateInternalIndex(const int index, const int sectionIndex) const
+{
+ const int sectionInternalIndex =
+ index - m_startIndexes.at(sectionIndex);
+ Q_ASSERT(sectionInternalIndex < m_tokenSections.at(sectionIndex).count());
+ return sectionInternalIndex;
+}
+
+
+TokenSectionSequenceIterator::TokenSectionSequenceIterator(const TokenSectionSequence &tokenSectionSequence)
+:m_currentSection(0)
+,m_currentToken(-1)
+,m_numSections(tokenSectionSequence.m_tokenSections.count())
+,m_tokenSectionSequence(tokenSectionSequence)
+
+{ }
+
+/*
+ Resets the token iterator.
+*/
+void TokenSectionSequenceIterator::reset()
+{
+ m_currentSection = 0;
+ m_currentToken = -1;
+}
+
+/*
+ Advances the token iterator.
+*/
+bool TokenSectionSequenceIterator::nextToken()
+{
+ if(m_tokenSectionSequence.m_tokenSections.isEmpty())
+ return false;
+ ++m_currentToken;
+ //check of we are past the end of the current section
+ if(m_currentToken < m_tokenSectionSequence.m_tokenSections.at(m_currentSection).count())
+ return true;
+ //Advance to the next non-empty section.
+ m_currentToken = 0;
+ do {
+ ++m_currentSection;
+ //return false if no more sections
+ if(m_currentSection >= m_numSections)
+ return false;
+ //skip empty sections
+ } while(m_tokenSectionSequence.m_tokenSections.at(m_currentSection).count() == 0);
+
+ return true;
+}
+
+/*
+ Returns the text for the current token;
+*/
+QByteArray TokenSectionSequenceIterator::text() const
+{
+ return m_tokenSectionSequence.m_tokenSections.at(m_currentSection).text(m_currentToken);
+}
+
+/*
+ Returns the text for the current token as a temporary QByteArray;
+*/
+QByteArray TokenSectionSequenceIterator::tempText() const
+{
+ return m_tokenSectionSequence.m_tokenSections.at(m_currentSection).tempText(m_currentToken);
+}
+
+/*
+ Returns the container for the current token;
+*/
+TokenContainer TokenSectionSequenceIterator::tokenContainer() const
+{
+ return m_tokenSectionSequence.m_tokenSections.at(m_currentSection).tokenContainer(m_currentToken);
+}
+
+/*
+ Returns the containerIndex for the current token;
+*/
+int TokenSectionSequenceIterator::containerIndex() const
+{
+ return m_tokenSectionSequence.m_tokenSections.at(m_currentSection).containerIndex(m_currentToken);
+}
+
+/*
+ Returns a temporary token reference for the current token for the current token;
+*/
+TokenTempRef TokenSectionSequenceIterator::tokenTempRef() const
+{
+ return m_tokenSectionSequence.m_tokenSections.at(m_currentSection).tokenTempRef(m_currentToken);
+}
+
+
+} //namespace TokenEngine
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/tokenengine.h b/tools/porting/src/tokenengine.h
new file mode 100644
index 0000000..7fcfaec
--- /dev/null
+++ b/tools/porting/src/tokenengine.h
@@ -0,0 +1,391 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOKENENGINE_H
+#define TOKENENGINE_H
+
+#include <QByteArray>
+#include <QVector>
+#include <QString>
+#include <QSharedData>
+#include <QSharedDataPointer>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+
+namespace TokenEngine {
+
+class TokenContainer;
+/*
+ A token is defined as a start-postion and a lenght. Since the actual text
+ storage is not reffered to here, Token needs to be used together with
+ a TokenContainer in order to be useful.
+*/
+class Token
+{
+public:
+ Token()
+ :start(0), length(0) {}
+ Token(int p_start, int p_lenght)
+ :start(p_start), length(p_lenght) {}
+ int start;
+ int length;
+};
+
+/*
+ Each TokenContainer has a TypeInfo object with meta-information.
+*/
+class FileInfo;
+class GeneratedInfo;
+class TypeInfo
+{
+public:
+ virtual ~TypeInfo() {};
+ virtual FileInfo *toFileInfo() const {return 0;}
+ virtual GeneratedInfo *toGeneratedInfo() const {return 0;}
+};
+
+/*
+ MetaInfo for containers that contains tokens from a file
+*/
+class FileInfo: public TypeInfo
+{
+public:
+ FileInfo *toFileInfo() const
+ {return const_cast<FileInfo *>(this);}
+
+ QString filename;
+};
+
+/*
+ MetaInfo for containers that contains generated tokens.
+*/
+class GeneratedInfo: public TypeInfo
+{
+public:
+ GeneratedInfo *toGeneratedInfo() const
+ {return const_cast<GeneratedInfo *>(this);}
+
+ //preprocessor tree pointer?
+};
+
+class TokenAttributes
+{
+public:
+ void addAttribute(const QByteArray &name, const QByteArray &value);
+ QByteArray attribute(const QByteArray &name) const;
+ void addAttribute(const int index, const QByteArray &name, const QByteArray &value);
+ QByteArray attribute(const int index, const QByteArray &name) const;
+
+private:
+ inline QByteArray makeKeyText(const int index, const QByteArray &name) const;
+ QMap<QByteArray, QByteArray> attributes;
+};
+
+
+/*
+ A TokenSequence that stores text and tokens referencing
+ that text.
+*/
+class TokenContainerData : public QSharedData
+{
+public:
+ TokenContainerData()
+ : typeInfo(0)
+ {tokenAttributes = new TokenAttributes();}
+ ~TokenContainerData()
+ {delete tokenAttributes; delete typeInfo; }
+ QByteArray text;
+ QVector<Token> tokens;
+ TypeInfo *typeInfo;
+ TokenAttributes *tokenAttributes;
+};
+class TokenTempRef;
+class TokenContainer
+{
+public:
+ TokenContainer();
+ TokenContainer(QByteArray text, QVector<Token> tokens, TypeInfo *typeInfo = 0);
+ int count() const;
+ QByteArray text(const int index) const;
+ QByteArray tempText(const int index) const;
+ QByteArray fullText() const;
+ TokenContainer tokenContainer(const int index) const;
+ inline int containerIndex(const int index) const
+ { return index; }
+ Token token(const int index) const;
+ TypeInfo *typeInfo();
+ TokenAttributes *tokenAttributes();
+ const TokenAttributes *tokenAttributes() const;
+ int line(int index) const;
+ int column(int index) const;
+ TokenTempRef tokenTempRef(const int index) const;
+private:
+ const QByteArray &textRef()
+ { return d->text; }
+ QExplicitlySharedDataPointer<TokenContainerData> d;
+};
+
+/*
+ A reference to a single token in a container
+*/
+class TokenRef
+{
+public:
+ TokenRef(): m_index(-1) {}
+ TokenRef(TokenContainer tokenContainer, int containerIndex)
+ : m_tokenContainer(tokenContainer), m_index(containerIndex) {}
+ inline int count() const
+ { return m_index == -1 ? 0 : 1; }
+ inline QByteArray text(const int index = 0) const
+ { Q_UNUSED(index); return m_tokenContainer.text(m_index); }
+ inline QByteArray tempText(const int index) const
+ { Q_UNUSED(index); return m_tokenContainer.tempText(m_index); }
+ inline QByteArray fullText() const
+ { return text(); }
+ inline TokenContainer tokenContainer(const int index = 0) const
+ { Q_UNUSED(index); return m_tokenContainer; }
+ inline int containerIndex(const int index = 0) const
+ { Q_UNUSED(index); return m_index; }
+private:
+ TokenContainer m_tokenContainer;
+ int m_index;
+};
+
+/*
+ A temporary reference to a single token in a container. This reference does
+ not increase the refcount on the TokenContainer.
+*/
+class TokenTempRef
+{
+public:
+ TokenTempRef(const char *text, int length)
+ : m_text(text), m_length(length) {}
+ inline const char *constData() const
+ { return m_text; }
+ inline int length() const
+ { return m_length; }
+ char at(int index) const
+ { Q_ASSERT(index < m_length); return m_text[index]; }
+private:
+ const char *m_text;
+ int m_length;
+};
+
+/*
+ Contains a selected range from a TokenSequence.
+*/
+class TokenSection
+{
+public:
+ TokenSection() : m_start(0), m_count(0) {}
+ TokenSection(TokenContainer tokenContainer,
+ const int start, const int count)
+ :m_tokenContainer(tokenContainer), m_start(start), m_count(count) {}
+
+ inline int count() const
+ { return m_count; }
+ inline QByteArray text(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.text(cIndex);
+ }
+ inline QByteArray tempText(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.tempText(cIndex);
+ }
+ QByteArray fullText() const;
+ inline TokenContainer tokenContainer(const int index = 0) const
+ { Q_UNUSED(index); return m_tokenContainer; }
+ inline int containerIndex(const int index) const
+ { return m_start + index; }
+ TokenTempRef tokenTempRef(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.tokenTempRef(cIndex);
+ }
+private:
+ TokenContainer m_tokenContainer;
+ int m_start;
+ int m_count;
+};
+
+/*
+ A list of tokens from a tokenContainer
+*/
+class TokenList
+{
+public:
+ TokenList() {};
+ TokenList(TokenContainer tokenContainer, QVector<int> tokenList)
+ :m_tokenContainer(tokenContainer), m_tokenList(tokenList) {}
+ inline int count() const
+ { return m_tokenList.count(); }
+ inline QByteArray text(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.text(cIndex);
+ }
+ inline QByteArray tempText(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.tempText(cIndex);
+ }
+ QByteArray fullText() const;
+ inline TokenContainer tokenContainer(const int index) const
+ { Q_UNUSED(index); return m_tokenContainer; }
+ inline int containerIndex(const int index) const
+ { return m_tokenList.at(index); }
+ Token token(const int index) const
+ {
+ const int cIndex = containerIndex(index);
+ Q_ASSERT(cIndex < m_tokenContainer.count());
+ return m_tokenContainer.token(cIndex);
+ }
+
+private:
+ TokenContainer m_tokenContainer;
+ QVector<int> m_tokenList;
+};
+
+/*
+ Combines a list of TokenSequences into one TokenSectionSequence
+*/
+class TokenSectionSequenceIterator;
+class TokenSectionSequence
+{
+public:
+ TokenSectionSequence() :m_count(0) {};
+ TokenSectionSequence(QVector<TokenSection> tokenSections);
+
+ QByteArray fullText() const;
+ int count() const;
+ QVector<TokenSection> tokenSections() const;
+
+ //random access interface, access time is linear on the number of sections
+ QByteArray text(const int index) const;
+ QByteArray tempText(const int index) const;
+ TokenContainer tokenContainer(const int index) const;
+ int containerIndex(const int index) const;
+
+protected:
+ int findSection(const int index) const;
+ int calculateInternalIndex(const int index, const int sectionIndex) const;
+private:
+ QVector<TokenSection> m_tokenSections;
+ QVector<int> m_startIndexes;
+ int m_count;
+ friend class TokenSectionSequenceIterator;
+};
+
+//sequental access interface, constant access time.
+class TokenSectionSequenceIterator
+{
+public:
+ TokenSectionSequenceIterator(const TokenSectionSequence &tokenSectionSequence);
+ void reset();
+ bool nextToken();
+ QByteArray text() const;
+ QByteArray tempText() const;
+ TokenContainer tokenContainer() const;
+ int containerIndex() const;
+ TokenTempRef tokenTempRef() const;
+private:
+ int m_currentSection;
+ int m_currentToken; // token index in currentTokenSequence;
+ const int m_numSections;
+ const TokenSectionSequence &m_tokenSectionSequence;
+};
+
+template <typename TokenSequence>
+QByteArray getText(TokenSequence tokenSequence)
+{
+ QByteArray text;
+ for (int t = 0; t<tokenSequence.count(); ++t) {
+ text += tokenSequence.text(t);
+ }
+ return text;
+}
+
+/*
+ Append the text and the tokens from the range [startToken, startToken + numTokens>
+ to text and tokenList.
+*/
+template <typename TokenSequenceType>
+void copy(QByteArray &text, QVector<TokenEngine::Token> &tokenList, const TokenSequenceType &tokenSequence, int startToken, int numTokens)
+{
+ const int endToken = startToken + numTokens;
+ int textIndex = text.count();
+ for(int t = startToken; t < endToken; ++t) {
+ const QByteArray tokenText = tokenSequence.text(t);
+ const int tokenLength = tokenText.count();
+ TokenEngine::Token token(textIndex, tokenLength);
+ tokenList.append(token);
+ text += tokenSequence.text(t);
+ textIndex += tokenText.count();
+ }
+}
+
+/*
+ Copy a the range [startToken, startToken + numTokens> from a tokenSequence to a new
+ TokenConrtainer.
+*/
+template <typename TokenSequenceType>
+TokenContainer copy(const TokenSequenceType &tokenSequence, int startToken, int numTokens)
+{
+ QByteArray containerText;
+ QVector<Token> tokens;
+ tokens.reserve(numTokens);
+ TokenEngine::copy(containerText, tokens, tokenSequence, startToken, numTokens);
+ return TokenContainer(containerText, tokens);
+}
+
+} //namespace TokenEngine
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/tokenizer.cpp b/tools/porting/src/tokenizer.cpp
new file mode 100644
index 0000000..4dcaa46
--- /dev/null
+++ b/tools/porting/src/tokenizer.cpp
@@ -0,0 +1,491 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tokenizer.h"
+#include "tokens.h"
+#include <QDateTime>
+#include <QHash>
+#include <ctype.h>
+
+QT_BEGIN_NAMESPACE
+
+using TokenEngine::Token;
+
+static QHash<QByteArray, bool> preprocessed;
+bool Tokenizer::s_initialized = false;
+Tokenizer::scan_fun_ptr Tokenizer::s_scan_table[128 + 1];
+int Tokenizer::s_attr_table[256];
+
+Tokenizer::Tokenizer()
+ : m_buffer(0), m_ptr(0)
+{
+ if (!s_initialized)
+ setupScanTable();
+}
+
+Tokenizer::~Tokenizer()
+{
+}
+
+enum
+{
+ A_Alpha = 0x01,
+ A_Digit = 0x02,
+ A_Alphanum = A_Alpha | A_Digit,
+ A_Whitespace = 0x04
+};
+
+void Tokenizer::setupScanTable()
+{
+ s_initialized = true;
+
+ memset(s_attr_table, 0, 256);
+
+ for (int i=0; i<128; ++i) {
+ switch (i) {
+ case ':':
+ case '*':
+ case '%':
+ case '^':
+ case '=':
+ case '!':
+ case '&':
+ case '|':
+ case '+':
+ case '<':
+ case '>':
+ case '-':
+ case '.':
+ s_scan_table[i] = &Tokenizer::scanOperator;
+ break;
+
+ case '\r':
+ case '\n':
+ s_scan_table[i] = &Tokenizer::scanNewline;
+ break;
+
+ case '#':
+ s_scan_table[i] = &Tokenizer::scanPreprocessor;
+ break;
+
+ case '/':
+ s_scan_table[i] = &Tokenizer::scanComment;
+ break;
+
+ case '\'':
+ s_scan_table[i] = &Tokenizer::scanCharLiteral;
+ break;
+
+ case '"':
+ s_scan_table[i] = &Tokenizer::scanStringLiteral;
+ break;
+
+ default:
+ if (isspace(i)) {
+ s_scan_table[i] = &Tokenizer::scanWhiteSpaces;
+ s_attr_table[i] |= A_Whitespace;
+ } else if (isalpha(i) || i == '_') {
+ s_scan_table[i] = &Tokenizer::scanIdentifier;
+ s_attr_table[i] |= A_Alpha;
+ } else if (isdigit(i)) {
+ s_scan_table[i] = &Tokenizer::scanNumberLiteral;
+ s_attr_table[i] |= A_Digit;
+ } else
+ s_scan_table[i] = &Tokenizer::scanChar;
+ }
+ }
+
+ s_scan_table[128] = &Tokenizer::scanUnicodeChar;
+}
+
+QVector<TokenEngine::Token> Tokenizer::tokenize(QByteArray text)
+{
+ m_tokens.clear();
+
+ m_buffer = text;
+ m_ptr = 0;
+
+ // tokenize
+ for (;;) {
+ Token tk;
+ bool endOfFile = nextToken(tk);
+ if (endOfFile) {
+ break;
+ }
+ m_tokens.append(tk);
+ }
+
+ return m_tokens;
+}
+
+bool Tokenizer::nextToken(Token &tok)
+{
+ int start = m_ptr;
+ unsigned char ch = (unsigned char)m_buffer[m_ptr];
+
+ int kind = 0;
+ (this->*s_scan_table[ch < 128 ? ch : 128])(&kind);
+
+ tok.start = start;
+ tok.length = m_ptr - start;
+
+ return (kind == 0);
+}
+
+void Tokenizer::scanChar(int *kind)
+{
+ *kind = m_buffer[m_ptr++];
+}
+
+void Tokenizer::scanWhiteSpaces(int *kind)
+{
+ *kind = Token_whitespaces;
+ while (unsigned char ch = m_buffer[m_ptr]) {
+ if (s_attr_table[ch] & A_Whitespace)
+ ++m_ptr;
+ else
+ break;
+ }
+}
+
+void Tokenizer::scanNewline(int *kind)
+{
+ Q_UNUSED(kind);
+ const unsigned char ch = m_buffer[m_ptr++];
+ // Check for \n.
+ if (ch == '\n') {
+ *kind = '\n';
+ return;
+ }
+
+ // Check for \r\n.
+ if (ch == '\r' && m_buffer[m_ptr] == '\n') {
+ *kind = '\n';
+ ++ m_ptr;
+ return;
+ }
+
+ *kind = ch;
+}
+
+void Tokenizer::scanUnicodeChar(int *kind)
+{
+ *kind = m_buffer[m_ptr++];
+}
+
+void Tokenizer::scanCharLiteral(int *kind)
+{
+ ++m_ptr;
+ for (;;) {
+ unsigned char ch = m_buffer[m_ptr];
+ switch (ch) {
+ case '\0':
+ case '\n':
+ // ### error
+ *kind = Token_char_literal;
+ return;
+ case '\\':
+ if (m_buffer[m_ptr+1] == '\'' || m_buffer[m_ptr+1] == '\\')
+ m_ptr += 2;
+ else
+ ++m_ptr;
+ break;
+ case '\'':
+ ++m_ptr;
+ *kind = Token_char_literal;
+ return;
+ default:
+ ++m_ptr;
+ break;
+ }
+ }
+
+ // ### error
+ *kind = Token_char_literal;
+}
+
+void Tokenizer::scanStringLiteral(int *kind)
+{
+ ++m_ptr;
+ while (m_buffer[m_ptr]) {
+ switch (m_buffer[m_ptr]) {
+ case '\n':
+ // ### error
+ *kind = Token_string_literal;
+ return;
+ case '\\':
+ if (m_buffer[m_ptr+1] == '"' || m_buffer[m_ptr+1] == '\\')
+ m_ptr += 2;
+ else
+ ++m_ptr;
+ break;
+ case '"':
+ ++m_ptr;
+ *kind = Token_string_literal;
+ return;
+ default:
+ ++m_ptr;
+ break;
+ }
+ }
+
+ // ### error
+ *kind = Token_string_literal;
+}
+
+void Tokenizer::scanIdentifier(int *kind)
+{
+ unsigned char ch;
+ for (;;) {
+ ch = m_buffer[m_ptr];
+ if (s_attr_table[ch] & A_Alphanum)
+ ++m_ptr;
+ else
+ break;
+ }
+ *kind = Token_identifier;
+}
+
+void Tokenizer::scanNumberLiteral(int *kind)
+{
+ unsigned char ch;
+ for (;;) {
+ ch = m_buffer[m_ptr];
+ if (s_attr_table[ch] & A_Alphanum || ch == '.')
+ ++m_ptr;
+ else
+ break;
+ }
+
+ // ### finish to implement me!!
+ *kind = Token_number_literal;
+}
+
+void Tokenizer::scanComment(int *kind)
+{
+ if (!(m_buffer[m_ptr+1] == '/' || m_buffer[m_ptr+1] == '*')) {
+ scanOperator(kind);
+ return;
+ }
+
+ ++m_ptr; // skip '/'
+
+ bool multiLineComment = m_buffer[m_ptr++] == '*';
+
+ while (m_buffer[m_ptr]) {
+ switch (m_buffer[m_ptr]) {
+ case '\r':
+ case '\n':
+ if (!multiLineComment) {
+ *kind = Token_comment;
+ return;
+ }
+
+ (void) scanNewline(kind);
+ break;
+
+ case '*':
+ if (multiLineComment && m_buffer[m_ptr+1] == '/') {
+ m_ptr += 2;
+ *kind = Token_comment;
+ return;
+ }
+ ++m_ptr;
+ break;
+
+ default:
+ ++m_ptr;
+ }
+ }
+
+ // ### error
+ *kind = Token_comment;
+}
+
+
+void Tokenizer::scanPreprocessor(int *kind)
+{
+ ++m_ptr;
+ *kind = Token_preproc;
+}
+
+
+void Tokenizer::scanOperator(int *kind)
+{
+ switch (m_buffer[m_ptr]) {
+ case ':':
+ if (m_buffer[m_ptr+1] == ':') {
+ m_ptr += 2;
+ *kind = Token_scope;
+ return;
+ }
+ break;
+
+ case '*':
+ case '/':
+ case '%':
+ case '^':
+ if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '=':
+ case '!':
+ if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_eq;
+ return;
+ }
+ break;
+
+ case '&':
+ if (m_buffer[m_ptr+1] == '&') {
+ m_ptr += 2;
+ *kind = Token_and;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '|':
+ if (m_buffer[m_ptr+1] == '|' ) {
+ m_ptr += 2;
+ *kind = Token_or;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '+':
+ if (m_buffer[m_ptr+1] == '+' ) {
+ m_ptr += 2;
+ *kind = Token_incr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '<':
+ if (m_buffer[m_ptr+1] == '<') {
+ if (m_buffer[m_ptr+2] == '=') {
+ m_ptr += 3;
+ *kind = Token_assign;
+ return;
+ }
+ m_ptr += 2;
+ *kind = Token_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_leq;
+ return;
+ }
+ break;
+
+ case '>':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '=') {
+ m_ptr += 3;
+ *kind = Token_assign;
+ return;
+ }
+ m_ptr += 2;
+ *kind = Token_shift;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_geq;
+ return;
+ }
+ break;
+
+ case '-':
+ if (m_buffer[m_ptr+1] == '>') {
+ if (m_buffer[m_ptr+2] == '*') {
+ m_ptr += 3;
+ *kind = Token_ptrmem;
+ return;
+ }
+ m_ptr += 2;
+ *kind = Token_arrow;
+ return;
+ } else if (m_buffer[m_ptr+1] == '-') {
+ m_ptr += 2;
+ *kind = Token_decr;
+ return;
+ } else if (m_buffer[m_ptr+1] == '=') {
+ m_ptr += 2;
+ *kind = Token_assign;
+ return;
+ }
+ break;
+
+ case '.':
+ if (m_buffer[m_ptr+1] == '.' && m_buffer[m_ptr+2] == '.') {
+ m_ptr += 3;
+ *kind = Token_ellipsis;
+ return;
+ } else if (m_buffer[m_ptr+1] == '*') {
+ m_ptr += 2;
+ *kind = Token_ptrmem;
+ return;
+ }
+ break;
+
+ }
+
+ *kind = m_buffer[m_ptr++];
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/tokenizer.h b/tools/porting/src/tokenizer.h
new file mode 100644
index 0000000..b41aaf2
--- /dev/null
+++ b/tools/porting/src/tokenizer.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOKENIZER_H
+#define TOKENIZER_H
+
+#include "tokenengine.h"
+#include <QVector>
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+class Tokenizer
+{
+public:
+ Tokenizer();
+ ~Tokenizer();
+ typedef void (Tokenizer::*scan_fun_ptr)(int *kind);
+ QVector<TokenEngine::Token> tokenize(QByteArray text);
+private:
+ bool nextToken(TokenEngine::Token &tok);
+
+ void scanChar(int *kind);
+ void scanUnicodeChar(int *kind);
+ void scanNewline(int *kind);
+ void scanWhiteSpaces(int *kind);
+ void scanCharLiteral(int *kind);
+ void scanStringLiteral(int *kind);
+ void scanNumberLiteral(int *kind);
+ void scanIdentifier(int *kind);
+ void scanComment(int *kind);
+ void scanPreprocessor(int *kind);
+ void scanOperator(int *kind);
+
+ void setupScanTable();
+private:
+ static bool s_initialized;
+ static scan_fun_ptr s_scan_table[];
+ static int s_attr_table[];
+
+ const char *m_buffer;
+ int m_ptr;
+
+ QVector<TokenEngine::Token> m_tokens;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/tokenreplacements.cpp b/tools/porting/src/tokenreplacements.cpp
new file mode 100644
index 0000000..acf9ab9
--- /dev/null
+++ b/tools/porting/src/tokenreplacements.cpp
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tokenreplacements.h"
+#include "logger.h"
+#include "portingrules.h"
+
+QT_BEGIN_NAMESPACE
+using namespace TokenEngine;
+
+void addLogSourceEntry(const QString &text, const TokenContainer &tokenContainer, const int index)
+{
+ Logger *logger = Logger::instance();
+ int line = tokenContainer.line(index);
+ int col = tokenContainer.column(index);
+ SourcePointLogEntry *logEntry =
+ new SourcePointLogEntry(QLatin1String("Info"), QLatin1String("Porting"),
+ logger->globalState.value(QLatin1String("currentFileName")),
+ line, col, text);
+ logger->addEntry(logEntry);
+}
+
+void addLogWarning(const QString &text)
+{
+ Logger::instance()->addEntry(new PlainLogEntry(QLatin1String("Warning"), QLatin1String("Porting"), text));
+}
+
+QualifiedNameParser::QualifiedNameParser(const TokenContainer &tokenContainer, const int tokenIndex)
+:tokenContainer(tokenContainer)
+,currentIndex(tokenIndex)
+{
+ Q_ASSERT(isValidIndex(currentIndex));
+}
+
+bool QualifiedNameParser::isPartOfQualifiedName()
+{
+ return ((nextScopeToken(Left) != -1) || (nextScopeToken(Right) != -1));
+}
+
+
+bool QualifiedNameParser::isValidIndex(int index)
+{
+ return (index < tokenContainer.count() && index >= 0);
+}
+
+/*
+ A qualifier is a the leftmost or middle part of a qualified name
+*/
+bool QualifiedNameParser::isQualifier()
+{
+ return (nextScopeToken(Right) != -1);
+}
+
+/*
+ A name is a the rightmost part of a qualified name.
+*/
+bool QualifiedNameParser::isName()
+{
+ return (nextScopeToken(Left) != -1);
+}
+
+/*
+ Peek for a qualifier or name in the given direction
+*/
+int QualifiedNameParser::peek(Direction direction)
+{
+ return nextScopeToken(direction);
+}
+
+/*
+ Look for a qualifier or name in the given direction,update
+ current position if found.
+*/
+int QualifiedNameParser::move(Direction direction)
+{
+ int tokenIndex = nextScopeToken(direction);
+ if(tokenIndex != -1)
+ currentIndex = tokenIndex;
+ return tokenIndex;
+}
+
+/*
+ Looks for "::" starting at currentIndex, returns the token index
+ for it if found. If the first non-whitespace token found is something else,
+ -1 is returned.
+*/
+int QualifiedNameParser::findScopeOperator(Direction direction)
+{
+ int tokenIndex = currentIndex;
+ QByteArray tokenText;
+ //loop until we get a token containg text or we pass the beginning/end of the source
+ tokenIndex += direction;
+ while(tokenText.isEmpty() && isValidIndex(tokenIndex)) {
+ tokenText = tokenContainer.text(tokenIndex).trimmed();
+ if(tokenText==QByteArray("::"))
+ return tokenIndex;
+ tokenIndex += direction;
+ }
+ return -1;
+}
+/*
+ Walks a qualified name. Returns the token index
+ for the next identifer in the qualified name, or -1 if its not found.
+*/
+int QualifiedNameParser::nextScopeToken(Direction direction)
+{
+ int tokenIndex = findScopeOperator(direction);
+ if (tokenIndex == -1)
+ return -1;
+ QByteArray tokenText;
+ //loop until we get a token containg text or we pass the start of the source
+ tokenIndex += direction;
+ while(tokenText.isEmpty() && isValidIndex(tokenIndex)) {
+ tokenText = tokenContainer.text(tokenIndex).trimmed();
+ tokenIndex += direction;
+ }
+ return tokenIndex - direction;
+}
+
+/////////////////////
+GenericTokenReplacement::GenericTokenReplacement(QByteArray oldToken, QByteArray newToken)
+:oldToken(oldToken)
+,newToken(newToken)
+{}
+
+QByteArray GenericTokenReplacement::getReplaceKey()
+{
+ return QByteArray(oldToken);
+}
+
+bool GenericTokenReplacement::doReplace(const TokenContainer &tokenContainer,
+ int index, TextReplacements &textReplacements)
+{
+ QByteArray tokenText = tokenContainer.text(index);
+ if(tokenText == oldToken){
+ addLogSourceEntry(QString::fromLatin1(tokenText + QByteArray(" -> ") + newToken), tokenContainer, index);
+ TokenEngine::Token token = tokenContainer.token(index);
+ textReplacements.insert(newToken, token.start, token.length);
+ return true;
+ }
+ return false;
+
+}
+
+///////////////////
+ClassNameReplacement::ClassNameReplacement(QByteArray oldToken, QByteArray newToken)
+:oldToken(oldToken)
+,newToken(newToken)
+{}
+
+QByteArray ClassNameReplacement::getReplaceKey()
+{
+ return QByteArray(oldToken);
+}
+
+/*
+ Replace a class name token. If the class name is a scope specifier (a "qualifier")
+ in a qualified name, we check if qualified name will be replaced by a porting rule.
+ If so, we don't do the class name replacement.
+*/
+bool ClassNameReplacement::doReplace(const TokenContainer &tokenContainer, int index, TextReplacements &textReplacements)
+{
+ QByteArray tokenText = tokenContainer.text(index);
+ if(tokenText != oldToken)
+ return false;
+
+ QualifiedNameParser nameParser(tokenContainer, index);
+ if(nameParser.isPartOfQualifiedName() &&
+ nameParser.peek(QualifiedNameParser::Right) != -1) {
+ int nameTokenIndex = nameParser.peek(QualifiedNameParser::Right);
+ QByteArray name = tokenContainer.text(nameTokenIndex);
+ TextReplacements textReplacements;
+ QList<TokenReplacement*> tokenReplacements
+ = PortingRules::instance()->getTokenReplacementRules();
+ bool changed = false;
+ foreach(TokenReplacement *tokenReplacement, tokenReplacements) {
+ changed = tokenReplacement->doReplace(tokenContainer, nameTokenIndex, textReplacements);
+ if(changed)
+ break;
+ }
+ if(changed)
+ return false;
+ }
+ addLogSourceEntry(QString::fromLatin1(tokenText + QByteArray(" -> ") + newToken), tokenContainer, index);
+ TokenEngine::Token token = tokenContainer.token(index);
+ textReplacements.insert(newToken, token.start, token.length);
+ return true;
+}
+
+///////////////////
+
+ScopedTokenReplacement::ScopedTokenReplacement(const QByteArray &oldToken,
+ const QByteArray &newToken)
+:newScopedName(newToken)
+{
+ Q_ASSERT(oldToken.contains(QByteArray("::")));
+
+ // Split oldToken into scope and name parts.
+ oldName = oldToken.mid(oldToken.lastIndexOf(':')+1);
+ oldScope = oldToken.mid(0, oldToken.indexOf(':'));
+
+ // Split newToken into scope and name parts, execept if we have a spcial
+ // case like Qt::WType_Modal -> (Qt::WType_Dialog | Qt::WShowModal)
+ if (newToken.count(QByteArray("::")) != 1 || newToken.contains(QByteArray("("))) {
+ newName = newToken;
+ } else {
+ newName = newToken.mid(newToken.lastIndexOf(':')+1);
+ newScope = newToken.mid(0, newToken.indexOf(':'));
+ }
+
+ strictMode = Logger::instance()->globalState.contains(QString::fromLatin1("strictMode"));
+}
+
+bool ScopedTokenReplacement::doReplace(const TokenContainer &tokenContainer, int sourceIndex, TextReplacements &textReplacements)
+{
+ const QByteArray sourceName = tokenContainer.text(sourceIndex);
+
+ // Check if the token texts matches.
+ if (sourceName != oldName)
+ return false;
+
+ // Get token attributes. The attributes are created by the the C++ parser/analyzer.
+ const TokenAttributes *attributes = tokenContainer.tokenAttributes();
+ // If the declaration attribute is set we don't replace.
+ if (!attributes->attribute(sourceIndex, "declaration").isEmpty())
+ return false;
+ // If the unknown (undeclared) attribute is set we don't replace.
+ if (!attributes->attribute(sourceIndex, "unknown").isEmpty())
+ return false;
+ // If nameUse is set we test if the nameUse refers to the correct declaration.
+ // This is done by checking the parentScope attriute, wich returns the scope
+ // for the declaration associated with this name use.
+ const bool haveNameUseInfo = !attributes->attribute(sourceIndex, "nameUse").isEmpty();
+ if (haveNameUseInfo) {
+ if (attributes->attribute(sourceIndex, "parentScope") != oldScope)
+ return false;
+ // If the user has specified -strict, we don't replace tokens when we don't have name use info.
+ } else if (strictMode) {
+ return false;
+ }
+
+ // The token might have a qualifier, and in that case we need to check if
+ // we should replace the qualifier as well.
+ QualifiedNameParser nameParser(tokenContainer, sourceIndex);
+
+ // This is a pretty special case, it means that in a qualified
+ // name like aaa::bbb the replacement rule has been triggered for
+ // the aaa part. Since this is not what we'd normally use a
+ // ScopedReplacement for, we just return here.
+ if (nameParser.isQualifier())
+ return false;
+
+ // If the token is unqualified, just replace it.
+ if (!nameParser.isPartOfQualifiedName()) {
+ // If we have no name use info we try to avoid replacements of
+ // e.g. Vertical with QSizePolicy::Vertically. Unqualified tokens
+ // can't happen for classes one does not usually inherit from, so
+ // we only let them pass for stuff that people usually inherited from.
+ if (!haveNameUseInfo && newScope != "Qt" && newScope != "QFrame" && newScope != "QValidator")
+ return false;
+
+ const Token sourceToken = tokenContainer.token(sourceIndex);
+ addLogSourceEntry(QString::fromLatin1(sourceName + QByteArray(" -> ") + newScopedName), tokenContainer, sourceIndex);
+ textReplacements.insert(newScopedName, sourceToken.start, sourceName.size());
+ return true;
+ }
+
+ // Peek left for the qualifer token.
+ const int sourceScopeIndex = nameParser.peek(QualifiedNameParser::Left);
+ if (sourceScopeIndex == -1) {
+ return false;
+ }
+
+ const Token sourceNameToken = tokenContainer.token(sourceIndex);
+ const Token sourceScopeToken = tokenContainer.token(sourceScopeIndex);
+ const QByteArray sourceScope = tokenContainer.text(sourceScopeIndex);
+
+ // If we have no name use info and the source and old scopes don't match,
+ // we generally dont't do a replace, unless the old scope is Qt and
+ // the source scope inherits Qt. For example, QWidget::ButtonState should
+ // be renamed to Qt::ButtonState.
+ if (!haveNameUseInfo && sourceScope != oldScope) {
+ if (oldScope != "Qt")
+ return false;
+ // Check if sourceScope inherits the Qt class.
+ if (!PortingRules::instance()->getInheritsQt().contains(QString::fromLatin1(sourceScope.constData()))) //TODO optimize: linear search
+ return false;
+ }
+
+ // Spcecial cases, such as QIODevice::Offset -> Q_LONGLONG
+ // or Qt::WType_Modal -> (Qt::WType_Dialog | Qt::WShowModal).
+ if (newScope.isEmpty()) {
+ addLogSourceEntry(QString::fromLatin1((sourceScope + QByteArray("::") + sourceName +
+ QByteArray(" -> ") + newScopedName).constData()), tokenContainer, sourceIndex);
+ const int qualiferLength = sourceNameToken.start - sourceScopeToken.start;
+ const int length = qualiferLength + sourceNameToken.length;
+ textReplacements.insert(newName, sourceScopeToken.start, length);
+ return true;
+ }
+
+ // If the old and new scopes are equal, we replace the name part only.
+ if (newScope == sourceScope) {
+ // If the names are equal, there is no need to do anything.
+ if (newName == sourceName)
+ return true;
+ addLogSourceEntry(QString::fromLatin1((sourceName + QByteArray(" -> ") + newName).constData()), tokenContainer, sourceIndex);
+ textReplacements.insert(newName, sourceNameToken.start, sourceNameToken.length);
+ return true;
+ }
+
+ // If the names are equal, replace scope only.
+ if (newName == sourceName) {
+ addLogSourceEntry(QString::fromLatin1((sourceScope + QByteArray(" -> ") + newScope).constData()), tokenContainer, sourceScopeIndex);
+ textReplacements.insert(newScope, sourceScopeToken.start, sourceScopeToken.length);
+ return true;
+ }
+
+ // Replace scope and name.
+ addLogSourceEntry(QString::fromLatin1((sourceScope + QByteArray("::") + sourceName +
+ QByteArray(" -> ") + newScopedName).constData()),
+ tokenContainer, sourceScopeIndex);
+ textReplacements.insert(newScope, sourceScopeToken.start, sourceScopeToken.length);
+ textReplacements.insert(newName, sourceNameToken.start, sourceNameToken.length);
+ return true;
+}
+
+QByteArray ScopedTokenReplacement::getReplaceKey()
+{
+ return oldName;
+}
+
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/tokenreplacements.h b/tools/porting/src/tokenreplacements.h
new file mode 100644
index 0000000..e92a68c
--- /dev/null
+++ b/tools/porting/src/tokenreplacements.h
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOKENREPLACEMENTS_H
+#define TOKENREPLACEMENTS_H
+
+#include "tokenengine.h"
+#include "textreplacement.h"
+#include <QStringList>
+#include <QByteArray>
+
+QT_BEGIN_NAMESPACE
+
+void addLogSourceEntry(const QString &text, const TokenEngine::TokenContainer&, const int index);
+void addLogWarning(const QString &text);
+
+class TokenReplacement
+{
+public:
+
+ virtual bool doReplace(const TokenEngine::TokenContainer& ,
+ int /*tokenIndex*/,
+ TextReplacements&){return false;};
+ /*
+ returns the replace key for this replacement. Every time a token matches the replace key,
+ doReplace() will be called for this TokenReplacement.
+ */
+ virtual QByteArray getReplaceKey(){return QByteArray();};
+ virtual ~TokenReplacement(){};
+};
+
+/*
+ A TokenReplacement that change any token
+*/
+class GenericTokenReplacement : public TokenReplacement
+{
+public:
+ GenericTokenReplacement(QByteArray oldToken, QByteArray newToken);
+ bool doReplace(const TokenEngine::TokenContainer &tokenContainer,
+ int tokenIndex, TextReplacements &textReplacements);
+ QByteArray getReplaceKey();
+private:
+ QByteArray oldToken;
+ QByteArray newToken;
+};
+
+/*
+ A TokenReplacement that changes tokens that specify class names.
+ In some cases where the class name token is a part of a qualified name
+ it is not correct to rename it. ex:
+
+ QButton::toggleState
+
+ Here it is wrong to rename QButton -> Q3Button, since there is
+ a rule that says QButton::ToggleState -> QCheckBox::ToggleState,
+ but no rule for Q3Button::ToggleState.
+*/
+class ClassNameReplacement : public TokenReplacement
+{
+public:
+ ClassNameReplacement(QByteArray oldToken, QByteArray newToken);
+ bool doReplace(const TokenEngine::TokenContainer &tokenContainer,
+ int tokenIndex, TextReplacements &textReplacements);
+ QByteArray getReplaceKey();
+private:
+ QByteArray oldToken;
+ QByteArray newToken;
+};
+
+/*
+ Changes scoped tokens:
+ AA::BB -> CC::DD
+ oldToken corresponds to the AA::BB part, newToken corresponds CC::DD.
+ Since this is a token replacement, the AA part of oldToken is typically
+ unknown. This means that we might change tokens named BB that does not belong
+ to the AA scope. Ast replacemnts will fix this.
+
+*/
+class ScopedTokenReplacement : public TokenReplacement
+{
+public:
+ ScopedTokenReplacement(const QByteArray &oldToken, const QByteArray &newToken);
+ bool doReplace(const TokenEngine::TokenContainer &tokenContainer,
+ int tokenIndex, TextReplacements &textReplacements);
+ QByteArray getReplaceKey();
+private:
+ QByteArray oldName;
+ QByteArray oldScope;
+ QByteArray newName;
+ QByteArray newScope;
+ QByteArray newScopedName;
+ bool strictMode;
+};
+
+class QualifiedNameParser
+{
+public:
+ QualifiedNameParser(const TokenEngine::TokenContainer &tokenContainer,
+ const int tokenIndex);
+ enum Direction { Left=-1, Right=1 };
+ bool isPartOfQualifiedName();
+ bool isValidIndex(int index);
+ bool isQualifier();
+ bool isName();
+ int peek(Direction direction);
+ int move(Direction direction);
+private:
+ int nextScopeToken(Direction direction);
+ int findScopeOperator(Direction direction);
+ const TokenEngine::TokenContainer tokenContainer;
+ int currentIndex;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/tokens.h b/tools/porting/src/tokens.h
new file mode 100644
index 0000000..09154fd
--- /dev/null
+++ b/tools/porting/src/tokens.h
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOKENS_H
+#define TOKENS_H
+
+#include <qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+enum Type
+{
+ Token_eof = 0,
+ Token_newline = 10,
+ Token_identifier = 1000,
+ Token_number_literal,
+ Token_char_literal,
+ Token_string_literal,
+ Token_whitespaces,
+ Token_comment,
+ Token_preproc,
+ Token_line_comment,
+ Token_multiline_comment,
+
+ Token_assign = 2000,
+ Token_ptrmem,
+ Token_ellipsis,
+ Token_scope,
+ Token_shift,
+ Token_eq,
+ Token_leq,
+ Token_geq,
+ Token_incr,
+ Token_decr,
+ Token_arrow,
+
+ Token_concat,
+
+ Token___typeof,
+
+ Token_K_DCOP,
+ Token_k_dcop,
+ Token_k_dcop_signals,
+
+ Token_Q_OBJECT,
+ Token_signals,
+ Token_slots,
+ Token_emit,
+
+ Token_and,
+ Token_and_eq,
+ Token_asm,
+ Token_auto,
+ Token_bitand,
+ Token_bitor,
+ Token_bool,
+ Token_break,
+ Token_case,
+ Token_catch,
+ Token_char,
+ Token_class,
+ Token_compl,
+ Token_const,
+ Token_const_cast,
+ Token_continue,
+ Token_default,
+ Token_delete,
+ Token_do,
+ Token_double,
+ Token_dynamic_cast,
+ Token_else,
+ Token_enum,
+ Token_explicit,
+ Token_export,
+ Token_extern,
+ Token_false,
+ Token_float,
+ Token_for,
+ Token_friend,
+ Token_goto,
+ Token_if,
+ Token_inline,
+ Token_int,
+ Token_long,
+ Token_mutable,
+ Token_namespace,
+ Token_new,
+ Token_not,
+ Token_not_eq,
+ Token_operator,
+ Token_or,
+ Token_or_eq,
+ Token_private,
+ Token_protected,
+ Token_public,
+ Token_register,
+ Token_reinterpret_cast,
+ Token_return,
+ Token_short,
+ Token_signed,
+ Token_sizeof,
+ Token_static,
+ Token_static_cast,
+ Token_struct,
+ Token_switch,
+ Token_template,
+ Token_this,
+ Token_throw,
+ Token_true,
+ Token_try,
+ Token_typedef,
+ Token_typeid,
+ Token_typename,
+ Token_union,
+ Token_unsigned,
+ Token_using,
+ Token_virtual,
+ Token_void,
+ Token_volatile,
+ Token_wchar_t,
+ Token_while,
+ Token_xor,
+ Token_xor_eq,
+
+ Token_left_shift,
+ Token_right_shift,
+
+ // preprecessor
+ Token_directive_identifier,
+ Token_directive_if,
+ Token_directive_elif,
+ Token_directive_else,
+ Token_directive_undef,
+ Token_directive_endif,
+ Token_directive_ifdef,
+ Token_directive_ifndef,
+ Token_directive_define,
+ Token_directive_include,
+ Token_directive_line,
+ Token_directive_error,
+ Token_directive_pragma,
+ Token_defined
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/tokenstreamadapter.h b/tools/porting/src/tokenstreamadapter.h
new file mode 100644
index 0000000..8983053
--- /dev/null
+++ b/tools/porting/src/tokenstreamadapter.h
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOKENSTREAMADAPTER_H
+#define TOKENSTREAMADAPTER_H
+
+#include "tokenengine.h"
+#include "tokens.h"
+
+#include <QVector>
+
+QT_BEGIN_NAMESPACE
+
+namespace TokenStreamAdapter {
+struct TokenStream
+{
+ TokenStream(TokenEngine::TokenSectionSequence translationUnit, QVector<Type> tokenKindList)
+ :m_translationUnit(translationUnit),
+ m_tokenKindList(tokenKindList),
+ m_cursor(0),
+ m_numTokens(tokenKindList.count())
+ {
+ Q_ASSERT(translationUnit.count() == m_numTokens);
+
+ // Copy out the container and containerIndex for each token so we can have
+ // constant time random access to it.
+ TokenEngine::TokenSectionSequenceIterator it(translationUnit);
+ while(it.nextToken()) {
+ m_tokenContainers.append(it.tokenContainer());
+ m_containerIndices.append(it.containerIndex());
+ }
+ }
+
+ bool isHidden(int index) const
+ {
+ if(index >= m_numTokens)
+ return false;
+ QT_PREPEND_NAMESPACE(Type) type = m_tokenKindList.at(index);
+ return (type == Token_whitespaces || type == 10 /*newline*/ ||
+ type == Token_comment || type == Token_preproc );
+ }
+
+ inline int lookAhead(int n = 0) const
+ {
+ if(m_cursor + n >= m_numTokens)
+ return 0;
+ return m_tokenKindList.at(m_cursor + n);
+ }
+
+ inline int currentToken() const
+ { return lookAhead(); }
+
+ inline QByteArray currentTokenText() const
+ {
+ return tokenText(m_cursor);
+ }
+
+ inline TokenEngine::TokenContainer tokenContainer(int index = 0) const
+ {
+ if (index < m_numTokens)
+ return m_tokenContainers.at(index);
+ else
+ return TokenEngine::TokenContainer();
+ }
+
+ inline int containerIndex(int index = 0) const
+ {
+ if (index < m_numTokens)
+ return m_containerIndices.at(index);
+ else
+ return -1;
+ }
+
+ inline QByteArray tokenText(int index = 0) const
+ {
+ if (index < m_numTokens) {
+ const TokenEngine::TokenContainer container = tokenContainer(index);
+ const int cIndex = containerIndex(index);
+ return container.text(cIndex);
+ } else {
+ return QByteArray();
+ }
+ }
+
+ inline void rewind(int index)
+ { m_cursor = index; }
+
+ inline int cursor() const
+ { return m_cursor; }
+
+ inline void nextToken()
+ { ++m_cursor; }
+
+ inline bool tokenAtEnd()
+ { return m_cursor >= m_numTokens; }
+
+ TokenEngine::TokenSectionSequence tokenSections() const
+ { return m_translationUnit; }
+
+private:
+ TokenEngine::TokenSectionSequence m_translationUnit;
+ QVector<Type> m_tokenKindList;
+ QList<TokenEngine::TokenContainer> m_tokenContainers;
+ QList<int> m_containerIndices;
+ int m_cursor;
+ int m_numTokens;
+};
+
+} //namespace TokenStreamAdapter
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/translationunit.cpp b/tools/porting/src/translationunit.cpp
new file mode 100644
index 0000000..b49225b
--- /dev/null
+++ b/tools/porting/src/translationunit.cpp
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "translationunit.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace TokenEngine;
+using namespace CodeModel;
+using namespace TokenStreamAdapter;
+
+TranslationUnit::TranslationUnit()
+{
+ TokenSectionSequence empty;
+ d = new TranslationUnitData(empty);
+}
+
+TranslationUnit::TranslationUnit(const TokenEngine::TokenSectionSequence &tokens)
+{ d = new TranslationUnitData(tokens); }
+
+TokenSectionSequence TranslationUnit::tokens() const
+{ return d->tokens; }
+
+void TranslationUnit::setCodeModel(NamespaceScope *globalScope)
+{ d->globalScope = globalScope; }
+
+NamespaceScope *TranslationUnit::codeModel()
+{ return d->globalScope; }
+
+TypedPool<CodeModel::Item> *TranslationUnit::codeModelMemoryPool()
+{ return &d->codeModelMemoryPool; }
+
+
+
+/*
+ Performs C++ parsing and semantic analysis on a translation unit.
+ Returns a TranslationUnit, which contains all the data.
+*/
+TranslationUnit TranslationUnitAnalyzer::analyze
+ (const TokenSectionSequence &translationUnitTokens, int targetMaxASTNodes)
+{
+ TranslationUnit translationUnit(translationUnitTokens);
+ CodeModel::NamespaceScope *codeModel =
+ CodeModel::Create<CodeModel::NamespaceScope>(translationUnit.codeModelMemoryPool());
+ translationUnit.setCodeModel(codeModel);
+
+ // run lexical analysis
+ QVector<QT_PREPEND_NAMESPACE(Type)> typeList = lexer.lex(translationUnitTokens);
+ TokenStreamAdapter::TokenStream tokenStream(translationUnitTokens, typeList);
+
+ Semantic semantic(codeModel, &tokenStream, translationUnit.codeModelMemoryPool());
+
+ // parse and run semantic on the translation unit
+ bool done = false;
+ while(!done) {
+ pool p;
+ TranslationUnitAST *node = parser.parse(&tokenStream, &p, targetMaxASTNodes, done);
+ semantic.parseTranslationUnit(node);
+ }
+
+ return translationUnit;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/translationunit.h b/tools/porting/src/translationunit.h
new file mode 100644
index 0000000..0a378ae
--- /dev/null
+++ b/tools/porting/src/translationunit.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TRANSLATIONUNIT_H
+#define TRANSLATIONUNIT_H
+
+#include "tokenengine.h"
+#include "tokenstreamadapter.h"
+#include "ast.h"
+#include "codemodel.h"
+#include "smallobject.h"
+#include "cpplexer.h"
+#include "parser.h"
+#include "semantic.h"
+#include <QSharedData>
+
+QT_BEGIN_NAMESPACE
+
+class TranslationUnitData : public QSharedData
+{
+public:
+ TranslationUnitData(const TokenEngine::TokenSectionSequence &t)
+ :tokens(t), globalScope(0) {};
+ TokenEngine::TokenSectionSequence tokens;
+ CodeModel::NamespaceScope *globalScope;
+ TypedPool<CodeModel::Item> codeModelMemoryPool;
+};
+
+class TranslationUnit
+{
+public:
+ TranslationUnit();
+ TranslationUnit(const TokenEngine::TokenSectionSequence &tokens);
+ TokenEngine::TokenSectionSequence tokens() const;
+ CodeModel::NamespaceScope *codeModel();
+ TypedPool<CodeModel::Item> *codeModelMemoryPool();
+private:
+ friend class TranslationUnitAnalyzer;
+ void setCodeModel(CodeModel::NamespaceScope *globalScope);
+ QExplicitlySharedDataPointer<TranslationUnitData> d;
+};
+
+class TranslationUnitAnalyzer
+{
+public:
+ TranslationUnit analyze
+ (const TokenEngine::TokenSectionSequence &translationUnitTokens, int targetMaxASTNodes = 10000);
+private:
+ CppLexer lexer;
+ Parser parser;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/porting/src/treewalker.cpp b/tools/porting/src/treewalker.cpp
new file mode 100644
index 0000000..98ab60c
--- /dev/null
+++ b/tools/porting/src/treewalker.cpp
@@ -0,0 +1,457 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "treewalker.h"
+
+QT_BEGIN_NAMESPACE
+
+/*
+template <class T>
+inline void parseAll(TreeWalker *w, const List<T *> *l)
+{
+ if (!l)
+ return;
+
+ foreach(T *e, *l)
+ w->parseNode(e);
+}
+*/
+
+//Workaround for ICE on MSVC, use macro instead of template.
+#define PARSE_ALL(ListType, ListValueType) \
+inline void parseAll(TreeWalker *w, const ListType *l) \
+{ \
+ if (!l) \
+ return; \
+ foreach(ListValueType *e, *l) \
+ w->parseNode(e); \
+} \
+
+PARSE_ALL(List<AST *>, AST)
+PARSE_ALL(List<ClassOrNamespaceNameAST *>, ClassOrNamespaceNameAST)
+PARSE_ALL(List<BaseSpecifierAST *>, BaseSpecifierAST)
+PARSE_ALL(List<DeclarationAST *>, DeclarationAST)
+PARSE_ALL(List<EnumeratorAST *>, EnumeratorAST)
+PARSE_ALL(List<ParameterDeclarationAST *>, ParameterDeclarationAST)
+PARSE_ALL(List<InitDeclaratorAST *>, InitDeclaratorAST)
+PARSE_ALL(List<TemplateParameterAST *>, TemplateParameterAST)
+PARSE_ALL(List<StatementAST *>, StatementAST)
+
+
+void TreeWalker::parseTemplateArgumentList(TemplateArgumentListAST *node)
+{
+ List<AST *> *arglist = node->argumentList();
+ parseAll(this, arglist);
+}
+
+void TreeWalker::parseClassOrNamespaceName(ClassOrNamespaceNameAST *node)
+{
+ parseNode(node->name());
+ parseNode(node->templateArgumentList());
+}
+
+void TreeWalker::parseName(NameAST *node)
+{
+ parseAll(this, node->classOrNamespaceNameList());
+ parseNode(node->unqualifiedName());
+}
+
+void TreeWalker::parseTypeParameter(TypeParameterAST *node)
+{
+ parseNode(node->templateParameterList());
+ parseNode(node->name());
+ parseNode(node->typeId());
+}
+
+void TreeWalker::parseDeclaration(DeclarationAST *node)
+{
+ switch (node->nodeType()) {
+ case NodeType_AccessDeclaration:
+ parseAccessDeclaration(static_cast<AccessDeclarationAST*>(node));
+ break;
+ case NodeType_LinkageSpecification:
+ parseLinkageSpecification(static_cast<LinkageSpecificationAST*>(node));
+ break;
+ case NodeType_Namespace:
+ parseNamespace(static_cast<NamespaceAST*>(node));
+ break;
+ case NodeType_NamespaceAlias:
+ parseNamespaceAlias(static_cast<NamespaceAliasAST*>(node));
+ break;
+ case NodeType_Using:
+ parseUsing(static_cast<UsingAST*>(node));
+ break;
+ case NodeType_UsingDirective:
+ parseUsingDirective(static_cast<UsingDirectiveAST*>(node));
+ break;
+ case NodeType_Typedef:
+ parseTypedef(static_cast<TypedefAST*>(node));
+ break;
+ case NodeType_TemplateDeclaration:
+ parseTemplateDeclaration(static_cast<TemplateDeclarationAST*>(node));
+ break;
+ case NodeType_SimpleDeclaration:
+ parseSimpleDeclaration(static_cast<SimpleDeclarationAST*>(node));
+ break;
+ case NodeType_FunctionDefinition:
+ parseFunctionDefinition(static_cast<FunctionDefinitionAST*>(node));
+ break;
+ default:
+ break;
+ }
+}
+
+void TreeWalker::parseAccessDeclaration(AccessDeclarationAST *node)
+{
+ parseAll(this, node->accessList());
+}
+
+void TreeWalker::parseTypeSpecifier(TypeSpecifierAST *node)
+{
+ parseNode(node->name());
+ parseNode(node->cvQualify());
+ parseNode(node->cv2Qualify());
+
+ switch (node->nodeType()) {
+ case NodeType_ClassSpecifier:
+ parseClassSpecifier(static_cast<ClassSpecifierAST*>(node));
+ break;
+ case NodeType_EnumSpecifier:
+ parseEnumSpecifier(static_cast<EnumSpecifierAST*>(node));
+ break;
+ case NodeType_ElaboratedTypeSpecifier:
+ parseElaboratedTypeSpecifier(static_cast<ElaboratedTypeSpecifierAST*>(node));
+ break;
+ default:
+ break;
+ }
+}
+
+void TreeWalker::parseBaseSpecifier(BaseSpecifierAST *node)
+{
+ parseNode(node->isVirtual());
+ parseNode(node->access());
+ parseNode(node->name());
+}
+
+void TreeWalker::parseBaseClause(BaseClauseAST *node)
+{
+ parseAll(this, node->baseSpecifierList());
+}
+
+void TreeWalker::parseClassSpecifier(ClassSpecifierAST *node)
+{
+ parseNode(node->winDeclSpec());
+ parseNode(node->classKey());
+ parseNode(node->baseClause());
+ parseAll(this, node->declarationList());
+}
+
+void TreeWalker::parseEnumerator(EnumeratorAST *node)
+{
+ parseNode(node->id());
+ parseNode(node->expression());
+}
+
+void TreeWalker::parseEnumSpecifier(EnumSpecifierAST *node)
+{
+ parseAll(this, node->enumeratorList());
+}
+
+void TreeWalker::parseElaboratedTypeSpecifier(ElaboratedTypeSpecifierAST *node)
+{
+ parseNode(node->kind());
+}
+
+void TreeWalker::parseLinkageBody(LinkageBodyAST *node)
+{
+ parseAll(this, node->declarationList());
+}
+
+void TreeWalker::parseLinkageSpecification(LinkageSpecificationAST *node)
+{
+ parseNode(node->externType());
+ parseNode(node->linkageBody());
+ parseNode(node->declaration());
+}
+
+void TreeWalker::parseNamespace(NamespaceAST *node)
+{
+ parseNode(node->namespaceName());
+ parseNode(node->linkageBody());
+}
+
+void TreeWalker::parseNamespaceAlias(NamespaceAliasAST *node)
+{
+ parseNode(node->namespaceName());
+ parseNode(node->aliasName());
+}
+
+void TreeWalker::parseUsing(UsingAST *node)
+{
+ parseNode(node->typeName());
+ parseNode(node->name());
+}
+
+void TreeWalker::parseUsingDirective(UsingDirectiveAST *node)
+{
+ parseNode(node->name());
+}
+
+void TreeWalker::parseDeclarator(DeclaratorAST *node)
+{
+ parseAll(this, node->ptrOpList());
+ parseNode(node->subDeclarator());
+ parseNode(node->declaratorId());
+ parseNode(node->bitfieldInitialization());
+ parseAll(this, node->arrayDimensionList());
+ parseNode(node->parameterDeclarationClause());
+ parseNode(node->constant());
+ parseNode(node->exceptionSpecification());
+}
+
+void TreeWalker::parseParameterDeclaration(ParameterDeclarationAST *node)
+{
+ parseNode(node->typeSpec());
+ parseNode(node->declarator());
+ parseNode(node->expression());
+}
+
+void TreeWalker::parseParameterDeclarationList(ParameterDeclarationListAST *node)
+{
+ parseAll(this, node->parameterList());
+}
+
+void TreeWalker::parseParameterDeclarationClause(ParameterDeclarationClauseAST *node)
+{
+ parseNode(node->parameterDeclarationList());
+ parseNode(node->ellipsis());
+}
+
+void TreeWalker::parseInitDeclarator(InitDeclaratorAST *node)
+{
+ parseNode(node->declarator());
+ parseNode(node->initializer());
+}
+
+void TreeWalker::parseInitDeclaratorList(InitDeclaratorListAST *node)
+{
+ parseAll(this, node->initDeclaratorList());
+}
+
+void TreeWalker::parseTypedef(TypedefAST *node)
+{
+ parseNode(node->typeSpec());
+ parseNode(node->initDeclaratorList());
+}
+
+void TreeWalker::parseTemplateParameter(TemplateParameterAST *node)
+{
+ parseNode(node->typeParameter());
+ parseNode(node->typeValueParameter());
+}
+
+void TreeWalker::parseTemplateParameterList(TemplateParameterListAST *node)
+{
+ parseAll(this, node->templateParameterList());
+}
+
+void TreeWalker::parseTemplateDeclaration(TemplateDeclarationAST *node)
+{
+ parseNode(node->exported());
+ parseNode(node->templateParameterList());
+ parseNode(node->declaration());
+}
+
+void TreeWalker::parseSimpleDeclaration(SimpleDeclarationAST *node)
+{
+ parseNode(node->functionSpecifier());
+ parseNode(node->storageSpecifier());
+ parseNode(node->typeSpec());
+ parseNode(node->initDeclaratorList());
+ parseNode(node->winDeclSpec());
+}
+
+void TreeWalker::parseStatement(StatementAST *node)
+{
+ switch (node->nodeType()) {
+ case NodeType_ExpressionStatement:
+ parseExpressionStatement(static_cast<ExpressionStatementAST*>(node));
+ break;
+
+ case NodeType_IfStatement:
+ parseIfStatement(static_cast<IfStatementAST*>(node));
+ break;
+
+ case NodeType_WhileStatement:
+ parseWhileStatement(static_cast<WhileStatementAST*>(node));
+ return;
+
+ case NodeType_DoStatement:
+ parseDoStatement(static_cast<DoStatementAST*>(node));
+ break;
+
+ case NodeType_ForStatement:
+ parseForStatement(static_cast<ForStatementAST*>(node));
+ break;
+
+ case NodeType_SwitchStatement:
+ parseSwitchStatement(static_cast<SwitchStatementAST*>(node));
+ break;
+
+ case NodeType_LabeledStatement:
+ parseLabeledStatement(static_cast<LabeledStatementAST*>(node));
+ break;
+
+ case NodeType_StatementList:
+ parseStatementList(static_cast<StatementListAST*>(node));
+ break;
+
+ case NodeType_DeclarationStatement:
+ parseDeclarationStatement(static_cast<DeclarationStatementAST*>(node));
+ break;
+
+ case NodeType_ReturnStatement:
+ parseReturnStatement(static_cast<ReturnStatementAST*>(node));
+ break;
+
+ default:
+ break;
+ }
+}
+
+void TreeWalker::parseExpressionStatement(ExpressionStatementAST *node)
+{
+ parseNode(node->expression());
+}
+
+void TreeWalker::parseCondition(ConditionAST *node)
+{
+ parseNode(node->typeSpec());
+ parseNode(node->declarator());
+ parseNode(node->expression());
+}
+
+void TreeWalker::parseIfStatement(IfStatementAST *node)
+{
+ parseNode(node->condition());
+ parseNode(node->statement());
+ parseNode(node->elseStatement());
+}
+
+void TreeWalker::parseWhileStatement(WhileStatementAST *node)
+{
+ parseNode(node->condition());
+ parseNode(node->statement());
+}
+
+void TreeWalker::parseDoStatement(DoStatementAST *node)
+{
+ parseNode(node->condition());
+ parseNode(node->statement());
+}
+
+void TreeWalker::parseForStatement(ForStatementAST *node)
+{
+ parseNode(node->initStatement());
+ parseNode(node->condition());
+ parseNode(node->expression());
+ parseNode(node->statement());
+}
+
+void TreeWalker::parseSwitchStatement(SwitchStatementAST *node)
+{
+ parseNode(node->condition());
+ parseNode(node->statement());
+}
+
+void TreeWalker::parseLabeledStatement(LabeledStatementAST *node)
+{
+ parseNode(node->expression());
+ parseNode(node->statement());
+}
+
+void TreeWalker::parseStatementList(StatementListAST *node)
+{
+ parseAll(this, node->statementList());
+}
+
+void TreeWalker::parseDeclarationStatement(DeclarationStatementAST *node)
+{
+ parseNode(node->declaration());
+}
+
+void TreeWalker::parseFunctionDefinition(FunctionDefinitionAST *node)
+{
+ parseNode(node->functionSpecifier());
+ parseNode(node->storageSpecifier());
+ parseNode(node->typeSpec());
+ parseNode(node->initDeclarator());
+ parseNode(node->functionBody());
+ parseNode(node->winDeclSpec());
+}
+
+void TreeWalker::parseTranslationUnit(TranslationUnitAST *node)
+{
+ parseAll(this, node->declarationList());
+}
+
+
+void TreeWalker::parseExpression(AbstractExpressionAST *node)
+{
+ parseAll(this, node->children());
+}
+
+
+void TreeWalker::parseBinaryExpression(BinaryExpressionAST *node)
+{
+ parseNode(node->op());
+ parseNode(node->leftExpression());
+ parseNode(node->rightExpression());
+}
+
+void TreeWalker::parseReturnStatement(ReturnStatementAST *node)
+{
+ parseNode(node->expression());
+}
+
+QT_END_NAMESPACE
diff --git a/tools/porting/src/treewalker.h b/tools/porting/src/treewalker.h
new file mode 100644
index 0000000..77ca951
--- /dev/null
+++ b/tools/porting/src/treewalker.h
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+** Copyright (C) 2001-2004 Roberto Raggi
+**
+** This file is part of the qt3to4 porting application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEWALKER_H
+#define TREEWALKER_H
+
+#include "ast.h"
+
+QT_BEGIN_NAMESPACE
+
+class TreeWalker
+{
+public:
+ TreeWalker() {}
+ virtual ~TreeWalker() {}
+
+ virtual void parseNode(AST *node);
+ virtual void parseTemplateArgumentList(TemplateArgumentListAST *node);
+ virtual void parseClassOrNamespaceName(ClassOrNamespaceNameAST *node);
+ virtual void parseName(NameAST *node);
+ virtual void parseTypeParameter(TypeParameterAST *node);
+ virtual void parseDeclaration(DeclarationAST *node);
+ virtual void parseAccessDeclaration(AccessDeclarationAST *node);
+ virtual void parseTypeSpecifier(TypeSpecifierAST *node);
+ virtual void parseBaseSpecifier(BaseSpecifierAST *node);
+ virtual void parseBaseClause(BaseClauseAST *node);
+ virtual void parseClassSpecifier(ClassSpecifierAST *node);
+ virtual void parseEnumerator(EnumeratorAST *node);
+ virtual void parseEnumSpecifier(EnumSpecifierAST *node);
+ virtual void parseElaboratedTypeSpecifier(ElaboratedTypeSpecifierAST *node);
+ virtual void parseLinkageBody(LinkageBodyAST *node);
+ virtual void parseLinkageSpecification(LinkageSpecificationAST *node);
+ virtual void parseNamespace(NamespaceAST *node);
+ virtual void parseNamespaceAlias(NamespaceAliasAST *node);
+ virtual void parseUsing(UsingAST *node);
+ virtual void parseUsingDirective(UsingDirectiveAST *node);
+ virtual void parseDeclarator(DeclaratorAST *node);
+ virtual void parseParameterDeclaration(ParameterDeclarationAST *node);
+ virtual void parseParameterDeclarationList(ParameterDeclarationListAST *node);
+ virtual void parseParameterDeclarationClause(ParameterDeclarationClauseAST *node);
+ virtual void parseInitDeclarator(InitDeclaratorAST *node);
+ virtual void parseInitDeclaratorList(InitDeclaratorListAST *node);
+ virtual void parseTypedef(TypedefAST *node);
+ virtual void parseTemplateParameter(TemplateParameterAST *node);
+ virtual void parseTemplateParameterList(TemplateParameterListAST *node);
+ virtual void parseTemplateDeclaration(TemplateDeclarationAST *node);
+ virtual void parseSimpleDeclaration(SimpleDeclarationAST *node);
+ virtual void parseStatement(StatementAST *node);
+ virtual void parseExpressionStatement(ExpressionStatementAST *node);
+ virtual void parseCondition(ConditionAST *node);
+ virtual void parseIfStatement(IfStatementAST *node);
+ virtual void parseWhileStatement(WhileStatementAST *node);
+ virtual void parseDoStatement(DoStatementAST *node);
+ virtual void parseForStatement(ForStatementAST *node);
+ virtual void parseSwitchStatement(SwitchStatementAST *node);
+ virtual void parseLabeledStatement(LabeledStatementAST *node);
+ virtual void parseReturnStatement(ReturnStatementAST *node);
+ virtual void parseStatementList(StatementListAST *node);
+ virtual void parseDeclarationStatement(DeclarationStatementAST *node);
+ virtual void parseFunctionDefinition(FunctionDefinitionAST *node);
+ virtual void parseTranslationUnit(TranslationUnitAST *node);
+ virtual void parseExpression(AbstractExpressionAST *node);
+ virtual void parseBinaryExpression(BinaryExpressionAST *node);
+};
+
+inline void TreeWalker::parseNode(AST *node)
+{
+ if (!node)
+ return;
+
+ switch(node->nodeType()) {
+
+ case NodeType_Declaration:
+ case NodeType_AccessDeclaration:
+ case NodeType_LinkageSpecification:
+ case NodeType_Namespace:
+ case NodeType_NamespaceAlias:
+ case NodeType_Using:
+ case NodeType_UsingDirective:
+ case NodeType_Typedef:
+ case NodeType_TemplateDeclaration:
+ case NodeType_SimpleDeclaration:
+ case NodeType_FunctionDefinition:
+ parseDeclaration(static_cast<DeclarationAST*>(node));
+ break;
+
+ case NodeType_Statement:
+ case NodeType_ExpressionStatement:
+ case NodeType_IfStatement:
+ case NodeType_WhileStatement:
+ case NodeType_DoStatement:
+ case NodeType_ForStatement:
+ case NodeType_SwitchStatement:
+ case NodeType_LabeledStatement:
+ case NodeType_StatementList:
+ case NodeType_DeclarationStatement:
+ case NodeType_ReturnStatement:
+ parseStatement(static_cast<StatementAST*>(node));
+ break;
+
+ case NodeType_TypeSpecifier:
+ case NodeType_ClassSpecifier:
+ case NodeType_EnumSpecifier:
+ case NodeType_ElaboratedTypeSpecifier:
+ parseTypeSpecifier(static_cast<TypeSpecifierAST*>(node));
+ break;
+
+ case NodeType_TemplateArgumentList:
+ parseTemplateArgumentList(static_cast<TemplateArgumentListAST*>(node));
+ break;
+ case NodeType_ClassOrNamespaceName:
+ parseClassOrNamespaceName(static_cast<ClassOrNamespaceNameAST*>(node));
+ break;
+ case NodeType_Name:
+ parseName(static_cast<NameAST*>(node));
+ break;
+ case NodeType_TypeParameter:
+ parseTypeParameter(static_cast<TypeParameterAST*>(node));
+ break;
+ case NodeType_BaseSpecifier:
+ parseBaseSpecifier(static_cast<BaseSpecifierAST*>(node));
+ break;
+ case NodeType_BaseClause:
+ parseBaseClause(static_cast<BaseClauseAST*>(node));
+ break;
+ case NodeType_Enumerator:
+ parseEnumerator(static_cast<EnumeratorAST*>(node));
+ break;
+ case NodeType_LinkageBody:
+ parseLinkageBody(static_cast<LinkageBodyAST*>(node));
+ break;
+ case NodeType_Declarator:
+ parseDeclarator(static_cast<DeclaratorAST*>(node));
+ break;
+ case NodeType_ParameterDeclaration:
+ parseParameterDeclaration(static_cast<ParameterDeclarationAST*>(node));
+ break;
+ case NodeType_ParameterDeclarationList:
+ parseParameterDeclarationList(static_cast<ParameterDeclarationListAST*>(node));
+ break;
+ case NodeType_ParameterDeclarationClause:
+ parseParameterDeclarationClause(static_cast<ParameterDeclarationClauseAST*>(node));
+ break;
+ case NodeType_InitDeclarator:
+ parseInitDeclarator(static_cast<InitDeclaratorAST*>(node));
+ break;
+ case NodeType_InitDeclaratorList:
+ parseInitDeclaratorList(static_cast<InitDeclaratorListAST*>(node));
+ break;
+ case NodeType_TemplateParameter:
+ parseTemplateParameter(static_cast<TemplateParameterAST*>(node));
+ break;
+ case NodeType_TemplateParameterList:
+ parseTemplateParameterList(static_cast<TemplateParameterListAST*>(node));
+ break;
+ case NodeType_Condition:
+ parseCondition(static_cast<ConditionAST*>(node));
+ break;
+ case NodeType_TranslationUnit:
+ parseTranslationUnit(static_cast<TranslationUnitAST*>(node));
+ break;
+
+ case NodeType_BinaryExpression:
+ parseBinaryExpression(static_cast<BinaryExpressionAST*>(node));
+ break;
+
+ case NodeType_Expression:
+ case NodeType_PrimaryExpression:
+
+ case NodeType_PostfixExpression:
+ case NodeType_Subscripting:
+ case NodeType_FunctionCall:
+ case NodeType_ExplicitTypeConversion:
+ case NodeType_PseudoConstructorCall:
+ case NodeType_ClassMemberAccess:
+ case NodeType_IncrDecr:
+ case NodeType_CppCastExpression:
+ case NodeType_TypeIdentification:
+
+ case NodeType_UnaryExpression:
+ case NodeType_NewExpression:
+ case NodeType_NewTypeId:
+ case NodeType_NewDeclarator:
+ case NodeType_NewInitializer:
+ case NodeType_DeleteExpression:
+ case NodeType_CastExpression:
+ case NodeType_ConditionalExpression:
+ case NodeType_ThrowExpression:
+ parseExpression(static_cast<AbstractExpressionAST*>(node));
+ break;
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // TREEWALKER_H