summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlmetaproperty.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-17 07:40:03 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-17 07:40:03 (GMT)
commit8f60083c0ea560de3dedd5dfd087a06212594fc9 (patch)
tree1ed22be0e0f2df7ede3c35024fc548f89bc7b6e1 /src/declarative/qml/qmlmetaproperty.cpp
parent02e5239002786a55d68f04a512baa7d4c5f40e66 (diff)
downloadQt-8f60083c0ea560de3dedd5dfd087a06212594fc9.zip
Qt-8f60083c0ea560de3dedd5dfd087a06212594fc9.tar.gz
Qt-8f60083c0ea560de3dedd5dfd087a06212594fc9.tar.bz2
More namespace improvements
- Store and find QML version ranges efficiently - Require version for QmlType-from-string - Removed unused version-ignorant QmlType-from-string functions - Some attached properties now resolve (eg. tst_qmlparser) - Still no better: - interfaces not versioned - some attached properties still hard-codec to Qt
Diffstat (limited to 'src/declarative/qml/qmlmetaproperty.cpp')
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index d986077..c1736cb 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -218,9 +218,13 @@ void QmlMetaPropertyPrivate::initProperty(QObject *obj, const QString &name)
if (name.at(0).isUpper()) {
// Attached property
- attachedFunc = QmlMetaType::attachedPropertiesFuncId(name.toLatin1());
- if (attachedFunc != -1)
- type = QmlMetaProperty::Property | QmlMetaProperty::Attached;
+ // XXX name should be resolved with QmlEngine::resolveType(), not like this!
+ QmlType *t = QmlMetaType::qmlType("Qt/"+name.toLatin1(),-1,-1);
+ if (t && t->attachedPropertiesFunction()) {
+ attachedFunc = t->index();
+ if (attachedFunc != -1)
+ type = QmlMetaProperty::Property | QmlMetaProperty::Attached;
+ }
return;
} else if (name.count() >= 3 &&