diff options
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmlvaluetypewrapper.cpp | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp index 7075d0f5f6..a85601e5b9 100644 --- a/src/qml/qml/qqmlvaluetypewrapper.cpp +++ b/src/qml/qml/qqmlvaluetypewrapper.cpp @@ -3,41 +3,34 @@ #include "qqmlvaluetypewrapper_p.h" -#include <private/qqmlvaluetype_p.h> #include <private/qqmlbinding_p.h> -#include <private/qqmlglobal_p.h> #include <private/qqmlbuiltinfunctions_p.h> +#include <private/qqmlvaluetype_p.h> -#include <private/qv4engine_p.h> -#include <private/qv4functionobject_p.h> -#include <private/qv4variantobject_p.h> #include <private/qv4alloca_p.h> -#include <private/qv4stackframe_p.h> -#include <private/qv4objectiterator_p.h> -#include <private/qv4qobjectwrapper_p.h> -#include <private/qv4identifiertable_p.h> -#include <private/qv4lookup_p.h> -#include <private/qv4sequenceobject_p.h> #include <private/qv4arraybuffer_p.h> #include <private/qv4dateobject_p.h> +#include <private/qv4engine_p.h> +#include <private/qv4functionobject_p.h> +#include <private/qv4identifiertable_p.h> #include <private/qv4jsonobject_p.h> +#include <private/qv4lookup_p.h> +#include <private/qv4qobjectwrapper_p.h> +#include <private/qv4stackframe_p.h> +#include <private/qv4variantobject_p.h> + +#include <QtCore/qline.h> +#include <QtCore/qsize.h> +#include <QtCore/qdatetime.h> +#include <QtCore/qloggingcategory.h> + #if QT_CONFIG(regularexpression) #include <private/qv4regexpobject_p.h> #endif -#if QT_CONFIG(qml_locale) -#include <private/qqmllocale_p.h> -#endif -#include <QtCore/qloggingcategory.h> -#include <QtCore/qdatetime.h> -#include <QtCore/QLine> -#include <QtCore/QLineF> -#include <QtCore/QSize> -#include <QtCore/QSizeF> -#include <QtCore/QTimeZone> QT_BEGIN_NAMESPACE -Q_DECLARE_LOGGING_CATEGORY(lcBindingRemoval) +Q_DECLARE_LOGGING_CATEGORY(lcBuiltinsBindingRemoval) DEFINE_OBJECT_VTABLE(QV4::QQmlValueTypeWrapper); @@ -304,7 +297,7 @@ static ReturnedValue getGadgetProperty(ExecutionEngine *engine, { if (isFunction) { // calling a Q_INVOKABLE function of a value type - return QV4::QObjectMethod::create(engine->rootContext(), valueTypeWrapper, coreIndex); + return QV4::QObjectMethod::create(engine, valueTypeWrapper, coreIndex); } const QMetaObject *metaObject = valueTypeWrapper->metaObject(); @@ -785,7 +778,7 @@ bool QQmlValueTypeWrapper::virtualPut(Managed *m, PropertyKey id, const Value &v QV4::Scoped<QQmlBindingFunction> bindingFunction(scope, (const Value &)f); - QV4::ScopedFunctionObject f(scope, bindingFunction->bindingFunction()); + QV4::Scoped<JavaScriptFunctionObject> f(scope, bindingFunction->bindingFunction()); QV4::ScopedContext ctx(scope, f->scope()); QQmlBinding *newBinding = QQmlBinding::create(&cacheData, f->function(), referenceObject, context, ctx); newBinding->setSourceLocation(bindingFunction->currentLocation()); @@ -796,12 +789,12 @@ bool QQmlValueTypeWrapper::virtualPut(Managed *m, PropertyKey id, const Value &v QQmlPropertyPrivate::setBinding(newBinding); return true; } else if (referenceObject) { - if (Q_UNLIKELY(lcBindingRemoval().isInfoEnabled())) { + if (Q_UNLIKELY(lcBuiltinsBindingRemoval().isInfoEnabled())) { if (auto binding = QQmlPropertyPrivate::binding(referenceObject, QQmlPropertyIndex(referencePropertyIndex, pd.coreIndex()))) { Q_ASSERT(binding->kind() == QQmlAbstractBinding::QmlBinding); const auto qmlBinding = static_cast<const QQmlBinding*>(binding); const auto stackFrame = v4->currentStackFrame; - qCInfo(lcBindingRemoval, + qCInfo(lcBuiltinsBindingRemoval, "Overwriting binding on %s::%s which was initially bound at %s by setting \"%s\" at %s:%d", referenceObject->metaObject()->className(), referenceObject->metaObject()->property(referencePropertyIndex).name(), qPrintable(qmlBinding->expressionIdentifier()), |