aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 4712fbd614..08005f1df2 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -51,6 +51,8 @@
#include <private/qmetaobjectbuilder_p.h>
#include <private/qqmlrewrite_p.h>
+#include <private/qv4value_p.h>
+
#include <QtCore/qdebug.h>
#include <ctype.h> // for toupper
@@ -117,8 +119,8 @@ static QQmlPropertyData::Flags flagsForPropertyType(int propType, QQmlEngine *en
flags |= QQmlPropertyData::IsQmlBinding;
} else if (propType == qMetaTypeId<QJSValue>()) {
flags |= QQmlPropertyData::IsQJSValue;
- } else if (propType == qMetaTypeId<QQmlV8Handle>()) {
- flags |= QQmlPropertyData::IsV8Handle;
+ } else if (propType == qMetaTypeId<QQmlV4Handle>()) {
+ flags |= QQmlPropertyData::IsV4Handle;
} else {
QQmlMetaType::TypeCategory cat =
engine ? QQmlEnginePrivate::get(engine)->typeCategory(propType)
@@ -194,8 +196,8 @@ void QQmlPropertyData::load(const QMetaMethod &m)
if (m.parameterCount()) {
flags |= HasArguments;
- if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV8Function*")) {
- flags |= IsV8Function;
+ if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) {
+ flags |= IsV4Function;
}
}
@@ -225,8 +227,8 @@ void QQmlPropertyData::lazyLoad(const QMetaMethod &m)
if (m.parameterCount()) {
flags |= HasArguments;
- if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV8Function*")) {
- flags |= IsV8Function;
+ if ((m.parameterCount() == 1) && (m.parameterTypes().first() == "QQmlV4Function*")) {
+ flags |= IsV4Function;
}
}
@@ -288,8 +290,8 @@ QQmlPropertyCache::~QQmlPropertyCache()
void QQmlPropertyCache::destroy()
{
- Q_ASSERT(engine || constructor.IsEmpty());
- if (constructor.IsEmpty())
+ Q_ASSERT(engine || constructor.isEmpty());
+ if (constructor.isEmpty())
delete this;
else
QQmlEnginePrivate::deleteInEngineThread(engine, this);
@@ -299,7 +301,6 @@ void QQmlPropertyCache::destroy()
// that are tied to the specific QQmlEngine.
void QQmlPropertyCache::clear()
{
- qPersistentDispose(constructor);
engine = 0;
}
@@ -597,7 +598,7 @@ void QQmlPropertyCache::append(QQmlEngine *engine, const QMetaObject *metaObject
QQmlPropertyData::Flag signalFlags)
{
Q_UNUSED(revision);
- Q_ASSERT(constructor.IsEmpty()); // We should not be appending to an in-use property cache
+ Q_ASSERT(constructor.isEmpty()); // We should not be appending to an in-use property cache
_metaObject = metaObject;
@@ -1375,9 +1376,9 @@ inline const QString &qQmlPropertyCacheToString(const QString &string)
return string;
}
-inline QString qQmlPropertyCacheToString(const QHashedV8String &string)
+inline QString qQmlPropertyCacheToString(const QHashedV4String &string)
{
- return QV8Engine::toStringStatic(string.string());
+ return string.toString();
}
template<typename T>
@@ -1416,10 +1417,10 @@ qQmlPropertyCacheProperty(QQmlEngine *engine, QObject *obj, const T &name,
}
QQmlPropertyData *
-QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj, const QHashedV8String &name,
+QQmlPropertyCache::property(QQmlEngine *engine, QObject *obj, const QHashedV4String &name,
QQmlContextData *context, QQmlPropertyData &local)
{
- return qQmlPropertyCacheProperty<QHashedV8String>(engine, obj, name, context, local);
+ return qQmlPropertyCacheProperty<QHashedV4String>(engine, obj, name, context, local);
}
QQmlPropertyData *