diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-07-24 05:13:45 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-07-24 05:13:45 (GMT) |
commit | f052ecabf63354737df71ac813adf157158e7b4d (patch) | |
tree | f9d5bd8984ee772f030dc757e80f57b86a2c295c /src | |
parent | 8ba5e3b86984fce9fd3999d643cad6a732653940 (diff) | |
download | Qt-f052ecabf63354737df71ac813adf157158e7b4d.zip Qt-f052ecabf63354737df71ac813adf157158e7b4d.tar.gz Qt-f052ecabf63354737df71ac813adf157158e7b4d.tar.bz2 |
Rename QmlBindableComponent to QmlComponentJS, as per Aaron's request.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qml.pri | 6 | ||||
-rw-r--r-- | src/declarative/qml/qmlcomponentjs.cpp (renamed from src/declarative/qml/qmlbindablecomponent.cpp) | 34 | ||||
-rw-r--r-- | src/declarative/qml/qmlcomponentjs.h (renamed from src/declarative/qml/qmlbindablecomponent.h) | 12 | ||||
-rw-r--r-- | src/declarative/qml/qmlcomponentjs_p.h (renamed from src/declarative/qml/qmlbindablecomponent_p.h) | 10 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 8 |
5 files changed, 35 insertions, 35 deletions
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index d8b69df..6ee670e 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -5,7 +5,7 @@ SOURCES += qml/qmlparser.cpp \ qml/qmlexpression.cpp \ qml/qmlbinding.cpp \ qml/qmlmetaproperty.cpp \ - qml/qmlbindablecomponent.cpp \ + qml/qmlcomponentjs.cpp \ qml/qmlcomponent.cpp \ qml/qmlcontext.cpp \ qml/qmlcustomparser.cpp \ @@ -38,8 +38,8 @@ HEADERS += qml/qmlparser_p.h \ qml/qmlbinding.h \ qml/qmlbinding_p.h \ qml/qmlmetaproperty.h \ - qml/qmlbindablecomponent.h \ - qml/qmlbindablecomponent_p.h \ + qml/qmlcomponentjs.h \ + qml/qmlcomponentjs_p.h \ qml/qmlcomponent.h \ qml/qmlcomponent_p.h \ qml/qmlcustomparser_p.h \ diff --git a/src/declarative/qml/qmlbindablecomponent.cpp b/src/declarative/qml/qmlcomponentjs.cpp index 6938592..32c2249 100644 --- a/src/declarative/qml/qmlbindablecomponent.cpp +++ b/src/declarative/qml/qmlcomponentjs.cpp @@ -39,48 +39,48 @@ ** ****************************************************************************/ -#include "qmlbindablecomponent.h" -#include "qmlbindablecomponent_p.h" +#include "qmlcomponentjs.h" +#include "qmlcomponentjs_p.h" #include "qmlcomponent.h" QT_BEGIN_NAMESPACE -QmlBindableComponent::QmlBindableComponent(QmlEngine *engine, QObject *parent) - : QmlComponent(*(new QmlBindableComponentPrivate), parent) +QmlComponentJS::QmlComponentJS(QmlEngine *engine, QObject *parent) + : QmlComponent(*(new QmlComponentJSPrivate), parent) { - Q_D(QmlBindableComponent); + Q_D(QmlComponentJS); d->engine = engine; connect(this, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(statusChange(QmlComponent::Status))); } -QmlBindableComponent::QmlBindableComponent(QmlEngine *engine, const QUrl &url, QObject *parent) - : QmlComponent(*(new QmlBindableComponentPrivate), parent) +QmlComponentJS::QmlComponentJS(QmlEngine *engine, const QUrl &url, QObject *parent) + : QmlComponent(*(new QmlComponentJSPrivate), parent) { - Q_D(QmlBindableComponent); + Q_D(QmlComponentJS); d->engine = engine; loadUrl(url); connect(this, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(statusChange(QmlComponent::Status))); } -void QmlBindableComponent::setContext(QmlContext* c) +void QmlComponentJS::setContext(QmlContext* c) { - Q_D(QmlBindableComponent); + Q_D(QmlComponentJS); d->ctxt =c; } /*! Create a script object instance from this component. Returns a null script object if creation failed. It will create the instance in the - same context that it was created it. QmlBindableComponent is only + same context that it was created it. QmlComponentJS is only meant to be created from with script - C++ developers should just use QmlComponent directly. Similar to QmlComponent::create(), but creates an object suitable for usage within scripts. */ -QScriptValue QmlBindableComponent::createObject() +QScriptValue QmlComponentJS::createObject() { - Q_D(QmlBindableComponent); + Q_D(QmlComponentJS); QObject* ret = create(d->ctxt); return QmlEngine::qmlScriptObject(ret, d->engine); } @@ -95,9 +95,9 @@ QScriptValue QmlBindableComponent::createObject() \sa errors() */ -QString QmlBindableComponent::errorsString() const +QString QmlComponentJS::errorsString() const { - Q_D(const QmlBindableComponent); + Q_D(const QmlComponentJS); QString ret; if(!isError()) return ret; @@ -110,9 +110,9 @@ QString QmlBindableComponent::errorsString() const } -void QmlBindableComponent::statusChange(QmlComponent::Status newStatus) +void QmlComponentJS::statusChange(QmlComponent::Status newStatus) { - Q_D(QmlBindableComponent); + Q_D(QmlComponentJS); if(newStatus == d->prevStatus) return; if(newStatus == QmlComponent::Null || d->prevStatus == QmlComponent::Null) diff --git a/src/declarative/qml/qmlbindablecomponent.h b/src/declarative/qml/qmlcomponentjs.h index 43e3537..5ad1635 100644 --- a/src/declarative/qml/qmlbindablecomponent.h +++ b/src/declarative/qml/qmlcomponentjs.h @@ -55,17 +55,17 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QmlBindableComponentPrivate; +class QmlComponentJSPrivate; class QmlEngine; class QmlContext; -class Q_DECLARATIVE_EXPORT QmlBindableComponent : public QmlComponent +class Q_DECLARATIVE_EXPORT QmlComponentJS : public QmlComponent { Q_OBJECT - Q_DECLARE_PRIVATE(QmlBindableComponent) + Q_DECLARE_PRIVATE(QmlComponentJS) friend class QmlEngine; public: - QmlBindableComponent(QmlEngine *, const QUrl &url, QObject *parent = 0); - QmlBindableComponent(QmlEngine *, QObject *parent=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); @@ -86,7 +86,7 @@ private slots: QT_END_NAMESPACE -QML_DECLARE_TYPE(QmlBindableComponent) +QML_DECLARE_TYPE(QmlComponentJS) QT_END_HEADER #endif diff --git a/src/declarative/qml/qmlbindablecomponent_p.h b/src/declarative/qml/qmlcomponentjs_p.h index 79335df..75d5517 100644 --- a/src/declarative/qml/qmlbindablecomponent_p.h +++ b/src/declarative/qml/qmlcomponentjs_p.h @@ -54,18 +54,18 @@ // #include "qmlcomponent.h" -#include "qmlbindablecomponent.h" +#include "qmlcomponentjs.h" #include "qmlcomponent_p.h" QT_BEGIN_NAMESPACE class QmlContext; -class QmlBindableComponentPrivate : public QmlComponentPrivate +class QmlComponentJSPrivate : public QmlComponentPrivate { - Q_DECLARE_PUBLIC(QmlBindableComponent) + Q_DECLARE_PUBLIC(QmlComponentJS) public: - QmlBindableComponentPrivate() : QmlComponentPrivate(), - prevStatus(QmlBindableComponent::Null), ctxt(0) + QmlComponentJSPrivate() : QmlComponentPrivate(), + prevStatus(QmlComponentJS::Null), ctxt(0) { } QmlComponent::Status prevStatus; diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 33c6710..69cc542 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 <qmlbindablecomponent.h> +#include <qmlcomponentjs.h> #include "private/qmlmetaproperty_p.h" #include <private/qmlbinding_p.h> #include <private/qmlvme_p.h> @@ -602,18 +602,18 @@ QScriptValue QmlEngine::qmlScriptObject(QObject* object, QmlEngine* engine) */ QScriptValue QmlEngine::createComponent(QScriptContext *ctxt, QScriptEngine *engine) { - QmlBindableComponent* c; + QmlComponentJS* c; QmlEngine* activeEngine = qobject_cast<QmlEngine*>( engine->globalObject().property(QLatin1String("qmlEngine")).toQObject()); QmlContext* context =activeEngine->d_func()->currentExpression->context(); if(ctxt->argumentCount() != 1 || !activeEngine){ - c = new QmlBindableComponent(activeEngine); + c = new QmlComponentJS(activeEngine); }else{ QUrl url = QUrl(context->resolvedUrl(ctxt->argument(0).toString())); if(!url.isValid()){ url = QUrl(ctxt->argument(0).toString()); } - c = new QmlBindableComponent(activeEngine, url, activeEngine); + c = new QmlComponentJS(activeEngine, url, activeEngine); } c->setContext(context); return engine->newQObject(c); |