summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/qml/qmlcomponentjs.cpp3
-rw-r--r--src/declarative/qml/qmlcomponentjs_p.h47
-rw-r--r--src/declarative/qml/qmlcomponentjs_p_p.h (renamed from src/declarative/qml/qmlcomponentjs.h)61
-rw-r--r--src/declarative/qml/qmlengine.cpp2
5 files changed, 61 insertions, 54 deletions
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 6ee670e..75e5692 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -38,8 +38,8 @@ HEADERS += qml/qmlparser_p.h \
qml/qmlbinding.h \
qml/qmlbinding_p.h \
qml/qmlmetaproperty.h \
- qml/qmlcomponentjs.h \
qml/qmlcomponentjs_p.h \
+ qml/qmlcomponentjs_p_p.h \
qml/qmlcomponent.h \
qml/qmlcomponent_p.h \
qml/qmlcustomparser_p.h \
diff --git a/src/declarative/qml/qmlcomponentjs.cpp b/src/declarative/qml/qmlcomponentjs.cpp
index 32c2249..89f3851 100644
--- a/src/declarative/qml/qmlcomponentjs.cpp
+++ b/src/declarative/qml/qmlcomponentjs.cpp
@@ -39,11 +39,12 @@
**
****************************************************************************/
-#include "qmlcomponentjs.h"
#include "qmlcomponentjs_p.h"
+#include "qmlcomponentjs_p_p.h"
#include "qmlcomponent.h"
QT_BEGIN_NAMESPACE
+
QmlComponentJS::QmlComponentJS(QmlEngine *engine, QObject *parent)
: QmlComponent(*(new QmlComponentJSPrivate), parent)
{
diff --git a/src/declarative/qml/qmlcomponentjs_p.h b/src/declarative/qml/qmlcomponentjs_p.h
index 75d5517..8c69b5f 100644
--- a/src/declarative/qml/qmlcomponentjs_p.h
+++ b/src/declarative/qml/qmlcomponentjs_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QMLBINDABLECOMPONENT_P_H
-#define QMLBINDABLECOMPONENT_P_H
+#ifndef QMLCOMPONENTJS_P_H
+#define QMLCOMPONENTJS_P_H
//
// W A R N I N G
@@ -53,25 +53,46 @@
// We mean it.
//
-#include "qmlcomponent.h"
-#include "qmlcomponentjs.h"
-#include "qmlcomponent_p.h"
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtDeclarative/qfxglobal.h>
+#include <QtDeclarative/qml.h>
+#include <QtDeclarative/qmlcomponent.h>
+#include <QtDeclarative/qmlerror.h>
QT_BEGIN_NAMESPACE
+class QmlComponentJSPrivate;
+class QmlEngine;
class QmlContext;
-class QmlComponentJSPrivate : public QmlComponentPrivate
+class Q_DECLARATIVE_EXPORT QmlComponentJS : public QmlComponent
{
- Q_DECLARE_PUBLIC(QmlComponentJS)
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlComponentJS)
+ friend class QmlEngine;
public:
- QmlComponentJSPrivate() : QmlComponentPrivate(),
- prevStatus(QmlComponentJS::Null), ctxt(0)
- { }
+ QmlComponentJS(QmlEngine *, const QUrl &url, QObject *parent = 0);
+ QmlComponentJS(QmlEngine *, QObject *parent=0);
+ Q_PROPERTY(bool isNull READ isNull NOTIFY isNullChanged);
+ Q_PROPERTY(bool isReady READ isReady NOTIFY isReadyChanged);
+ Q_PROPERTY(bool isError READ isError NOTIFY isErrorChanged);
+ Q_PROPERTY(bool isLoading READ isLoading NOTIFY isLoadingChanged);
- QmlComponent::Status prevStatus;
- QmlContext* ctxt;
+ Q_INVOKABLE QScriptValue createObject();
+ Q_INVOKABLE QString errorsString() const;
+
+ void setContext(QmlContext* c);
+Q_SIGNALS:
+ void isNullChanged();
+ void isErrorChanged();
+ void isReadyChanged();
+ void isLoadingChanged();
+private slots:
+ void statusChange(QmlComponent::Status newStatus);
};
QT_END_NAMESPACE
-#endif
+QML_DECLARE_TYPE(QmlComponentJS)
+
+#endif // QMLCOMPONENTJS_P_H
diff --git a/src/declarative/qml/qmlcomponentjs.h b/src/declarative/qml/qmlcomponentjs_p_p.h
index 5ad1635..47ce491 100644
--- a/src/declarative/qml/qmlcomponentjs.h
+++ b/src/declarative/qml/qmlcomponentjs_p_p.h
@@ -39,54 +39,39 @@
**
****************************************************************************/
-#ifndef QMLBINDABLECOMPONENT_H
-#define QMLBINDABLECOMPONENT_H
+#ifndef QMLCOMPONENTJS_P_P_H
+#define QMLCOMPONENTJS_P_P_H
-#include <QtCore/qobject.h>
-#include <QtCore/qstring.h>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlcomponent.h>
-#include <QtDeclarative/qmlerror.h>
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
-QT_BEGIN_HEADER
+#include "qmlcomponent.h"
+#include "qmlcomponentjs_p.h"
+#include "qmlcomponent_p.h"
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
-
-class QmlComponentJSPrivate;
-class QmlEngine;
class QmlContext;
-class Q_DECLARATIVE_EXPORT QmlComponentJS : public QmlComponent
+class QmlComponentJSPrivate : public QmlComponentPrivate
{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlComponentJS)
- friend class QmlEngine;
+ Q_DECLARE_PUBLIC(QmlComponentJS)
public:
- QmlComponentJS(QmlEngine *, const QUrl &url, QObject *parent = 0);
- QmlComponentJS(QmlEngine *, QObject *parent=0);
- Q_PROPERTY(bool isNull READ isNull NOTIFY isNullChanged);
- Q_PROPERTY(bool isReady READ isReady NOTIFY isReadyChanged);
- Q_PROPERTY(bool isError READ isError NOTIFY isErrorChanged);
- Q_PROPERTY(bool isLoading READ isLoading NOTIFY isLoadingChanged);
-
- Q_INVOKABLE QScriptValue createObject();
- Q_INVOKABLE QString errorsString() const;
+ QmlComponentJSPrivate() : QmlComponentPrivate(),
+ prevStatus(QmlComponentJS::Null), ctxt(0)
+ { }
- void setContext(QmlContext* c);
-Q_SIGNALS:
- void isNullChanged();
- void isErrorChanged();
- void isReadyChanged();
- void isLoadingChanged();
-private slots:
- void statusChange(QmlComponent::Status newStatus);
+ QmlComponent::Status prevStatus;
+ QmlContext* ctxt;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlComponentJS)
-
-QT_END_HEADER
-#endif
+#endif // QMLCOMPONENTJS_P_P_H
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 69cc542..b478618 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -71,7 +71,7 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdir.h>
#include <qmlcomponent.h>
-#include <qmlcomponentjs.h>
+#include "private/qmlcomponentjs_p.h"
#include "private/qmlmetaproperty_p.h"
#include <private/qmlbinding_p.h>
#include <private/qmlvme_p.h>