aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2014-01-08 15:20:05 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-09 10:13:01 +0100
commite2c2fcd1d18990d7d1b7286fc8f2b9f8269691e2 (patch)
treeb0dbd32c702fd8e2c22be8cfca4dc365d4c01f30
parentb9e891b8adec2124e9ba78555a5b79867d4e05c9 (diff)
Classify as Q_PRIMITIVE_TYPE a few private types.
Found by clang plugin matching the criteria: - is pod / movable - sizeof(T) <= sizeof(void*) - used by QList The only case that can't be fixed is: QList<TypeCache::Iterator> in qqmltypeloader.cpp:1924 because Iterator is declared in qhash.h:349 Maybe use a QVector ... Change-Id: I9007cf43b0cf29ff39f3d2c95fb60d766c976ce7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/compiler/qv4compileddata_p.h2
-rw-r--r--src/qml/types/qqmllistmodel_p.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 90f27d5f57..91033b02ea 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -516,6 +516,8 @@ protected:
}
+Q_DECLARE_TYPEINFO(QV4::CompiledData::JSClassMember, Q_PRIMITIVE_TYPE);
+
QT_END_NAMESPACE
#endif
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 722cb2b44d..a7487537c5 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -188,8 +188,12 @@ private:
ListModel *model;
int elementIndex;
};
+
+ friend class QTypeInfo<QQmlListModelParser::ListInstruction>;
};
+Q_DECLARE_TYPEINFO(QQmlListModelParser::ListInstruction, Q_PRIMITIVE_TYPE);
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQmlListModel)