Changeset 846 for trunk/src/script/bridge/qscriptvariant.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/script/bridge/qscriptvariant.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 30 30 #include "Error.h" 31 31 #include "PrototypeFunction.h" 32 33 32 34 #include "JSString.h" 33 35 … … 120 122 if (value.isObject()) { 121 123 result = v.toString(); 122 if (result.isEmpty() && !v.canConvert(QVariant::String)) { 123 result = "QVariant("; 124 result += v.typeName(); 125 result += ")"; 126 } 124 if (result.isEmpty() && !v.canConvert(QVariant::String)) 125 result = QString::fromLatin1("QVariant(%0)").arg(QString::fromLatin1(v.typeName())); 127 126 } else { 128 127 result = value.toString(exec); … … 134 133 { 135 134 const QVariant &variant1 = value(); 136 return variant1 == scriptEngineFromExec(exec)->scriptValueFromJSCValue(o2).toVariant();135 return variant1 == ); 137 136 } 138 137 … … 143 142 setDelegate(new QVariantDelegate(QVariant())); 144 143 145 putDirectFunction(exec, new (exec) JSC:: PrototypeFunction(exec, prototypeFunctionStructure, 0, exec->propertyNames().toString, variantProtoFuncToString), JSC::DontEnum);146 putDirectFunction(exec, new (exec) JSC:: PrototypeFunction(exec, prototypeFunctionStructure, 0, exec->propertyNames().valueOf, variantProtoFuncValueOf), JSC::DontEnum);144 putDirectFunction(exec, new (exec) JSC::(exec, prototypeFunctionStructure, 0, exec->propertyNames().toString, variantProtoFuncToString), JSC::DontEnum); 145 putDirectFunction(exec, new (exec) JSC::(exec, prototypeFunctionStructure, 0, exec->propertyNames().valueOf, variantProtoFuncValueOf), JSC::DontEnum); 147 146 } 148 147
Note:
See TracChangeset
for help on using the changeset viewer.