diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-07-02 03:11:43 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-07-02 03:11:43 (GMT) |
commit | 8aba610c22c44bf36eb2e539a06b65753c48bbc2 (patch) | |
tree | a09af5ec3edd87ffcf041fe030135e58d49cb520 /src/declarative/qml/qmlmetaproperty.cpp | |
parent | dafd625842e2c66551857810a3660c534962746e (diff) | |
parent | 305de45a8d184738dc07fb7e5c787b9dbb5b3c6b (diff) | |
download | Qt-8aba610c22c44bf36eb2e539a06b65753c48bbc2.zip Qt-8aba610c22c44bf36eb2e539a06b65753c48bbc2.tar.gz Qt-8aba610c22c44bf36eb2e539a06b65753c48bbc2.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r-- | src/declarative/qml/qmlmetaproperty.cpp | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index a2138c9..90acd72 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -243,15 +243,6 @@ void QmlMetaProperty::initProperty(QObject *obj, const QString &name) } if (!d->name.isEmpty()) d->type = Property; - - if (d->type == Invalid) { - int sig = findSignal(obj, name.toLatin1()); - if (sig != -1) { - d->signal = obj->metaObject()->method(sig); - d->type = Signal; - d->coreIdx = sig; - } - } } /*! @@ -284,7 +275,6 @@ QmlMetaProperty::QmlMetaProperty(const QmlMetaProperty &other) \value Invalid The property is invalid. \value Property The property is a regular Qt property. \value SignalProperty The property is a signal property. - \value Signal The property is a signal. \value Default The property is the default property. \value Attached The property is an attached property. */ @@ -583,26 +573,6 @@ QmlBindableValue *QmlMetaProperty::setBinding(QmlBindableValue *binding) const return 0; } -/*! \internal */ -int QmlMetaProperty::findSignal(const QObject *obj, const char *name) -{ - const QMetaObject *mo = obj->metaObject(); - int methods = mo->methodCount(); - for (int ii = 0; ii < methods; ++ii) { - QMetaMethod method = mo->method(ii); - if (method.methodType() != QMetaMethod::Signal) - continue; - - QByteArray methodName = method.signature(); - int idx = methodName.indexOf('('); - methodName = methodName.left(idx); - - if (methodName == name) - return ii; - } - return -1; -} - void QmlMetaPropertyPrivate::findSignalInt(QObject *obj, const QString &name) { const QMetaObject *mo = obj->metaObject(); @@ -958,17 +928,6 @@ bool QmlMetaProperty::connectNotifier(QObject *dest, const char *slot) const } } -/*! \internal */ -void QmlMetaProperty::emitSignal() -{ - if (type() & Signal) { - if (d->signal.parameterTypes().isEmpty()) - d->object->metaObject()->activate(d->object, d->coreIdx, 0); - else - qWarning() << "QmlMetaProperty: Cannot emit signal with parameters"; - } -} - /*! Return the Qt metaobject index of the property. */ @@ -1019,7 +978,7 @@ void QmlMetaProperty::restore(quint32 id, QObject *obj) d->name = QLatin1String(p.name()); d->propType = p.propertyType; d->coreIdx = id; - } else if (d->type & SignalProperty || d->type & Signal) { + } else if (d->type & SignalProperty) { d->signal = obj->metaObject()->method(id); d->coreIdx = id; } |