summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmllistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmllistmodel.cpp')
-rw-r--r--src/declarative/util/qmllistmodel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 1884e8b..c202a9f 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -49,6 +49,8 @@
#include <qmlbindablevalue.h>
#include "qmllistmodel.h"
+Q_DECLARE_METATYPE(QListModelInterface *)
+
QT_BEGIN_NAMESPACE
#define DATA_ROLE_ID 1
@@ -67,8 +69,6 @@ struct ListModelData
ListInstruction *instructions() const { return (ListInstruction *)((char *)this + sizeof(ListModelData)); }
};
-Q_DECLARE_METATYPE(QListModelInterface *)
-
/*!
\qmlclass ListModel
\brief The ListModel element defines a free-form list data source.
@@ -243,7 +243,6 @@ struct ModelNode
ListModel *modelCache;
ModelObject *objectCache;
};
-Q_DECLARE_METATYPE(ModelNode *)
ModelObject::ModelObject(ModelNode *node)
: _node(node), _haveProperties(false), _mo(new QmlOpenMetaObject(this))
@@ -519,7 +518,6 @@ void ListModelParser::setCustomData(QObject *obj, const QByteArray &d)
}
}
-QML_DECLARE_TYPE(ListModel)
QML_DEFINE_CUSTOM_TYPE(ListModel, ListModel, ListModelParser)
// ### FIXME
@@ -527,7 +525,6 @@ class ListElement : public QObject
{
Q_OBJECT
};
-QML_DECLARE_TYPE(ListElement)
QML_DEFINE_TYPE(ListElement,ListElement)
static void dump(ModelNode *node, int ind)
@@ -568,4 +565,8 @@ ModelNode::~ModelNode()
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(ModelNode *)
+QML_DECLARE_TYPE(ListModel)
+QML_DECLARE_TYPE(ListElement)
+
#include "qmllistmodel.moc"