Convert javascript built-in Number Object to double in Qt; Convert javascript built-in Boolean Object to bool in Qt.
Created attachment 26056 [details] This patch implements the feature
Comment on attachment 26056 [details] This patch implements the feature > + // if hint is const QVariant& and type is Object, > + // because the visitedObjects check at the beginging of this function, > + // make sure it's handled as QVariantMap upon the first time entering this function > + if (hint == (QMetaType::Type) qMetaTypeId<QVariant>() && type == Object) > + hint = QMetaType::QVariantMap; I think we should remove the object from the visitedObjects when recursing with the auto-detect flag instead. > case QMetaType::QVariantMap: > + // Javascript built-in Number and Boolean object don't have properties, > + // convert them to double and bool respectively Some auto-tests for this would be nice.
Created attachment 26120 [details] Removes changes under QVariantMap hint; redirect to Qt bool and double hint respectively in the autoswitch; remove object from visited array before recursive call
Thanks! Landed in r39399