diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-01-21 03:48:36 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2011-01-25 00:46:39 (GMT) |
commit | d7a95474fad9d5ddcc9c9a7473a49644c03e0f7a (patch) | |
tree | 01b2548950dc26cbc31c1e9879b2d09720435796 /src/declarative/qml/qdeclarativeengine.cpp | |
parent | 1873b12eb8f5175aa852341a7055add77b6fcc80 (diff) | |
download | Qt-d7a95474fad9d5ddcc9c9a7473a49644c03e0f7a.zip Qt-d7a95474fad9d5ddcc9c9a7473a49644c03e0f7a.tar.gz Qt-d7a95474fad9d5ddcc9c9a7473a49644c03e0f7a.tar.bz2 |
Add location information for tracing.
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 0f3f20c..99a098e 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -964,8 +964,14 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) QDeclarativeData *data = QDeclarativeData::get(object); if (data && data->deferredComponent) { - QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); - QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, QLatin1String("Deferred Creation:") + object->metaObject()->className()); + if (QDeclarativeDebugService::isDebuggingEnabled()) { + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); + QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); + QString typeName = type ? QLatin1String(type->qmlTypeName()) : QString::fromLatin1(object->metaObject()->className()); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, typeName); + if (data->outerContext) + QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Creating, data->outerContext->url, data->lineNumber); + } QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine); QDeclarativeComponentPrivate::ConstructionState state; |