summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-24 23:36:29 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-24 23:36:29 (GMT)
commitbfff04ba4fab92e1cfa57954c9df2d3b5ed807ef (patch)
tree8209047915b6026c62658dfe3ba2e6d2237f8ba2 /src
parent057aba1a063b5dcfcdafaba94623cb40a970c9c4 (diff)
parent98c4fb27bb930f19365395a3fd75e4c3012640cb (diff)
downloadQt-bfff04ba4fab92e1cfa57954c9df2d3b5ed807ef.zip
Qt-bfff04ba4fab92e1cfa57954c9df2d3b5ed807ef.tar.gz
Qt-bfff04ba4fab92e1cfa57954c9df2d3b5ed807ef.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp4
-rw-r--r--src/declarative/util/qmlpackage.cpp2
-rw-r--r--src/declarative/util/qmlpackage.h3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 8990732..5f92721 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -862,6 +862,10 @@ bool QmlCompiler::compileProperty(Property *prop, Object *obj, int ctxt)
prop->type = t;
}
}
+ } else if(isAttachedProperty(prop->name) && prop->value) {
+ QmlType *type = QmlMetaType::qmlType(prop->name);
+ if (type && type->attachedPropertiesType())
+ prop->value->metatype = type->attachedPropertiesType();
}
if (prop->name == "id") {
diff --git a/src/declarative/util/qmlpackage.cpp b/src/declarative/util/qmlpackage.cpp
index bfad44c..107bcdb 100644
--- a/src/declarative/util/qmlpackage.cpp
+++ b/src/declarative/util/qmlpackage.cpp
@@ -142,7 +142,7 @@ QObject *QmlPackage::part(const QString &name)
return 0;
}
-QObject *QmlPackage::qmlAttachedProperties(QObject *o)
+QmlPackageAttached *QmlPackage::qmlAttachedProperties(QObject *o)
{
return new QmlPackageAttached(o);
}
diff --git a/src/declarative/util/qmlpackage.h b/src/declarative/util/qmlpackage.h
index 3861890..f4167fd 100644
--- a/src/declarative/util/qmlpackage.h
+++ b/src/declarative/util/qmlpackage.h
@@ -57,6 +57,7 @@ QT_MODULE(Declarative)
*****************************************************************************/
class QmlPackagePrivate;
+class QmlPackageAttached;
class QmlPackage : public QObject
{
Q_OBJECT
@@ -74,7 +75,7 @@ public:
QObject *part(const QString & = QString());
bool hasPart(const QString &);
- static QObject *qmlAttachedProperties(QObject *);
+ static QmlPackageAttached *qmlAttachedProperties(QObject *);
};
QML_DECLARE_TYPE(QmlPackage);