Summary: | Convert javascript Number Object or Boolean Object to Qt types in QtWebKit. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | jade han <jade.han> | ||||||
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | hausmann, vestbo | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
jade han
2008-12-16 10:51:11 PST
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
|