summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h57
1 files changed, 31 insertions, 26 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 8a0c583cd9..843bdeb794 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** 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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -64,6 +59,7 @@ struct Type
Token firstToken;
ReferenceType referenceType;
};
+Q_DECLARE_TYPEINFO(Type, Q_MOVABLE_TYPE);
struct EnumDef
{
@@ -72,6 +68,7 @@ struct EnumDef
bool isEnumClass; // c++11 enum class
EnumDef() : isEnumClass(false) {}
};
+Q_DECLARE_TYPEINFO(EnumDef, Q_MOVABLE_TYPE);
struct ArgumentDef
{
@@ -81,6 +78,7 @@ struct ArgumentDef
QByteArray typeNameForCast; // type name to be used in cast from void * in metacall
bool isDefault;
};
+Q_DECLARE_TYPEINFO(ArgumentDef, Q_MOVABLE_TYPE);
struct FunctionDef
{
@@ -94,7 +92,7 @@ struct FunctionDef
QByteArray name;
bool returnTypeIsVolatile;
- QList<ArgumentDef> arguments;
+ QVector<ArgumentDef> arguments;
enum Access { Private, Protected, Public };
Access access;
@@ -117,6 +115,7 @@ struct FunctionDef
int revision;
};
+Q_DECLARE_TYPEINFO(FunctionDef, Q_MOVABLE_TYPE);
struct PropertyDef
{
@@ -135,6 +134,7 @@ struct PropertyDef
}
int revision;
};
+Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE);
struct ClassInfoDef
@@ -142,6 +142,7 @@ struct ClassInfoDef
QByteArray name;
QByteArray value;
};
+Q_DECLARE_TYPEINFO(ClassInfoDef, Q_MOVABLE_TYPE);
struct ClassDef {
ClassDef():
@@ -149,16 +150,17 @@ struct ClassDef {
, revisionedMethods(0), revisionedProperties(0), begin(0), end(0){}
QByteArray classname;
QByteArray qualified;
- QList<QPair<QByteArray, FunctionDef::Access> > superclassList;
+ QVector<QPair<QByteArray, FunctionDef::Access> > superclassList;
struct Interface
{
+ Interface() {} // for QVector, don't use
inline explicit Interface(const QByteArray &_className)
: className(_className) {}
QByteArray className;
QByteArray interfaceId;
};
- QList<QList<Interface> >interfaceList;
+ QVector<QVector<Interface> >interfaceList;
bool hasQObject;
bool hasQGadget;
@@ -169,13 +171,13 @@ struct ClassDef {
QJsonDocument metaData;
} pluginData;
- QList<FunctionDef> constructorList;
- QList<FunctionDef> signalList, slotList, methodList, publicList;
+ QVector<FunctionDef> constructorList;
+ QVector<FunctionDef> signalList, slotList, methodList, publicList;
int notifyableProperties;
- QList<PropertyDef> propertyList;
- QList<ClassInfoDef> classInfoList;
+ QVector<PropertyDef> propertyList;
+ QVector<ClassInfoDef> classInfoList;
QMap<QByteArray, bool> enumDeclarations;
- QList<EnumDef> enumList;
+ QVector<EnumDef> enumList;
QMap<QByteArray, QByteArray> flagAliases;
int revisionedMethods;
int revisionedProperties;
@@ -183,12 +185,15 @@ struct ClassDef {
int begin;
int end;
};
+Q_DECLARE_TYPEINFO(ClassDef, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ClassDef::Interface, Q_MOVABLE_TYPE);
struct NamespaceDef {
QByteArray name;
int begin;
int end;
};
+Q_DECLARE_TYPEINFO(NamespaceDef, Q_MOVABLE_TYPE);
class Moc : public Parser
{
@@ -203,7 +208,7 @@ public:
bool mustIncludeQPluginH;
QByteArray includePath;
QList<QByteArray> includeFiles;
- QList<ClassDef> classList;
+ QVector<ClassDef> classList;
QMap<QByteArray, QByteArray> interface2IdMap;
QList<QByteArray> metaTypes;
// map from class name to fully qualified name