WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22880
Convert javascript Number Object or Boolean Object to Qt types in QtWebKit.
https://bugs.webkit.org/show_bug.cgi?id=22880
Summary
Convert javascript Number Object or Boolean Object to Qt types in QtWebKit.
jade han
Reported
2008-12-16 10:51:11 PST
Convert javascript built-in Number Object to double in Qt; Convert javascript built-in Boolean Object to bool in Qt.
Attachments
This patch implements the feature
(7.89 KB, patch)
2008-12-16 11:10 PST
,
jade han
vestbo
: review-
Details
Formatted Diff
Diff
Removes changes under QVariantMap hint; redirect to Qt bool and double hint respectively in the autoswitch; remove object from visited array before recursive call
(5.73 KB, patch)
2008-12-18 08:05 PST
,
jade han
vestbo
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
jade han
Comment 1
2008-12-16 11:10:30 PST
Created
attachment 26056
[details]
This patch implements the feature
Tor Arne Vestbø
Comment 2
2008-12-18 05:35:11 PST
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.
jade han
Comment 3
2008-12-18 08:05:46 PST
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
Tor Arne Vestbø
Comment 4
2008-12-19 02:43:38 PST
Thanks! Landed in
r39399
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug