Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26951

QJSValue has a different representation of NULL to QV8Engine

XMLWordPrintable

      QJSValue represents a NULL value as QVariant(QMetaType::VoidStar, 0), which is at odds with the definition resulting from QV8Engine::toBasicVariant(), which returns QVariant();

      The latter cannot be changed, because it would result in property lookups that return null pointers yielding true from IsValid(), which would be an API change.

      Currently, the only place this discrepancy causes a problem is in the v4 autotest, where it causes V4 and V8 to produce different results when initializing a QJSValue property to 'null'. Perhaps it is not actually helpful to preserve type information in converting a void* via QJSValue, since this does not conform to the QV8Engine behavior?

        For Gerrit Dashboard: QTBUG-26951
        # Subject Branch Project Status CR V

            nierob Nierob
            mvogt Matthew Vogt (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes