diff options
Diffstat (limited to 'src/qml/qml/qqmlpropertybinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertybinding.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertybinding.cpp b/src/qml/qml/qqmlpropertybinding.cpp index 313cd7f395..c0b2d75c6e 100644 --- a/src/qml/qml/qqmlpropertybinding.cpp +++ b/src/qml/qml/qqmlpropertybinding.cpp @@ -86,7 +86,12 @@ void QQmlPropertyBinding::expressionChanged() err.setUrl(QUrl{location.sourceFile}); err.setLine(location.line); err.setColumn(location.column); - err.setDescription(QString::fromLatin1("Binding loop detected")); + const auto ctxt = context(); + QQmlEngine *engine = ctxt ? ctxt->engine() : nullptr; + if (engine) + err.setDescription(createBindingLoopErrorDescription(QQmlEnginePrivate::get(engine))); + else + err.setDescription(QString::fromLatin1("Binding loop detected")); err.setObject(target()); qmlWarning(this->scopeObject(), err); return; |