diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-24 07:48:28 (GMT) |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-24 07:48:28 (GMT) |
commit | 80476372e6f4dd3e179eeba949e86a336bc8fde3 (patch) | |
tree | 9502663e814ffb6f0b1a6542e76c25e82a4a0e3b /src/declarative/qml/qmldom.cpp | |
parent | ea2f61a76f8b6075a3421f8f1dce353d8ae22b58 (diff) | |
download | Qt-80476372e6f4dd3e179eeba949e86a336bc8fde3.zip Qt-80476372e6f4dd3e179eeba949e86a336bc8fde3.tar.gz Qt-80476372e6f4dd3e179eeba949e86a336bc8fde3.tar.bz2 |
Added objectClassName now that objectType is the fully-qualified type
name.
Diffstat (limited to 'src/declarative/qml/qmldom.cpp')
-rw-r--r-- | src/declarative/qml/qmldom.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 6725950..c6b7192 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -747,11 +747,11 @@ bool QmlDomObject::isValid() const } /*! - Returns the type name of this object. + Returns the fully-qualified type name of this object. - For example, the type of this object would be "QGraphicsWidget". + For example, the type of this object would be "Qt/4.6/Rect". \qml -QGraphicsWidget { } +Rect { } \endqml */ QByteArray QmlDomObject::objectType() const @@ -761,6 +761,23 @@ QByteArray QmlDomObject::objectType() const } /*! + Returns the fully-qualified type name of this object. + + For example, the type of this object would be "Qt/4.6/Rect". + \qml +Rect { } + \endqml +*/ +QByteArray QmlDomObject::objectClassName() const +{ + if (d->object) + return d->object->className; + else + return QByteArray(); +} + + +/*! Returns the QML id assigned to this object, or an empty QByteArray if no id has been assigned. |