1. 20 Mar, 2012 1 commit
    • Kent Hansen's avatar
      Make QVariant conversion for JS null type symmetric · d96d89c6
      Kent Hansen authored
      If you pass (void*)0 to QJSEngine::toScriptValue(), or you pass a
      QVariant of type QMetaType::VoidStar containing a 0 value, you get
      back a QJSValue of type null (isNull() returns true); that's fine.
      
      However, if you called QJSValue::toVariant() on a JS null value, you
      would get back an invalid QVariant. The expected result is a
      QVariant of type QMetaType::VoidStar containing a 0 value. This
      makes the conversion of the JS null type symmetric and avoids loss
      of data.
      
      Change-Id: Ifa6e788152118f80adf9c2d7be1283f053b44294
      Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
      Reviewed-by: default avatarSimon Hausmann <simon.hausmann@nokia.com>
      d96d89c6
  2. 15 Mar, 2012 1 commit
  3. 24 Feb, 2012 1 commit
  4. 02 Feb, 2012 3 commits
    • Kent Hansen's avatar
      Remove QJSValue constructors that take QJSEngine argument · f4c98230
      Kent Hansen authored
      Rationale: These were remnants from QtScript.
      The difference from the standard constructors is that the value is
      eagerly bound to the engine, so they can be a bit faster. But they
      are also more low-level and look ugly in use.
      
      Task-number: QTBUG-23604
      Change-Id: I5dae7452389383f60055d5ccc4f28d53c52f6092
      Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
      f4c98230
    • Kent Hansen's avatar
      Remove QJSValue::propertyFlags() function · 54c51c89
      Kent Hansen authored
      Rationale: The API is incomplete. There is no way to set/update the
      flags; adding a third (optional) argument to setProperty() is ugly.
      
      If necessary, a QJSPropertyDescriptor API should be added, to enable
      complete setting/querying of properties.
      
      The flags were moved to QJSValuePrivate, and the propertyFlags()
      implementation kept, because there is one place the read-only flag
      is checked internally (in qv8typewrapper).
      
      Task-number: QTBUG-23604
      Change-Id: I089dce28dbda428662aac7c8d1536987fe6d855c
      Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
      54c51c89
    • Kent Hansen's avatar
      Remove invalid QJSValue type · ed84a6ee
      Kent Hansen authored
      Rationale: It's confusing to have an invalid type (which doesn't
      exist in JavaScript), and it creates lots of extra cases that have
      to be handled e.g. in value conversion and comparison. The Undefined
      type should be sufficient.
      
      Also, the invalid value type was being (ab)used to 1) make
      setProperty() act as a property deleter, and 2) signify that a
      property queried by property() doesn't exist. The recently introduced
      functions has(Own)Property() and deleteProperty() now provide that
      functionality.
      
      Default-constructed QJSValues now have the Undefined type.
      
      Task-number: QTBUG-23604
      Change-Id: I1847492724d31e03ee1212c09ec87a2010920dc5
      Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
      ed84a6ee
  5. 01 Feb, 2012 6 commits
  6. 30 Jan, 2012 1 commit
  7. 23 Jan, 2012 1 commit
  8. 20 Jan, 2012 5 commits
  9. 13 Jan, 2012 1 commit
  10. 11 Jan, 2012 1 commit
  11. 05 Jan, 2012 1 commit
  12. 15 Dec, 2011 1 commit
  13. 06 Dec, 2011 1 commit
  14. 28 Nov, 2011 1 commit
  15. 11 Nov, 2011 1 commit
  16. 26 Oct, 2011 1 commit
  17. 21 Oct, 2011 1 commit
  18. 20 Oct, 2011 1 commit
  19. 06 Oct, 2011 1 commit
  20. 30 Sep, 2011 1 commit
  21. 16 Sep, 2011 1 commit
  22. 26 Aug, 2011 1 commit
  23. 02 Aug, 2011 2 commits
  24. 29 Jul, 2011 1 commit