diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-02-19 01:00:06 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-02-19 01:00:06 +0100 |
commit | 440d699f83ab2a9676744755fd8d42c1cfeb8064 (patch) | |
tree | bb488739927eb0541b9ec668bed774a6d214e894 /src/qml/qml | |
parent | 872dc18e653b50c878699a78ca7cb9399cb47b62 (diff) | |
parent | d89dde522a67f6fb01f9879f45871efed5e35793 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia15cd13ed7014db80e02ba8b7e0588e3c53f832c
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlcustomparser_p.h | 5 | ||||
-rw-r--r-- | src/qml/qml/qqmllocale.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycachecreator_p.h | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmltype.cpp | 4 |
4 files changed, 5 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlcustomparser_p.h b/src/qml/qml/qqmlcustomparser_p.h index df8cbc9072..abac90d6ad 100644 --- a/src/qml/qml/qqmlcustomparser_p.h +++ b/src/qml/qml/qqmlcustomparser_p.h @@ -107,11 +107,6 @@ private: }; Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlCustomParser::Flags) -#if 0 -#define QML_REGISTER_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN, NAME, TYPE, CUSTOMTYPE) \ - qmlRegisterCustomType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN, #NAME, #TYPE, new CUSTOMTYPE) -#endif - QT_END_NAMESPACE #endif diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index 1743410776..bc227ad713 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -314,7 +314,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function QLocale locale; QString dateString = s->toQString(); QDate date = locale.toDate(dateString); - RETURN_RESULT(engine->newDateObject(QDateTime(date))); + RETURN_RESULT(engine->newDateObject(date.startOfDay())); } } @@ -341,7 +341,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function dt = r->d()->locale->toDate(dateString, enumFormat); } - RETURN_RESULT(engine->newDateObject(QDateTime(dt))); + RETURN_RESULT(engine->newDateObject(dt.startOfDay())); } ReturnedValue QQmlDateExtension::method_timeZoneUpdated(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *, int argc) diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h index a02209521a..5e26eb1ea7 100644 --- a/src/qml/qml/qqmlpropertycachecreator_p.h +++ b/src/qml/qml/qqmlpropertycachecreator_p.h @@ -153,6 +153,7 @@ inline QQmlPropertyCacheCreator<ObjectContainer>::QQmlPropertyCacheCreator(QQmlP , propertyCaches(propertyCaches) , pendingGroupPropertyBindings(pendingGroupPropertyBindings) , typeClassName(typeClassName) + , currentRoot(-1) { propertyCaches->resize(objectContainer->objectCount()); } diff --git a/src/qml/qml/qqmltype.cpp b/src/qml/qml/qqmltype.cpp index 78cf187f07..e87c901c9d 100644 --- a/src/qml/qml/qqmltype.cpp +++ b/src/qml/qml/qqmltype.cpp @@ -631,14 +631,14 @@ QTypeRevision QQmlType::metaObjectRevision() const QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction(QQmlEnginePrivate *engine) const { - if (const QQmlTypePrivate *base = d->attachedPropertiesBase(engine)) + if (const QQmlTypePrivate *base = d ? d->attachedPropertiesBase(engine) : nullptr) return base->extraData.cd->attachedPropertiesFunc; return nullptr; } const QMetaObject *QQmlType::attachedPropertiesType(QQmlEnginePrivate *engine) const { - if (const QQmlTypePrivate *base = d->attachedPropertiesBase(engine)) + if (const QQmlTypePrivate *base = d ? d->attachedPropertiesBase(engine) : nullptr) return base->extraData.cd->attachedPropertiesType; return nullptr; } |