summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qml.h8
-rw-r--r--src/declarative/qml/qmlbindablevalue.cpp3
-rw-r--r--src/declarative/qml/qmlbindablevalue.h3
-rw-r--r--src/declarative/qml/qmlboundsignal.cpp2
-rw-r--r--src/declarative/qml/qmlcompiler_p.h3
-rw-r--r--src/declarative/qml/qmlcomponent.h5
-rw-r--r--src/declarative/qml/qmlcustomparser.cpp3
-rw-r--r--src/declarative/qml/qmlcustomparser_p.h5
-rw-r--r--src/declarative/qml/qmldom_p.h9
-rw-r--r--src/declarative/qml/qmlengine.cpp7
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp4
-rw-r--r--src/declarative/qml/qmlmetaproperty_p.h4
-rw-r--r--src/declarative/qml/qmlmetatype.cpp4
-rw-r--r--src/declarative/qml/qmlparser_p.h3
-rw-r--r--src/declarative/qml/qmlpropertyvaluesource.h3
-rw-r--r--src/declarative/qml/qmlproxymetaobject.cpp3
16 files changed, 36 insertions, 33 deletions
diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h
index 51ca612..1990b7f 100644
--- a/src/declarative/qml/qml.h
+++ b/src/declarative/qml/qml.h
@@ -54,8 +54,6 @@
QT_BEGIN_HEADER
-QT_BEGIN_NAMESPACE
-
QT_MODULE(Declarative)
#define QML_DECLARE_TYPE(TYPE) \
@@ -73,6 +71,8 @@ QT_MODULE(Declarative)
#define QML_DECLARE_INTERFACE_HASMETATYPE(INTERFACE) \
QML_DECLARE_TYPE_HASMETATYPE(INTERFACE)
+QT_BEGIN_NAMESPACE
+
#define QML_DEFINE_INTERFACE(INTERFACE) \
template<> QmlPrivate::InstanceType QmlPrivate::Define<INTERFACE *>::instance(qmlRegisterInterface<INTERFACE>(#INTERFACE));
@@ -110,11 +110,11 @@ QObject *qmlAttachedPropertiesObject(const QObject *obj)
return qmlAttachedPropertiesObjectById(idx, obj);
}
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QObject)
Q_DECLARE_METATYPE(QVariant)
-QT_END_NAMESPACE
-
QT_END_HEADER
#endif // QML_H
diff --git a/src/declarative/qml/qmlbindablevalue.cpp b/src/declarative/qml/qmlbindablevalue.cpp
index 222ea87..f447d4f 100644
--- a/src/declarative/qml/qmlbindablevalue.cpp
+++ b/src/declarative/qml/qmlbindablevalue.cpp
@@ -48,6 +48,8 @@
#include <qfxperf.h>
#include <QtCore/qdebug.h>
+Q_DECLARE_METATYPE(QList<QObject *>);
+
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(scriptWarnings, QML_SCRIPT_WARNINGS);
@@ -114,7 +116,6 @@ void QmlBindableValue::forceUpdate()
update();
}
-Q_DECLARE_METATYPE(QList<QObject *>);
void QmlBindableValue::update()
{
Q_D(QmlBindableValue);
diff --git a/src/declarative/qml/qmlbindablevalue.h b/src/declarative/qml/qmlbindablevalue.h
index 00da57e..12da9f6 100644
--- a/src/declarative/qml/qmlbindablevalue.h
+++ b/src/declarative/qml/qmlbindablevalue.h
@@ -88,10 +88,11 @@ protected:
private:
Q_DECLARE_PRIVATE(QmlBindableValue)
};
-QML_DECLARE_TYPE(QmlBindableValue)
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlBindableValue)
+
QT_END_HEADER
#endif // QMLBINDABLEVALUE_H
diff --git a/src/declarative/qml/qmlboundsignal.cpp b/src/declarative/qml/qmlboundsignal.cpp
index 5815dc6..9779e46 100644
--- a/src/declarative/qml/qmlboundsignal.cpp
+++ b/src/declarative/qml/qmlboundsignal.cpp
@@ -47,6 +47,7 @@
#include <qmlmetatype.h>
#include <qml.h>
#include <qmlcontext.h>
+#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -88,7 +89,6 @@ int QmlBoundSignalProxy::qt_metacall(QMetaObject::Call c, int id, void **a)
}
}
-#include <QDebug>
QmlBoundSignalParameters::QmlBoundSignalParameters(const QMetaMethod &method,
QObject *parent)
: QObject(parent), types(0), values(0)
diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h
index 2c722b9..819c4ad 100644
--- a/src/declarative/qml/qmlcompiler_p.h
+++ b/src/declarative/qml/qmlcompiler_p.h
@@ -61,9 +61,8 @@
#include <private/qmlcompositetypemanager_p.h>
#include <private/qmlparser_p.h>
-class QStringList;
-
QT_BEGIN_NAMESPACE
+
class QmlEngine;
class QmlComponent;
class QmlCompiledComponent;
diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h
index 2e80b6b..db34e16 100644
--- a/src/declarative/qml/qmlcomponent.h
+++ b/src/declarative/qml/qmlcomponent.h
@@ -105,11 +105,12 @@ private:
friend class QmlVME;
friend struct QmlCompositeTypeData;
};
-Q_DECLARE_METATYPE(QmlComponent::Status)
-QML_DECLARE_TYPE(QmlComponent)
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QmlComponent::Status)
+QML_DECLARE_TYPE(QmlComponent)
+
QT_END_HEADER
#endif // QMLCOMPONENT_H
diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp
index c90ab47..b543978 100644
--- a/src/declarative/qml/qmlcustomparser.cpp
+++ b/src/declarative/qml/qmlcustomparser.cpp
@@ -43,6 +43,8 @@
#include "qmlcustomparser_p_p.h"
#include "qmlparser_p.h"
+#include <QtCore/qdebug.h>
+
QT_BEGIN_NAMESPACE
using namespace QmlParser;
@@ -120,7 +122,6 @@ QmlCustomParserNodePrivate::fromObject(QmlParser::Object *root)
return rootNode;
}
-#include <QtCore/qdebug.h>
QmlCustomParserProperty
QmlCustomParserNodePrivate::fromProperty(QmlParser::Property *p)
{
diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h
index 67f39d9..914ddbd 100644
--- a/src/declarative/qml/qmlcustomparser_p.h
+++ b/src/declarative/qml/qmlcustomparser_p.h
@@ -85,7 +85,6 @@ private:
friend class QmlCustomParserPropertyPrivate;
QmlCustomParserPropertyPrivate *d;
};
-Q_DECLARE_METATYPE(QmlCustomParserProperty)
class QmlCustomParserNodePrivate;
class Q_DECLARATIVE_EXPORT QmlCustomParserNode
@@ -104,7 +103,6 @@ private:
friend class QmlCustomParserNodePrivate;
QmlCustomParserNodePrivate *d;
};
-Q_DECLARE_METATYPE(QmlCustomParserNode)
class Q_DECLARATIVE_EXPORT QmlCustomParser
{
@@ -119,6 +117,9 @@ public:
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QmlCustomParserProperty)
+Q_DECLARE_METATYPE(QmlCustomParserNode)
+
QT_END_HEADER
#endif
diff --git a/src/declarative/qml/qmldom_p.h b/src/declarative/qml/qmldom_p.h
index a7c3cc7..101b17f 100644
--- a/src/declarative/qml/qmldom_p.h
+++ b/src/declarative/qml/qmldom_p.h
@@ -54,15 +54,10 @@
//
#include <QtCore/QtGlobal>
-
-QT_BEGIN_HEADER
+#include "qmlparser_p.h"
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
-
-#include "qmlparser_p.h"
-
class QmlDomDocumentPrivate : public QSharedData
{
public:
@@ -125,7 +120,5 @@ public:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QMLDOM_P_H
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 8c926b7..9ee2f8d 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -73,12 +73,13 @@
#include <private/qmlbindablevalue_p.h>
#include <private/qmlvme_p.h>
+Q_DECLARE_METATYPE(QmlMetaProperty)
+Q_DECLARE_METATYPE(QList<QObject *>);
+
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(qmlDebugger, QML_DEBUGGER)
-Q_DECLARE_METATYPE(QmlMetaProperty)
-
QML_DEFINE_TYPE(QObject,Object)
static QScriptValue qmlMetaProperty_emit(QScriptContext *ctx, QScriptEngine *engine)
@@ -1077,8 +1078,6 @@ void QmlExpression::valueChanged()
{
}
-Q_DECLARE_METATYPE(QList<QObject *>);
-
void BindExpressionProxy::changed()
{
e->valueChanged();
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 218fdf8..448671e 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -50,6 +50,8 @@
#include <math.h>
#include <QtCore/qdebug.h>
+Q_DECLARE_METATYPE(QList<QObject *>);
+
QT_BEGIN_NAMESPACE
class QMetaPropertyEx : public QMetaProperty
@@ -651,8 +653,6 @@ QVariant QmlMetaProperty::read() const
return QVariant();
}
-Q_DECLARE_METATYPE(QList<QObject *>);
-
void QmlMetaPropertyPrivate::writeSignalProperty(const QVariant &value)
{
QString expr = value.toString();
diff --git a/src/declarative/qml/qmlmetaproperty_p.h b/src/declarative/qml/qmlmetaproperty_p.h
index 3bd9089..69fd5c3 100644
--- a/src/declarative/qml/qmlmetaproperty_p.h
+++ b/src/declarative/qml/qmlmetaproperty_p.h
@@ -55,6 +55,8 @@
#include "qmlmetaproperty.h"
+QT_BEGIN_NAMESPACE
+
class QmlContext;
class QmlMetaPropertyPrivate
{
@@ -89,4 +91,6 @@ public:
void writeValueProperty(const QVariant &);
};
+QT_END_NAMESPACE
+
#endif // QMLMETAPROPERTY_P_H
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index f69e5e5..b15f711 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -59,8 +59,6 @@
#include <QtCore/qcryptographichash.h>
#include <private/qmlcustomparser_p.h>
-QT_BEGIN_NAMESPACE
-
#ifdef QT_BOOTSTRAPPED
# ifndef QT_NO_GEOM_VARIANT
# define QT_NO_GEOM_VARIANT
@@ -79,6 +77,8 @@ QT_BEGIN_NAMESPACE
#endif
#define NS(x) QT_PREPEND_NAMESPACE(x)
+QT_BEGIN_NAMESPACE
+
struct QmlMetaTypeData
{
QList<QmlType *> types;
diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h
index ef038f9..a22d0a9 100644
--- a/src/declarative/qml/qmlparser_p.h
+++ b/src/declarative/qml/qmlparser_p.h
@@ -295,10 +295,11 @@ namespace QmlParser
void dump(int = 0) const;
};
}
-Q_DECLARE_METATYPE(QmlParser::Variant)
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QmlParser::Variant)
+
QT_END_HEADER
#endif // QMLPARSER_P_H
diff --git a/src/declarative/qml/qmlpropertyvaluesource.h b/src/declarative/qml/qmlpropertyvaluesource.h
index c142095..4e5f1c5 100644
--- a/src/declarative/qml/qmlpropertyvaluesource.h
+++ b/src/declarative/qml/qmlpropertyvaluesource.h
@@ -69,10 +69,11 @@ protected:
private:
Q_DISABLE_COPY(QmlPropertyValueSource)
};
-QML_DECLARE_TYPE(QmlPropertyValueSource)
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QmlPropertyValueSource)
+
QT_END_HEADER
#endif // QMLPROPERTYVALUESOURCE_H
diff --git a/src/declarative/qml/qmlproxymetaobject.cpp b/src/declarative/qml/qmlproxymetaobject.cpp
index 5568bab..0baea31 100644
--- a/src/declarative/qml/qmlproxymetaobject.cpp
+++ b/src/declarative/qml/qmlproxymetaobject.cpp
@@ -41,6 +41,8 @@
#include "qmlproxymetaobject_p.h"
+#include <QDebug>
+
QT_BEGIN_NAMESPACE
QmlProxyMetaObject::QmlProxyMetaObject(QObject *obj, QList<ProxyData> *mList)
@@ -78,7 +80,6 @@ QmlProxyMetaObject::~QmlProxyMetaObject()
proxies = 0;
}
-#include <QDebug>
int QmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
{
if ((c == QMetaObject::ReadProperty ||