diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-26 15:05:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-27 05:22:25 +0000 |
commit | 3d80bbb6b47bc524f8243de26ff181026e8fc52d (patch) | |
tree | b714a387e20053f4aa7a3bc0e55fa571dc1c59ba /src | |
parent | f6bbeeb417102c61e8bf23f41e412ed9753a348d (diff) |
Fix qmlInfo and friends for anonymous components
When used on for example delegates we can and should also print the line
number and column where the component is declared.
Change-Id: I0f02c675425700cde119352d0001895cc31a4c73
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 7051fb51da..5aaf79c9e5 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -1217,9 +1217,9 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo } ddata = QQmlData::get(instance, /*create*/true); - ddata->lineNumber = obj->location.line; - ddata->columnNumber = obj->location.column; } + ddata->lineNumber = obj->location.line; + ddata->columnNumber = obj->location.column; ddata->setImplicitDestructible(); if (static_cast<quint32>(index) == /*root object*/0 || ddata->rootObjectInCreation) { |