diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-08-22 11:30:25 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-08-22 11:30:26 +0200 |
commit | 8eeede619f417904cbd33fd44143f857dfce0996 (patch) | |
tree | ad89f79cf5fb56f3de5fc4a8dc7c4e2c8e2c419e /src/qml/qml | |
parent | b8f145547e5477cd67f464c2d834f60a84f4aad6 (diff) | |
parent | 3ef4fac9ff3f785d3ccbda4b28ec2c0ea2ee1b59 (diff) |
Merge dev into 5.8
Change-Id: If0f273d3d33cec20edda539de6372337c2e4e969
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/ftw/ftw.pri | 3 | ||||
-rw-r--r-- | src/qml/qml/ftw/qdeletewatcher_p.h | 111 | ||||
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 11 | ||||
-rw-r--r-- | src/qml/qml/qqmlbinding_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 3 | ||||
-rw-r--r-- | src/qml/qml/qqmlexpression_p.h | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 10 | ||||
-rw-r--r-- | src/qml/qml/qqmlproperty.cpp | 25 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 18 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 109 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 2 |
13 files changed, 88 insertions, 211 deletions
diff --git a/src/qml/qml/ftw/ftw.pri b/src/qml/qml/ftw/ftw.pri index 2d4a82e2f4..87d80d04bc 100644 --- a/src/qml/qml/ftw/ftw.pri +++ b/src/qml/qml/ftw/ftw.pri @@ -8,7 +8,6 @@ HEADERS += \ $$PWD/qqmlthread_p.h \ $$PWD/qfinitestack_p.h \ $$PWD/qrecursionwatcher_p.h \ - $$PWD/qdeletewatcher_p.h \ $$PWD/qrecyclepool_p.h \ $$PWD/qflagpointer_p.h \ $$PWD/qlazilyallocated_p.h \ @@ -22,4 +21,4 @@ SOURCES += \ # mirrors logic in $$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri # clock_gettime() is implemented in librt on these systems -contains(QT_CONFIG, clock-gettime):linux-*|hpux-*|solaris-*:LIBS_PRIVATE *= -lrt +qtConfig(clock-gettime):linux-*|hpux-*|solaris-*:LIBS_PRIVATE *= -lrt diff --git a/src/qml/qml/ftw/qdeletewatcher_p.h b/src/qml/qml/ftw/qdeletewatcher_p.h deleted file mode 100644 index d4c0c6dfb2..0000000000 --- a/src/qml/qml/ftw/qdeletewatcher_p.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDELETEWATCHER_P_H -#define QDELETEWATCHER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -class QDeleteWatchable -{ -public: - inline QDeleteWatchable(); - inline ~QDeleteWatchable(); -private: - friend class QDeleteWatcher; - bool *_w; -}; - -class QDeleteWatcher { -public: - inline QDeleteWatcher(QDeleteWatchable *data); - inline ~QDeleteWatcher(); - inline bool wasDeleted() const; -private: - void *operator new(size_t); - bool *_w; - bool _s; - QDeleteWatchable *m_d; -}; - -QDeleteWatchable::QDeleteWatchable() -: _w(0) -{ -} - -QDeleteWatchable::~QDeleteWatchable() -{ - if (_w) *_w = true; -} - -QDeleteWatcher::QDeleteWatcher(QDeleteWatchable *data) -: _s(false), m_d(data) -{ - if (!m_d->_w) - m_d->_w = &_s; - _w = m_d->_w; -} - -QDeleteWatcher::~QDeleteWatcher() -{ - if (false == *_w && &_s == m_d->_w) - m_d->_w = 0; -} - -bool QDeleteWatcher::wasDeleted() const -{ - return *_w; -} - -QT_END_NAMESPACE - -#endif // QDELETEWATCHER_P_H diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 8ed7641610..d944857fc1 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -191,7 +191,7 @@ void QQmlBinding::update(QQmlPropertyData::WriteFlags flags) flags.setFlag(QQmlPropertyData::BypassInterceptor); QQmlBindingProfiler prof(ep->profiler, this, f); - doUpdate(this, watcher, flags, scope, f); + doUpdate(watcher, flags, scope, f); if (!watcher.wasDeleted()) setUpdatingFlag(false); @@ -205,14 +205,15 @@ void QQmlBinding::update(QQmlPropertyData::WriteFlags flags) class QQmlBindingBinding: public QQmlBinding { protected: - void doUpdate(QQmlBinding *binding, const DeleteWatcher &, + void doUpdate(const DeleteWatcher &, QQmlPropertyData::WriteFlags flags, QV4::Scope &, const QV4::ScopedFunctionObject &) Q_DECL_OVERRIDE Q_DECL_FINAL { Q_ASSERT(!m_targetIndex.hasValueTypeIndex()); QQmlPropertyData *pd = nullptr; getPropertyData(&pd, nullptr); - pd->writeProperty(*m_target, &binding, flags); + QQmlBinding *thisPtr = this; + pd->writeProperty(*m_target, &thisPtr, flags); } }; @@ -221,7 +222,7 @@ protected: class QQmlNonbindingBinding: public QQmlBinding { protected: - void doUpdate(QQmlBinding *binding, const DeleteWatcher &watcher, + void doUpdate(const DeleteWatcher &watcher, QQmlPropertyData::WriteFlags flags, QV4::Scope &scope, const QV4::ScopedFunctionObject &f) Q_DECL_OVERRIDE Q_DECL_FINAL { @@ -231,7 +232,7 @@ protected: bool isUndefined = false; QV4::ScopedCallData callData(scope); - binding->QQmlJavaScriptExpression::evaluate(callData, &isUndefined, scope); + QQmlJavaScriptExpression::evaluate(callData, &isUndefined, scope); bool error = false; if (!watcher.wasDeleted() && isAddedToObject() && !hasError()) diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index 1801c3040c..6d42a8ea8a 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -102,7 +102,7 @@ public: void expressionChanged() Q_DECL_OVERRIDE; protected: - virtual void doUpdate(QQmlBinding *binding, const DeleteWatcher &watcher, + virtual void doUpdate(const DeleteWatcher &watcher, QQmlPropertyData::WriteFlags flags, QV4::Scope &scope, const QV4::ScopedFunctionObject &f) = 0; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index c939af93ef..7e4fe73ba1 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -407,10 +407,9 @@ The following functions are also on the Qt object. \li \c "ios" - iOS \li \c "tvos" - tvOS \li \c "linux" - Linux - \li \c "osx" - OS X + \li \c "osx" - \macos \li \c "unix" - Other Unix-based OS \li \c "windows" - Windows - \li \c "wince" - Windows CE \li \c "winrt" - Windows Runtime \li \c "winphone" - Windows Phone \endlist diff --git a/src/qml/qml/qqmlexpression_p.h b/src/qml/qml/qqmlexpression_p.h index 741c25e206..809a57b169 100644 --- a/src/qml/qml/qqmlexpression_p.h +++ b/src/qml/qml/qqmlexpression_p.h @@ -56,7 +56,6 @@ #include <private/qqmlengine_p.h> #include <private/qfieldlist_p.h> #include <private/qflagpointer_p.h> -#include <private/qdeletewatcher_p.h> #include <private/qqmljavascriptexpression_p.h> QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 63e8da3aa8..ee4d3efa6f 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1717,7 +1717,7 @@ QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, \header \li Platform \li Valid suffixes \row \li Windows \li \c .dll \row \li Unix/Linux \li \c .so - \row \li OS X \li \c .dylib, \c .bundle, \c .so + \row \li \macos \li \c .dylib, \c .bundle, \c .so \endtable Version number on unix are ignored. diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index efa824dfae..ebc4d49c36 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -301,7 +301,7 @@ void QQmlPropertyCapture::registerQmlDependencies(const QV4::CompiledData::Funct if (!ep) return; QQmlPropertyCapture *capture = ep->propertyCapture; - if (!capture) + if (!capture || capture->watcher->wasDeleted()) return; if (capture->expression->m_permanentDependenciesRegistered) diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index f9794ec26a..e02d362815 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -75,12 +75,12 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::Compil , compilationUnit(compilationUnit) , resolvedTypes(compilationUnit->resolvedTypes) , propertyCaches(&compilationUnit->propertyCaches) + , sharedState(new QQmlObjectCreatorSharedState) + , topLevelCreator(true) , activeVMEDataForRootContext(activeVMEDataForRootContext) { init(parentContext); - sharedState = new QQmlObjectCreatorSharedState; - topLevelCreator = true; sharedState->componentAttached = 0; sharedState->allCreatedBindings.allocate(compilationUnit->totalBindingsCount); sharedState->allParserStatusCallbacks.allocate(compilationUnit->totalParserStatusCount); @@ -102,12 +102,11 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::Compil , compilationUnit(compilationUnit) , resolvedTypes(compilationUnit->resolvedTypes) , propertyCaches(&compilationUnit->propertyCaches) + , sharedState(inheritedSharedState) + , topLevelCreator(false) , activeVMEDataForRootContext(0) { init(parentContext); - - sharedState = inheritedSharedState; - topLevelCreator = false; } void QQmlObjectCreator::init(QQmlContextData *providedParentContext) @@ -123,6 +122,7 @@ void QQmlObjectCreator::init(QQmlContextData *providedParentContext) context = 0; _qobject = 0; _scopeObject = 0; + _bindingTarget = 0; _valueTypeProperty = 0; _compiledObject = 0; _compiledObjectIndex = -1; diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 7b1e2ec4f6..c62fef7c3d 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -1321,29 +1321,8 @@ bool QQmlPropertyPrivate::write(QObject *object, bool ok = false; QVariant v; - if (variantType == QVariant::String) { - const QString &str = value.toString(); - const bool targetIsChar = (propertyType == qMetaTypeId<QChar>() - || propertyType == qMetaTypeId<char>() - || propertyType == qMetaTypeId<unsigned char>()); - // If the string contains only one character and the target is a char, try converting it. - if (targetIsChar) { - if (str.size() != 1) - return false; // We can only convert if the string contains exactly one character. - - const QChar &qChar = str.at(0); - if (propertyType == qMetaTypeId<QChar>()) { - v = qChar; - ok = true; - } else if (propertyType == qMetaTypeId<char>() || propertyType == qMetaTypeId<unsigned char>()) { - const char c = qChar.toLatin1(); - v = c; - ok = (qChar == c); - } - } else { - v = QQmlStringConverters::variantFromString(str, propertyType, &ok); - } - } + if (variantType == QVariant::String) + v = QQmlStringConverters::variantFromString(value.toString(), propertyType, &ok); if (!ok) { v = value; diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index af9b8cc045..5c53e342f3 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -161,7 +161,6 @@ void QQmlPropertyData::lazyLoad(const QMetaProperty &p) _flags.type = Flags::QVariantType; } else if (type == QVariant::UserType || type == -1) { _flags.notFullyResolved = true; - setPropTypeName(p.typeName()); } else { setPropType(type); } @@ -224,7 +223,6 @@ void QQmlPropertyData::lazyLoad(const QMetaMethod &m) if (!returnType) returnType = "\0"; if ((*returnType != 'v') || (qstrcmp(returnType+1, "oid") != 0)) { - setPropTypeName(returnType); _flags.notFullyResolved = true; } @@ -680,7 +678,6 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, Q_ASSERT(accessorProperty == 0 || (old == 0 && data->revision() == 0)); if (accessorProperty) { - data->_flags.hasAccessors = true; data->setAccessors(accessorProperty->accessors); } else if (old) { data->markAsOverrideOf(old); @@ -691,13 +688,22 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, void QQmlPropertyCache::resolve(QQmlPropertyData *data) const { Q_ASSERT(data->notFullyResolved()); - - data->setPropType(QMetaType::type(data->propTypeName())); data->_flags.notFullyResolved = false; + const QMetaObject *mo = firstCppMetaObject(); + if (data->isFunction()) { + auto metaMethod = mo->method(data->coreIndex()); + const char *retTy = metaMethod.typeName(); + if (!retTy) + retTy = "\0"; + data->setPropType(QMetaType::type(retTy)); + } else { + auto metaProperty = mo->property(data->coreIndex()); + data->setPropType(QMetaType::type(metaProperty.typeName())); + } + if (!data->isFunction()) { if (data->propType() == QMetaType::UnknownType) { - const QMetaObject *mo = _metaObject; QQmlPropertyCache *p = _parent; while (p && (!mo || _ownMetaObject)) { mo = p->_metaObject; diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 6d3c4a8a7e..63a9c63d90 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -108,7 +108,6 @@ public: unsigned isFinal : 1; // Has FINAL flag unsigned isOverridden : 1; // Is overridden by a extension property unsigned isDirect : 1; // Exists on a C++ QMetaObject - unsigned hasAccessors : 1; // Has property accessors unsigned type : 4; // stores an entry of Types @@ -127,7 +126,7 @@ public: unsigned notFullyResolved : 1; // True if the type data is to be lazily resolved unsigned overrideIndexIsProperty: 1; - unsigned _padding : 9; // align to 32 bits + unsigned _padding : 10; // align to 32 bits inline Flags(); inline bool operator==(const Flags &other) const; @@ -147,7 +146,7 @@ public: bool isFinal() const { return _flags.isFinal; } bool isOverridden() const { return _flags.isOverridden; } bool isDirect() const { return _flags.isDirect; } - bool hasAccessors() const { return _flags.hasAccessors; } + bool hasAccessors() const { return accessors() != nullptr; } bool isFunction() const { return _flags.type == Flags::FunctionType; } bool isQObject() const { return _flags.type == Flags::QObjectDerivedType; } bool isEnum() const { return _flags.type == Flags::EnumType; } @@ -168,23 +167,45 @@ public: bool isCloned() const { return _flags.isCloned; } bool isConstructor() const { return _flags.isConstructor; } - bool hasOverride() const { return !(_flags.hasAccessors) && - overrideIndex() >= 0; } - bool hasRevision() const { return !(_flags.hasAccessors) && revision() != 0; } + bool hasOverride() const { return overrideIndex() >= 0; } + bool hasRevision() const { return revision() != 0; } bool isFullyResolved() const { return !_flags.notFullyResolved; } int propType() const { Q_ASSERT(isFullyResolved()); return _propType; } - void setPropType(int pt) { _propType = pt; } - - const char *propTypeName() const { Q_ASSERT(!isFullyResolved()); return _propTypeName; } - void setPropTypeName(const char *ptn) { _propTypeName = ptn; } + void setPropType(int pt) + { + Q_ASSERT(pt >= 0); + Q_ASSERT(pt <= std::numeric_limits<qint16>::max()); + _propType = quint16(pt); + } int notifyIndex() const { return _notifyIndex; } - void setNotifyIndex(int idx) { _notifyIndex = idx; } + void setNotifyIndex(int idx) + { + Q_ASSERT(idx >= std::numeric_limits<qint16>::min()); + Q_ASSERT(idx <= std::numeric_limits<qint16>::max()); + _notifyIndex = qint16(idx); + } - QQmlPropertyCacheMethodArguments *arguments() const { return _arguments; } - void setArguments(QQmlPropertyCacheMethodArguments *args) { _arguments = args; } + bool overrideIndexIsProperty() const { return _flags.overrideIndexIsProperty; } + void setOverrideIndexIsProperty(bool onoff) { _flags.overrideIndexIsProperty = onoff; } + + int overrideIndex() const { return _overrideIndex; } + void setOverrideIndex(int idx) + { + Q_ASSERT(idx >= std::numeric_limits<qint16>::min()); + Q_ASSERT(idx <= std::numeric_limits<qint16>::max()); + _overrideIndex = qint16(idx); + } + + int coreIndex() const { return _coreIndex; } + void setCoreIndex(int idx) + { + Q_ASSERT(idx >= std::numeric_limits<qint16>::min()); + Q_ASSERT(idx <= std::numeric_limits<qint16>::max()); + _coreIndex = qint16(idx); + } int revision() const { return _revision; } void setRevision(int rev) @@ -194,6 +215,9 @@ public: _revision = qint16(rev); } + QQmlPropertyCacheMethodArguments *arguments() const { return _arguments; } + void setArguments(QQmlPropertyCacheMethodArguments *args) { _arguments = args; } + int metaObjectOffset() const { return _metaObjectOffset; } void setMetaObjectOffset(int off) { @@ -202,54 +226,35 @@ public: _metaObjectOffset = qint16(off); } - bool overrideIndexIsProperty() const { return _flags.overrideIndexIsProperty; } - void setOverrideIndexIsProperty(bool onoff) { _flags.overrideIndexIsProperty = onoff; } - - int overrideIndex() const { return _overrideIndex; } - void setOverrideIndex(int idx) - { - Q_ASSERT(idx >= std::numeric_limits<qint16>::min()); - Q_ASSERT(idx <= std::numeric_limits<qint16>::max()); - _overrideIndex = idx; - } - QQmlAccessors *accessors() const { return _accessors; } void setAccessors(QQmlAccessors *acc) { _accessors = acc; } - int coreIndex() const { return _coreIndex; } - void setCoreIndex(int idx) { _coreIndex = idx; } - private: - union { - int _propType; // When !NotFullyResolved - const char *_propTypeName; // When NotFullyResolved - }; - union { - // The notify index is in the range returned by QObjectPrivate::signalIndex(). - // This is different from QMetaMethod::methodIndex(). - int _notifyIndex; // When !IsFunction - QQmlPropertyCacheMethodArguments *_arguments; // When IsFunction && HasArguments - }; + Flags _flags; + qint16 _coreIndex; + quint16 _propType; - union { - struct { // When !HasAccessors - qint16 _revision; - qint16 _metaObjectOffset; + // The notify index is in the range returned by QObjectPrivate::signalIndex(). + // This is different from QMetaMethod::methodIndex(). + qint16 _notifyIndex; + qint16 _overrideIndex; - signed int _overrideIndex; // When !IsValueTypeVirtual - }; - struct { // When HasAccessors - QQmlAccessors *_accessors; - }; - }; + qint16 _revision; + qint16 _metaObjectOffset; - int _coreIndex; - Flags _flags; + QQmlPropertyCacheMethodArguments *_arguments; + QQmlAccessors *_accessors; friend class QQmlPropertyData; friend class QQmlPropertyCache; }; +#if QT_POINTER_SIZE == 4 +Q_STATIC_ASSERT(sizeof(QQmlPropertyRawData) == 24); +#else // QT_POINTER_SIZE == 8 +Q_STATIC_ASSERT(sizeof(QQmlPropertyRawData) == 32); +#endif + class QQmlPropertyData : public QQmlPropertyRawData { public: @@ -570,7 +575,6 @@ QQmlPropertyRawData::Flags::Flags() , isFinal(false) , isOverridden(false) , isDirect(false) - , hasAccessors(false) , type(OtherType) , isVMEFunction(false) , hasArguments(false) @@ -594,7 +598,6 @@ bool QQmlPropertyRawData::Flags::operator==(const QQmlPropertyRawData::Flags &ot isAlias == other.isAlias && isFinal == other.isFinal && isOverridden == other.isOverridden && - hasAccessors == other.hasAccessors && type == other.type && isVMEFunction == other.isVMEFunction && hasArguments == other.hasArguments && @@ -625,12 +628,14 @@ void QQmlPropertyRawData::Flags::copyPropertyTypeFlags(QQmlPropertyRawData::Flag QQmlPropertyData::QQmlPropertyData() { + setCoreIndex(-1); setPropType(0); setNotifyIndex(-1); setOverrideIndex(-1); setRevision(0); setMetaObjectOffset(-1); - setCoreIndex(-1); + setArguments(nullptr); + setAccessors(nullptr); } QQmlPropertyData::QQmlPropertyData(const QQmlPropertyRawData &d) diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index f7846f333b..566f5ef767 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2929,7 +2929,7 @@ void QQmlScriptBlob::dataReceived(const Data &data) irUnit.javaScriptCompilationUnit = unit; irUnit.imports = collector.imports; if (collector.hasPragmaLibrary) - irUnit.unitFlags |= QV4::CompiledData::Unit::IsSharedLibrary; + irUnit.jsModule.unitFlags |= QV4::CompiledData::Unit::IsSharedLibrary; QmlIR::QmlUnitGenerator qmlGenerator; QV4::CompiledData::ResolvedTypeReferenceMap emptyDependencies; |