[webkit-reviews] review denied: [Bug 23250] NULL string should not be arbitrarily converted to empty string : [Attachment 26630] change qt-runtime so it does not convert a null string to an empty string.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 13 08:20:47 PST 2009


Tor Arne Vestbø <tavestbo at trolltech.com> has denied Yael
<yael.aharon at nokia.com>'s request for review:
Bug 23250: NULL string should not be arbitrarily converted to empty string
https://bugs.webkit.org/show_bug.cgi?id=23250

Attachment 26630: change qt-runtime so it does not convert a null string to an
empty string.
https://bugs.webkit.org/attachment.cgi?id=26630&action=review

------- Additional Comments from Tor Arne Vestbø <tavestbo at trolltech.com>
> -    QCOMPARE(evalJS("myObject.stringProperty"), QString());
> +    QCOMPARE(evalJS("myObject.stringProperty"), sUndefined);

As discussed on IRC this behavior should apply to QVariants instead.

> +    if (variant.isNull() ) {
> +	   if (type == QMetaType::QString)
> +	       return jsUndefined();

So that if !variant.isValid() then return jsUndefined();

A default-constructed QVarant is not valid, i.e has the type set to
QMetaType::Invalid


More information about the webkit-reviews mailing list