diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-05-28 15:03:57 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-03 17:27:23 +0200 |
| commit | 4d5a8b8750916ffdce8ccee8db9747ff09a90ccf (patch) | |
| tree | c18c7980815a31354194ea0e103120e18d9cf77c /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
| parent | 3de85ce8b99e032d5d4920e35dc1bad4e479fa79 (diff) | |
Restructure builtins and QtQml.Base
The QtQml library should hold the builtins and provide no plugin. Move
the types currently exposed in QtQml.Base to QtQml where it makes sense.
Anonymous object types as well as sequence types and value types can
well be exposed as builtins. This makes everybody's life easier since
you now can universally depend on their availability.
The Qt object, despite being a named object type, also becomes a builtin
because you always have the "Qt" member of the JavaScript global object
which holds the same thing. So, formally exposing "Qt" as builtin
doesn't really add anything new.
QQmlLoggingCategory is split up into two classes, not only because we
need the base class when printing to the console from QtQml, but also
because this paves the way for compile time identification of logging
categories as first argument to the console methods.
For QQmlLocale we have to refer to a different trick. The value type and
the QQmlLocale "namespace" have to be builtins, but the "Locale" name,
due to being uppercase and versioned, has to be part of QtQml. We
transform QQmlLocale into a struct so that we can inherit the enums from
QLocale and extend a namespace with it in QtQml.
Pick-to: 6.8
Fixes: QTBUG-119473
Fixes: QTBUG-125765
Change-Id: Ica59390e54c473e33b4315f4384b724c870c1062
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index c0e238c273..eaee078a5f 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(lcBindingRemoval, "qt.qml.binding.removal", QtWarningMsg) +Q_LOGGING_CATEGORY(lcBuiltinsBindingRemoval, "qt.qml.binding.removal", QtWarningMsg) Q_LOGGING_CATEGORY(lcObjectConnect, "qt.qml.object.connect", QtWarningMsg) Q_LOGGING_CATEGORY(lcOverloadResolution, "qt.qml.overloadresolution", QtWarningMsg) Q_LOGGING_CATEGORY(lcMethodBehavior, "qt.qml.method.behavior") @@ -664,13 +664,13 @@ void QObjectWrapper::setProperty( } } - if (Q_UNLIKELY(lcBindingRemoval().isInfoEnabled())) { + if (Q_UNLIKELY(lcBuiltinsBindingRemoval().isInfoEnabled())) { if (auto binding = QQmlPropertyPrivate::binding(object, QQmlPropertyIndex(property->coreIndex()))) { const auto stackFrame = engine->currentStackFrame; switch (binding->kind()) { case QQmlAbstractBinding::QmlBinding: { const auto qmlBinding = static_cast<const QQmlBinding*>(binding); - qCInfo(lcBindingRemoval, + qCInfo(lcBuiltinsBindingRemoval, "Overwriting binding on %s::%s at %s:%d that was initially bound at %s", object->metaObject()->className(), qPrintable(property->name(object)), qPrintable(stackFrame->source()), stackFrame->lineNumber(), @@ -679,7 +679,7 @@ void QObjectWrapper::setProperty( } case QQmlAbstractBinding::ValueTypeProxy: case QQmlAbstractBinding::PropertyToPropertyBinding: { - qCInfo(lcBindingRemoval, + qCInfo(lcBuiltinsBindingRemoval, "Overwriting binding on %s::%s at %s:%d", object->metaObject()->className(), qPrintable(property->name(object)), qPrintable(stackFrame->source()), stackFrame->lineNumber()); |
