Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / src / declarative / qml / qdeclarativepropertycache.cpp
index 55096ea..4418ffa 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the QtDeclarative module of the Qt Toolkit.
 **
@@ -35,6 +34,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -146,6 +146,9 @@ void QDeclarativePropertyData::lazyLoad(const QMetaProperty &p, QDeclarativeEngi
     if (type == QMetaType::QObjectStar || type == QMetaType::QWidgetStar) {
         propType = type;
         flags |= QDeclarativePropertyData::IsQObjectDerived;
+    } else if (type == QMetaType::QVariant) {
+        propType = type;
+        flags |= QDeclarativePropertyData::IsQVariant;
     } else if (type == QVariant::UserType || type == -1) {
         propTypeName = p.typeName();
         flags |= QDeclarativePropertyData::NotFullyResolved;
@@ -157,8 +160,6 @@ void QDeclarativePropertyData::lazyLoad(const QMetaProperty &p, QDeclarativeEngi
 void QDeclarativePropertyData::load(const QMetaProperty &p, QDeclarativeEngine *engine)
 {
     propType = p.userType();
-    if (QVariant::Type(propType) == QVariant::LastType)
-        propType = QMetaType::QVariant;
     coreIndex = p.propertyIndex();
     notifyIndex = p.notifySignalIndex();
     flags = fastFlagsForProperty(p) | flagsForPropertyType(propType, engine);
@@ -254,7 +255,7 @@ QDeclarativePropertyCache::~QDeclarativePropertyCache()
     QDeclarativePropertyCacheMethodArguments *args = argumentsCache;
     while (args) {
         QDeclarativePropertyCacheMethodArguments *next = args->next;
-        qFree(args);
+        free(args);
         args = next;
     }
 
@@ -549,8 +550,6 @@ void QDeclarativePropertyCache::resolve(QDeclarativePropertyData *data) const
     Q_ASSERT(data->notFullyResolved());
 
     data->propType = QMetaType::type(data->propTypeName);
-    if (QVariant::Type(data->propType) == QVariant::LastType)
-        data->propType = QMetaType::QVariant;
 
     if (!data->isFunction())
         data->flags |= flagsForPropertyType(data->propType, engine);
@@ -725,7 +724,7 @@ int *QDeclarativePropertyCache::methodParameterTypes(QObject *object, int index,
         QMetaMethod m = metaObject->method(index);
         QList<QByteArray> argTypeNames = m.parameterTypes();
 
-        A *args = static_cast<A *>(qMalloc(sizeof(A) + (argTypeNames.count() + 1) * sizeof(int)));
+        A *args = static_cast<A *>(malloc(sizeof(A) + (argTypeNames.count() + 1) * sizeof(int)));
         args->arguments[0] = argTypeNames.count();
 
         for (int ii = 0; ii < argTypeNames.count(); ++ii) {
@@ -734,7 +733,7 @@ int *QDeclarativePropertyCache::methodParameterTypes(QObject *object, int index,
                 type = EnumType(object->metaObject(), argTypeNames.at(ii));
             if (type == QVariant::Invalid) {
                 if (unknownTypeError) *unknownTypeError = argTypeNames.at(ii);
-                qFree(args);
+                free(args);
                 return 0;
             }
             args->arguments[ii + 1] = type;