diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-02 03:34:07 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-02 03:34:07 (GMT) |
commit | 9e7bd55bde0d614719c67977507b270dc7326f05 (patch) | |
tree | de830538b63bd59866ba69c7ce3ce1c7412c8c91 /src/declarative/qml/qmlenginedebug.cpp | |
parent | 74774eb9e7f5b232fdafd067f19b765ede87146f (diff) | |
download | Qt-9e7bd55bde0d614719c67977507b270dc7326f05.zip Qt-9e7bd55bde0d614719c67977507b270dc7326f05.tar.gz Qt-9e7bd55bde0d614719c67977507b270dc7326f05.tar.bz2 |
Save object creation line and column number
This info is used by the debugger interface, and by the qmlInfo()
stream.
Diffstat (limited to 'src/declarative/qml/qmlenginedebug.cpp')
-rw-r--r-- | src/declarative/qml/qmlenginedebug.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp index 0e78cad..321fe74 100644 --- a/src/declarative/qml/qmlenginedebug.cpp +++ b/src/declarative/qml/qmlenginedebug.cpp @@ -181,9 +181,16 @@ void QmlEngineDebugServer::buildObjectList(QDataStream &message, QmlEngineDebugServer::QmlObjectData QmlEngineDebugServer::objectData(QObject *object) { + QmlDeclarativeData *ddata = QmlDeclarativeData::get(object); QmlObjectData rv; - rv.lineNumber = -1; - rv.columnNumber = -1; + if (ddata) { + rv.url = ddata->outerContext->baseUrl(); + rv.lineNumber = ddata->lineNumber; + rv.columnNumber = ddata->columnNumber; + } else { + rv.lineNumber = -1; + rv.columnNumber = -1; + } rv.objectName = object->objectName(); rv.objectType = object->metaObject()->className(); |