Previously, the engine pointer stored in a QQmlProperty could be
stale due to engine deletion. This commit ensures we guard that
pointer.
Also reverts
cbb7f8b10e99fad675839d7625d3236ed67b3e01
Task-number: QTBUG-24734
Change-Id: I5349c51fbd19fa46a8710280173c1d224358b96e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
//
#include "qqmlproperty.h"
+#include "qqmlengine.h"
#include <private/qobject_p.h>
#include <private/qtqmlglobal_p.h>
Q_DECLARE_FLAGS(WriteFlags, WriteFlag)
QQmlContextData *context;
- QQmlEngine *engine;
+ QQmlGuard<QQmlEngine> engine;
QQmlGuard<QObject> object;
QQmlPropertyData core;
delete engine;
engine = 0;
- QSKIP("QTBUG-24734: test accesses deleted QML engine from QQmlProperty::propertyTypeName()");
-
QCOMPARE(p.propertyTypeName(), "int");
QCOMPARE(p.read(), QVariant(10));
p.write(QVariant(20));