aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-19 01:00:04 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-19 01:00:04 +0200
commit53bd6b8111eb0d7f23b3b0ca95bef4735f7a952c (patch)
treef4b1407fa828e4d6ac608dbef97b4b9f3203a7cc
parent2bdbf216fe7b6cf9d404b80ac405bd3969f5c07f (diff)
parentc018df5b4075ae962966d4df7653d476dab02840 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
-rw-r--r--dist/changes-5.12.375
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
-rw-r--r--src/qml/qml/qqml.h9
-rw-r--r--src/qml/qml/qqmldata_p.h3
-rw-r--r--src/qml/qml/qqmlengine.cpp60
-rw-r--r--src/qml/qml/qqmlmetatype.cpp35
-rw-r--r--src/qml/qml/qqmlmetatype_p.h2
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp4
-rw-r--r--src/qml/qml/qqmlprivate.h5
-rw-r--r--src/qml/qml/qqmlproperty.cpp4
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp7
-rw-r--r--src/quick/items/qquickwindow.cpp2
-rw-r--r--src/quick/util/qquickanimation.cpp2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml20
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp10
-rw-r--r--tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp8
-rw-r--r--tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST2
-rw-r--r--tests/auto/quick/qquickapplication/BLACKLIST3
-rw-r--r--tools/qml/main.cpp7
-rw-r--r--tools/qml/qml.icnsbin196156 -> 0 bytes
-rw-r--r--tools/qml/qml.pro10
-rw-r--r--tools/qml/qml.qrc1
-rw-r--r--tools/qml/resources/Info.plist (renamed from tools/qml/Info.plist)0
-rw-r--r--tools/qml/resources/qml-64.pngbin0 -> 2304 bytes
-rw-r--r--tools/qml/resources/qml.icnsbin0 -> 194026 bytes
-rw-r--r--tools/qml/resources/qml.icobin0 -> 124455 bytes
-rw-r--r--tools/qmlscene/main.cpp6
27 files changed, 218 insertions, 59 deletions
diff --git a/dist/changes-5.12.3 b/dist/changes-5.12.3
new file mode 100644
index 0000000000..ba1cadd039
--- /dev/null
+++ b/dist/changes-5.12.3
@@ -0,0 +1,75 @@
+Qt 5.12.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.12.0 through 5.12.2.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.12 series is binary compatible with the 5.11.x series.
+Applications compiled for 5.11 will continue to run with 5.12.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* QtQml *
+****************************************************************************
+
+ - [QTBUG-74677] Avoid redundant slashes and handle redundant enums when
+ converting resource URLs.
+ - [QTBUG-74190] Fixed a crash related to freezing properties.
+ - [QTBUG-58559] Fixed a memory leak when deleting dynamic properties on
+ JS objects (trigger garbage collection).
+ - [QTBUG-74532] qmlcachegen output is now independent of TranslationData
+ and thus more deterministic.
+ - [QTBUG-69898] Made several performance improvements with property lookups.
+ - [QTBUG-74476] Fixed a logic bug involving inversion of non-reflexive
+ comparison binops, which resulted in incorrect evaluation of some if statements.
+ - [QTBUG-73843] When QQmlAbstractUrlInterceptor intercepts the loading of
+ the qmldir file, we now use the intercepted URL to load additional files
+ in that import.
+ - [QTBUG-74058] Fixed a GC bug resulting in invalid memory read.
+ - [QTBUG-74148] Fixed a propertyCache memory leak with Loader and PageIndicator.
+ - [QTBUG-74087] Deeper recursion is now possible, and less stack space is used
+ during code generation. The "Maximum statement or expression depth exceeded"
+ error is now less likely when using 3rd party JavaScript libraries.
+ - [QTBUG-74188] Fixed a crash when deleting properties, due to shared ownership
+ of SparseArrayNode.
+ - [QTBUG-72807] Disabled tail calls for functions called with more arguments
+ than formals.
+ - [QTBUG-73999] Fixed number to string conversion with radix.
+ - [QTBUG-73985] Fixed a crash during unwinding in QJSEngine::evaluate.
+ - [QTBUG-33179] QML revisioning now works for grouped properties.
+
+****************************************************************************
+* QtQuick *
+****************************************************************************
+
+ - [QT3DS-3238] Fixed a surface format bug on macOS.
+ - [QTBUG-74508] Fixed incorrect PathView.currentIndex assignment with
+ StrictlyEnforceRange.
+ - [QTBUG-72457] Text now renders HTML table cell background colors properly,
+ and does correct layout of table cells with percentage-based widths.
+ - [QDS-263] qmlpreview now does better window placement on Windows.
+ - [QTBUG-71042] Fixed a bug in setting dynamic anchors to parents
+ in PropertyChanges.
+ - [QTBUG-73723] Fixed leaking of QML QQuickItemGrabResult objects
+ afterQQuickItem::grabToImage() is called from QML.
+ - [QTBUG-74008] Fixed a crash when one touch event contains a point that
+ begins acting as the synthetic mouse, and then that point is missing
+ from a subsequent event. (This is unexpected from most touchscreens.)
+ - [QTBUG-74128] Fixed binding loop warnings while using bi-directional
+ property bindings with Flickable contentX/Y properties.
+ - [QTBUG-73819] Fixed a crash when Loader unloads an Item or Event Handler
+ that currently has a grab.
+ - [QTBUG-41045] When a window is hidden and the visible content under
+ the mouse cursor in another window has a different cursor, it will
+ now change as it should.
+ - [QTBUG-70031] Fixed issues caused by adding the new row and column
+ properties in QQmlDelegateModel.
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 377c30617a..5467e730e3 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -856,7 +856,7 @@ ReturnedValue QObjectWrapper::virtualResolveLookupGetter(const Object *object, E
if (!ddata || !ddata->propertyCache) {
QQmlPropertyData local;
QQmlPropertyData *property = QQmlPropertyCache::property(engine->jsEngine(), qobj, name, qmlContext, local);
- return getProperty(engine, qobj, property);
+ return property ? getProperty(engine, qobj, property) : QV4::Encode::undefined();
}
QQmlPropertyData *property = ddata->propertyCache->property(name.getPointer(), qobj, qmlContext);
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index bf9330856d..42cf723284 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -582,6 +582,10 @@ namespace QtQml {
Q_QML_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true);
Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *,
const QMetaObject *, bool create);
+ Q_QML_EXPORT QQmlAttachedPropertiesFunc qmlAttachedPropertiesFunction(QObject *,
+ const QMetaObject *);
+ Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(QObject *, QQmlAttachedPropertiesFunc func,
+ bool create = true);
#ifndef Q_QDOC
}
@@ -602,8 +606,9 @@ Q_QML_EXPORT void qmlRegisterModule(const char *uri, int versionMajor, int versi
template<typename T>
QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true)
{
- static int idx = -1;
- return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create);
+ QObject *mutableObj = const_cast<QObject *>(obj);
+ return qmlAttachedPropertiesObject(
+ mutableObj, qmlAttachedPropertiesFunction(mutableObj, &T::staticMetaObject), create);
}
Q_QML_EXPORT void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor);
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h
index 2468de6857..f4c03fc17c 100644
--- a/src/qml/qml/qqmldata_p.h
+++ b/src/qml/qml/qqmldata_p.h
@@ -57,6 +57,7 @@
#include <private/qv4value_p.h>
#include <private/qv4persistent_p.h>
#include <private/qqmlrefcount_p.h>
+#include <qqmlprivate.h>
#include <qjsengine.h>
#include <qvector.h>
@@ -265,7 +266,7 @@ public:
}
bool hasExtendedData() const { return extendedData != nullptr; }
- QHash<int, QObject *> *attachedProperties() const;
+ QHash<QQmlAttachedPropertiesFunc, QObject *> *attachedProperties() const;
static inline bool wasDeleted(const QObject *);
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 0a26ed89cc..4c6a1b69d8 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1651,29 +1651,38 @@ QQmlEngine *qmlEngine(const QObject *obj)
return data->context->engine;
}
-QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create)
+static QObject *resolveAttachedProperties(QQmlAttachedPropertiesFunc pf, QQmlData *data,
+ QObject *object, bool create)
{
- QQmlData *data = QQmlData::get(object, create);
- if (!data)
- return nullptr; // Attached properties are only on objects created by QML, unless explicitly requested (create==true)
+ if (!pf)
+ return nullptr;
- QObject *rv = data->hasExtendedData()?data->attachedProperties()->value(id):0;
+ QObject *rv = data->hasExtendedData() ? data->attachedProperties()->value(pf) : 0;
if (rv || !create)
return rv;
- QQmlEnginePrivate *engine = QQmlEnginePrivate::get(data->context);
- QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(engine, id);
- if (!pf)
- return nullptr;
-
- rv = pf(const_cast<QObject *>(object));
+ rv = pf(object);
if (rv)
- data->attachedProperties()->insert(id, rv);
+ data->attachedProperties()->insert(pf, rv);
return rv;
}
+QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create)
+{
+ QQmlData *data = QQmlData::get(object, create);
+
+ // Attached properties are only on objects created by QML,
+ // unless explicitly requested (create==true)
+ if (!data)
+ return nullptr;
+
+ QQmlEnginePrivate *engine = QQmlEnginePrivate::get(data->context);
+ return resolveAttachedProperties(QQmlMetaType::attachedPropertiesFuncById(engine, id), data,
+ const_cast<QObject *>(object), create);
+}
+
QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
const QMetaObject *attachedMetaObject, bool create)
{
@@ -1688,6 +1697,29 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
return qmlAttachedPropertiesObjectById(*idCache, object, create);
}
+QQmlAttachedPropertiesFunc qmlAttachedPropertiesFunction(QObject *object,
+ const QMetaObject *attachedMetaObject)
+{
+ QQmlEngine *engine = object ? qmlEngine(object) : nullptr;
+ return QQmlMetaType::attachedPropertiesFunc(engine ? QQmlEnginePrivate::get(engine) : nullptr,
+ attachedMetaObject);
+}
+
+QObject *qmlAttachedPropertiesObject(QObject *object, QQmlAttachedPropertiesFunc func, bool create)
+{
+ if (!object)
+ return nullptr;
+
+ QQmlData *data = QQmlData::get(object, create);
+
+ // Attached properties are only on objects created by QML,
+ // unless explicitly requested (create==true)
+ if (!data)
+ return nullptr;
+
+ return resolveAttachedProperties(func, data, object, create);
+}
+
} // namespace QtQml
#if QT_DEPRECATED_SINCE(5, 1)
@@ -1728,7 +1760,7 @@ public:
QQmlDataExtended();
~QQmlDataExtended();
- QHash<int, QObject *> attachedProperties;
+ QHash<QQmlAttachedPropertiesFunc, QObject *> attachedProperties;
};
QQmlDataExtended::QQmlDataExtended()
@@ -1874,7 +1906,7 @@ void QQmlData::disconnectNotifiers()
}
}
-QHash<int, QObject *> *QQmlData::attachedProperties() const
+QHash<QQmlAttachedPropertiesFunc, QObject *> *QQmlData::attachedProperties() const
{
if (!extendedData) extendedData = new QQmlDataExtended;
return &extendedData->attachedProperties;
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index a8ec5d18f8..b21c3ec40d 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -224,7 +224,6 @@ public:
QQmlCustomParser *customParser;
QQmlAttachedPropertiesFunc attachedPropertiesFunc;
const QMetaObject *attachedPropertiesType;
- int attachedPropertiesId;
int propertyValueSourceCast;
int propertyValueInterceptorCast;
bool registerEnumClassesUnscoped;
@@ -269,8 +268,6 @@ public:
mutable QStringHash<int> scopedEnumIndex; // maps from enum name to index in scopedEnums
mutable QList<QStringHash<int>*> scopedEnums;
- static QHash<const QMetaObject *, int> attachedPropertyIds;
-
struct PropertyCacheByMinorVersion
{
PropertyCacheByMinorVersion() : cache(nullptr), minorVersion(-1) {}
@@ -363,8 +360,6 @@ QJSValue QQmlType::SingletonInstanceInfo::scriptApi(QQmlEngine *e) const
return scriptApis.value(e);
}
-QHash<const QMetaObject *, int> QQmlTypePrivate::attachedPropertyIds;
-
QQmlTypePrivate::QQmlTypePrivate(QQmlType::RegistrationType type)
: refCount(1), regType(type), iid(nullptr), typeId(0), listId(0), revision(0),
containsRevisionedAttributes(false), baseMetaObject(nullptr),
@@ -498,14 +493,6 @@ QQmlType::QQmlType(QQmlMetaTypeData *data, const QString &elementName, const QQm
d->baseMetaObject = type.metaObject;
d->extraData.cd->attachedPropertiesFunc = type.attachedPropertiesFunction;
d->extraData.cd->attachedPropertiesType = type.attachedPropertiesMetaObject;
- if (d->extraData.cd->attachedPropertiesType) {
- auto iter = QQmlTypePrivate::attachedPropertyIds.find(d->baseMetaObject);
- if (iter == QQmlTypePrivate::attachedPropertyIds.end())
- iter = QQmlTypePrivate::attachedPropertyIds.insert(d->baseMetaObject, d->index);
- d->extraData.cd->attachedPropertiesId = *iter;
- } else {
- d->extraData.cd->attachedPropertiesId = -1;
- }
d->extraData.cd->parserStatusCast = type.parserStatusCast;
d->extraData.cd->propertyValueSourceCast = type.valueSourceCast;
d->extraData.cd->propertyValueInterceptorCast = type.valueInterceptorCast;
@@ -571,16 +558,8 @@ QQmlType::QQmlType(QQmlTypePrivate *priv)
QQmlType::~QQmlType()
{
- if (d && !d->refCount.deref()) {
- // If attached properties were successfully registered, deregister them.
- // (They may not have been registered if some other type used the same baseMetaObject)
- if (d->regType == CppType && d->extraData.cd->attachedPropertiesType) {
- auto it = QQmlTypePrivate::attachedPropertyIds.find(d->baseMetaObject);
- if (it != QQmlTypePrivate::attachedPropertyIds.end() && *it == d->index)
- QQmlTypePrivate::attachedPropertyIds.erase(it);
- }
+ if (d && !d->refCount.deref())
delete d;
- }
}
QHashedString QQmlType::module() const
@@ -1221,7 +1200,7 @@ int QQmlType::attachedPropertiesId(QQmlEnginePrivate *engine) const
if (!d)
return -1;
if (d->regType == CppType)
- return d->extraData.cd->attachedPropertiesId;
+ return d->extraData.cd->attachedPropertiesType ? d->index : -1;
QQmlType base;
if (d->regType == CompositeType)
@@ -2184,6 +2163,16 @@ QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(QQmlEnginePr
return data->types.at(id).attachedPropertiesFunction(engine);
}
+QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFunc(QQmlEnginePrivate *engine,
+ const QMetaObject *mo)
+{
+ QMutexLocker lock(metaTypeDataLock());
+ QQmlMetaTypeData *data = metaTypeData();
+
+ QQmlType type(data->metaObjectToType.value(mo));
+ return type.attachedPropertiesFunction(engine);
+}
+
QMetaProperty QQmlMetaType::defaultProperty(const QMetaObject *metaObject)
{
int idx = metaObject->indexOfClassInfo("DefaultProperty");
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index 3ad2de7bb3..abc79e50e2 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -119,6 +119,8 @@ public:
static int listType(int);
static int attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMetaObject *);
static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(QQmlEnginePrivate *, int);
+ static QQmlAttachedPropertiesFunc attachedPropertiesFunc(QQmlEnginePrivate *,
+ const QMetaObject *);
enum TypeCategory { Unknown, Object, List };
static TypeCategory typeCategory(int);
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index c36b3ed386..26d3b5b6c1 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -824,8 +824,8 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *bindingProper
else
return false;
}
- const int id = attachedType.attachedPropertiesId(QQmlEnginePrivate::get(engine));
- QObject *qmlObject = qmlAttachedPropertiesObjectById(id, _qobject);
+ QObject *qmlObject = qmlAttachedPropertiesObject(
+ _qobject, attachedType.attachedPropertiesFunction(QQmlEnginePrivate::get(engine)));
if (!populateInstance(binding->value.objectIndex, qmlObject, qmlObject, /*value type property*/nullptr))
return false;
return true;
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h
index c0232a7691..fa05b3fe19 100644
--- a/src/qml/qml/qqmlprivate.h
+++ b/src/qml/qml/qqmlprivate.h
@@ -77,6 +77,11 @@ typedef void (*IRLoaderFunction)(Document *, const QQmlPrivate::CachedQmlUnit *)
typedef QObject *(*QQmlAttachedPropertiesFunc)(QObject *);
+inline uint qHash(QQmlAttachedPropertiesFunc func, uint seed = 0)
+{
+ return qHash(quintptr(func), seed);
+}
+
template <typename TYPE>
class QQmlTypeInfo
{
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 000b88ebaa..c8166695ba 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -277,7 +277,7 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name)
QQmlAttachedPropertiesFunc func = r.type.attachedPropertiesFunction(enginePrivate);
if (!func) return; // Not an attachable type
- currentObject = qmlAttachedPropertiesObjectById(r.type.attachedPropertiesId(enginePrivate), currentObject);
+ currentObject = qmlAttachedPropertiesObject(currentObject, func);
if (!currentObject) return; // Something is broken with the attachable type
} else if (r.importNamespace) {
if ((ii + 1) == path.count()) return; // No type following the namespace
@@ -289,7 +289,7 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name)
QQmlAttachedPropertiesFunc func = r.type.attachedPropertiesFunction(enginePrivate);
if (!func) return; // Not an attachable type
- currentObject = qmlAttachedPropertiesObjectById(r.type.attachedPropertiesId(enginePrivate), currentObject);
+ currentObject = qmlAttachedPropertiesObject(currentObject, func);
if (!currentObject) return; // Something is broken with the attachable type
} else if (r.scriptIndex != -1) {
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index d30c225741..246de04316 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -263,7 +263,9 @@ ReturnedValue QQmlTypeWrapper::virtualGet(const Managed *m, PropertyKey id, cons
// Fall through to base implementation
} else if (w->d()->object) {
- QObject *ao = qmlAttachedPropertiesObjectById(type.attachedPropertiesId(QQmlEnginePrivate::get(v4->qmlEngine())), object);
+ QObject *ao = qmlAttachedPropertiesObject(
+ object,
+ type.attachedPropertiesFunction(QQmlEnginePrivate::get(v4->qmlEngine())));
if (ao)
return QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty);
@@ -335,7 +337,8 @@ bool QQmlTypeWrapper::virtualPut(Managed *m, PropertyKey id, const Value &value,
if (type.isValid() && !type.isSingleton() && w->d()->object) {
QObject *object = w->d()->object;
QQmlEngine *e = scope.engine->qmlEngine();
- QObject *ao = qmlAttachedPropertiesObjectById(type.attachedPropertiesId(QQmlEnginePrivate::get(e)), object);
+ QObject *ao = qmlAttachedPropertiesObject(
+ object, type.attachedPropertiesFunction(QQmlEnginePrivate::get(e)));
if (ao)
return QV4::QObjectWrapper::setQmlProperty(scope.engine, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
return false;
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 9d0f4a6893..f3a2b07620 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2551,7 +2551,7 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent *event,
if (point->grabberPointerHandler())
cancelTouchMouseSynthesis();
} else {
- qCWarning(DBG_TOUCH_TARGET) << "during delivery of touch press, synth-mouse ID" << touchMouseId << "is missing from" << event;
+ qCWarning(DBG_TOUCH_TARGET) << "during delivery of touch press, synth-mouse ID" << hex << touchMouseId << "is missing from" << event;
}
}
for (int i = 0; i < pointCount; ++i) {
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp
index 02be9daac0..2043b50545 100644
--- a/src/quick/util/qquickanimation.cpp
+++ b/src/quick/util/qquickanimation.cpp
@@ -812,7 +812,7 @@ QQuickColorAnimation::~QQuickColorAnimation()
// States are defined here...
]
- transition: Transition {
+ transitions: Transition {
ColorAnimation { from: "#c0c0c0"; duration: 2000 }
}
}
diff --git a/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml b/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
new file mode 100644
index 0000000000..7e2f15fc23
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/undefinedPropertiesInObjectWrapper.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.12
+
+QtObject {
+ property list<QtObject> entries: [
+ QtObject {
+ readonly property color color: "green"
+ },
+ QtObject {
+ }
+ ]
+
+ property Row row: Row {
+ Repeater {
+ model: entries
+ Rectangle {
+ color: model.color ? model.color : "red"
+ }
+ }
+ }
+}
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 90ff6f24fa..c714cf5d60 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -367,6 +367,7 @@ private slots:
void deleteSparseInIteration();
void saveAccumulatorBeforeToInt32();
void intMinDividedByMinusOne();
+ void undefinedPropertiesInObjectWrapper();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8965,6 +8966,15 @@ void tst_qqmlecmascript::intMinDividedByMinusOne()
QCOMPARE(object->property("doesNotFitInInt").toUInt(), 2147483648u);
}
+void tst_qqmlecmascript::undefinedPropertiesInObjectWrapper()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFile("undefinedPropertiesInObjectWrapper.qml"));
+ QVERIFY(component.isReady());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"
diff --git a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp
index 7f103dc5ed..a7805922a5 100644
--- a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp
+++ b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp
@@ -550,8 +550,8 @@ void tst_qqmlmetatype::unregisterAttachedProperties()
c.setData("import QtQuick 2.2\n Item { }", dummy);
const QQmlType attachedType = QQmlMetaType::qmlType("QtQuick/KeyNavigation", 2, 2);
- QCOMPARE(attachedType.attachedPropertiesId(QQmlEnginePrivate::get(&e)),
- attachedType.index());
+ QCOMPARE(attachedType.attachedPropertiesType(QQmlEnginePrivate::get(&e)),
+ attachedType.metaObject());
QVERIFY(c.create());
}
@@ -569,8 +569,8 @@ void tst_qqmlmetatype::unregisterAttachedProperties()
"Item { KeyNavigation.up: null }", dummy);
const QQmlType attachedType = QQmlMetaType::qmlType("QtQuick/KeyNavigation", 2, 2);
- QCOMPARE(attachedType.attachedPropertiesId(QQmlEnginePrivate::get(&e)),
- attachedType.index());
+ QCOMPARE(attachedType.attachedPropertiesType(QQmlEnginePrivate::get(&e)),
+ attachedType.metaObject());
QVERIFY(c.create());
}
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
index 62aa19a9ae..20f989fc50 100644
--- a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
+++ b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST
@@ -2,3 +2,5 @@
windows gcc
[touchDragFlickableBehindSlider]
windows gcc
+[touchDragFlickableBehindButton]
+windows gcc
diff --git a/tests/auto/quick/qquickapplication/BLACKLIST b/tests/auto/quick/qquickapplication/BLACKLIST
new file mode 100644
index 0000000000..1b7464e7c4
--- /dev/null
+++ b/tests/auto/quick/qquickapplication/BLACKLIST
@@ -0,0 +1,3 @@
+[active]
+opensuse-42.3
+opensuse-leap
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 166c6aabdf..8cfc0eaaac 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -78,6 +78,7 @@ static QQmlApplicationEngine *qae = nullptr;
static int exitTimerId = -1;
#endif
bool verboseMode = false;
+static const QString iconResourcePath(QStringLiteral(":/qt-project.org/QmlRuntime/resources/qml-64.png"));
static void loadConf(const QString &override, bool quiet) // Terminates app on failure
{
@@ -135,7 +136,10 @@ void noFilesGiven();
class LoaderApplication : public QGuiApplication
{
public:
- LoaderApplication(int& argc, char **argv) : QGuiApplication(argc, argv) {}
+ LoaderApplication(int& argc, char **argv) : QGuiApplication(argc, argv)
+ {
+ setWindowIcon(QIcon(iconResourcePath));
+ }
bool event(QEvent *ev) override
{
@@ -448,6 +452,7 @@ int main(int argc, char *argv[])
#ifdef QT_WIDGETS_LIB
case QmlApplicationTypeWidget:
app = new QApplication(argc, argv);
+ static_cast<QApplication *>(app)->setWindowIcon(QIcon(iconResourcePath));
break;
#endif // QT_WIDGETS_LIB
#endif // QT_GUI_LIB
diff --git a/tools/qml/qml.icns b/tools/qml/qml.icns
deleted file mode 100644
index c76051626a..0000000000
--- a/tools/qml/qml.icns
+++ /dev/null
Binary files differ
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index 3f41707275..f086b7bff9 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -8,10 +8,14 @@ RESOURCES += qml.qrc
QMAKE_TARGET_DESCRIPTION = QML Runtime
+ICON = resources/qml64.png
+win32 {
+ RC_ICONS = resources/qml.ico
+}
mac {
- OTHER_FILES += Info.plist
- QMAKE_INFO_PLIST = Info.plist
- ICON = qml.icns
+ OTHER_FILES += resources/Info.plist
+ QMAKE_INFO_PLIST = resources/Info.plist
+ ICON = resources/qml.icns
}
qtConfig(qml-debug): DEFINES += QT_QML_DEBUG_NO_WARNING
diff --git a/tools/qml/qml.qrc b/tools/qml/qml.qrc
index 1f0ffdace2..e4be1793d4 100644
--- a/tools/qml/qml.qrc
+++ b/tools/qml/qml.qrc
@@ -2,5 +2,6 @@
<qresource prefix="qt-project.org/QmlRuntime">
<file>conf/configuration.qml</file>
<file>conf/qtquick.qml</file>
+ <file>resources/qml-64.png</file>
</qresource>
</RCC>
diff --git a/tools/qml/Info.plist b/tools/qml/resources/Info.plist
index 567c5bf8fd..567c5bf8fd 100644
--- a/tools/qml/Info.plist
+++ b/tools/qml/resources/Info.plist
diff --git a/tools/qml/resources/qml-64.png b/tools/qml/resources/qml-64.png
new file mode 100644
index 0000000000..83dbeab9af
--- /dev/null
+++ b/tools/qml/resources/qml-64.png
Binary files differ
diff --git a/tools/qml/resources/qml.icns b/tools/qml/resources/qml.icns
new file mode 100644
index 0000000000..b092ffd943
--- /dev/null
+++ b/tools/qml/resources/qml.icns
Binary files differ
diff --git a/tools/qml/resources/qml.ico b/tools/qml/resources/qml.ico
new file mode 100644
index 0000000000..09ec5ccece
--- /dev/null
+++ b/tools/qml/resources/qml.ico
Binary files differ
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 867267c821..d64272d417 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -499,6 +499,9 @@ int main(int argc, char ** argv)
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
+ if (qEnvironmentVariableIsSet("QMLSCENE_CORE_PROFILE"))
+ options.coreProfile = true;
+
const QStringList arguments = QCoreApplication::arguments();
for (int i = 1, size = arguments.size(); i < size; ++i) {
if (!arguments.at(i).startsWith(QLatin1Char('-'))) {
@@ -525,8 +528,7 @@ int main(int argc, char ** argv)
options.resizeViewToRootItem = true;
else if (lowerArgument == QLatin1String("--multisample"))
options.multisample = true;
- else if (lowerArgument == QLatin1String("--core-profile")
- || qEnvironmentVariableIsSet("QMLSCENE_CORE_PROFILE"))
+ else if (lowerArgument == QLatin1String("--core-profile"))
options.coreProfile = true;
else if (lowerArgument == QLatin1String("--verbose"))
options.verbose = true;