diff options
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 52572be2b2..b9566d5862 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -43,6 +43,10 @@ #include "qqmlcontext.h" #include "qqmlinfo.h" #include "qqmldata_p.h" + +#include <private/qqmldebugserviceinterfaces_p.h> +#include <private/qqmldebugconnector_p.h> + #include <private/qqmlprofiler_p.h> #include <private/qqmlexpression_p.h> #include <private/qqmlscriptstring_p.h> @@ -54,6 +58,8 @@ #include <private/qv4variantobject_p.h> #include <private/qv4jscall_p.h> +#include <qtqml_tracepoints_p.h> + #include <QVariant> #include <QtCore/qdebug.h> #include <QVector> @@ -182,6 +188,8 @@ void QQmlBinding::update(QQmlPropertyData::WriteFlags flags) if (canUseAccessor()) flags.setFlag(QQmlPropertyData::BypassInterceptor); + Q_TRACE_SCOPE(QQmlBinding, engine, function() ? function()->name()->toQString() : QString(), + sourceLocation().sourceFile, sourceLocation().line, sourceLocation().column); QQmlBindingProfiler prof(QQmlEnginePrivate::get(engine)->profiler, function()); doUpdate(watcher, flags, scope); @@ -316,7 +324,7 @@ protected: break; default: if (const QV4::QQmlValueTypeWrapper *vtw = result.as<const QV4::QQmlValueTypeWrapper>()) { - if (vtw->d()->valueType->metaType.id() == pd->propType()) { + if (vtw->d()->valueType()->metaType.id() == pd->propType()) { return vtw->write(m_target.data(), pd->coreIndex()); } } @@ -388,6 +396,11 @@ QQmlBinding *QQmlBinding::createTranslationBinding(const QQmlRefPointer<QV4::Exe b->QQmlJavaScriptExpression::setContext(ctxt); b->setScopeObject(obj); + if (QQmlDebugTranslationService *service + = QQmlDebugConnector::service<QQmlDebugTranslationService>()) { + service->foundTranslationBinding(b, obj, ctxt); + } + return b; } @@ -475,7 +488,7 @@ Q_NEVER_INLINE bool QQmlBinding::slowWrite(const QQmlPropertyData &core, if (!propertyMetaObject.isNull()) propertyType = propertyMetaObject.className(); } - } else if (userType != QVariant::Invalid) { + } else if (userType != QMetaType::UnknownType) { if (userType == QMetaType::Nullptr || userType == QMetaType::VoidStar) valueType = "null"; else |