1. 23 Mar, 2012 1 commit
  2. 21 Mar, 2012 2 commits
    • Chris Adams's avatar
      Allow literal enum to int property assignments · 4c9d3262
      Chris Adams authored
      Previously, enum to int property assignments were considered bindings.
      This commit adds support for assigning enum values to int properties
      as enums.
      
      Note that to use an enum in QML, it must have been declared with
      Q_ENUMS or otherwise registered as a metatype.  Enum values from the
      global Qt object are also usable.
      
      Task-number: QTBUG-23403
      Change-Id: I50db6cae54a24400ea472bde43619d547e4ceb78
      Reviewed-by: default avatarMichael Brasser <michael.brasser@nokia.com>
      4c9d3262
    • Andrew den Exter's avatar
      Fix consistency of parsing ISO 8601 date strings. · b2722ab3
      Andrew den Exter authored
      Use the UTC timespec for strings with no time zone qualifier as V8 does
      so we don't get different QDateTime in bindings depending on whether
      the string was bound directly, or parsed by constructing a new JS
      Date object.
      
      Task-number: QTBUG-24895
      Change-Id: I8f74dae418aaeeaf06df33fe58ab4e3e3fea791b
      Reviewed-by: default avatarChris Adams <christopher.adams@nokia.com>
      b2722ab3
  3. 20 Mar, 2012 1 commit
    • Matthew Vogt's avatar
      Allow parent to be specified for Qt.createComponent · 610df5cd
      Matthew Vogt authored
      Add an optional parameter to the Qt.createComponent function which
      allows the caller to specify the object that will become the parent
      for the created component.
      
      If the parent is not specified by the caller, it becomes the QML
      engine; this behavior will change in the near future to allow
      these component objects to be collected when no longer referenced.
      
      Task-number: QTBUG-24840
      Change-Id: I2742133fe8ab8cbc80d8012a9d9b9fc2e4596fca
      Reviewed-by: default avatarMartin Jones <martin.jones@nokia.com>
      610df5cd
  4. 19 Mar, 2012 1 commit
  5. 15 Mar, 2012 3 commits
  6. 14 Mar, 2012 4 commits
  7. 09 Mar, 2012 1 commit
    • João Abecasis's avatar
      Don't grow container when desired size is known · 3c94c7eb
      João Abecasis authored
      QList<Type>::reserve() is used upfront to allocate necessary memory in a one
      go. This tells us straight away whether allocation is possible at all and
      reduces re-allocations and consequent memory copies.
      
      This also has the side effect that no spare memory is allocated, also allowing
      up to (and including) INT_MAX elements to actually be stored in the underlying
      QList, as long as enough memory is available to satisfy the allocation request
      and subsequent fill.
      
      The qqmlecmascript::sequenceConversionIndexes was changed to not attempt
      INT_MAX allocations as, given enough memory and virtual address space, that
      might succeed but take a really long time.
      
      Change-Id: I4b0c965e9c23be78874343a70d7c155933c80903
      Reviewed-by: default avatarChris Adams <christopher.adams@nokia.com>
      Reviewed-by: default avatarKent Hansen <kent.hansen@nokia.com>
      3c94c7eb
  8. 07 Mar, 2012 1 commit
    • Kent Hansen's avatar
      Make sure QML type "real" always maps to C++ type "double" · aed15e77
      Kent Hansen authored
      The type "real" was documented to be a single-precision float, but
      that's incorrect. It's always been double.
      
      However, signal parameters of type "real" would be mapped to the C++
      type "qreal", which can be either float or double depending on the
      platform.
      
      Since JavaScript floating point numbers have double precision, QML
      should use the same, to avoid potential loss of precision.
      
      With this change, "real" behaves the same as the QML "double" type
      (which already guaranteed double precision). Even though it's
      redundant, "double" is kept to preserve compatibility.
      
      Added tests for the "double" type to the QML meta-object autotest,
      and a test for the "real" type that ensures there's no loss of
      precision.
      
      Change-Id: I1a77f1fd45082ff670684a935e17d1a46ea75d84
      Reviewed-by: default avatarAaron Kennedy <aaron.kennedy@nokia.com>
      aed15e77
  9. 24 Feb, 2012 1 commit
  10. 23 Feb, 2012 1 commit
  11. 22 Feb, 2012 1 commit
  12. 15 Feb, 2012 1 commit
    • Chris Adams's avatar
      Fix warnings in sequence wrapper code · 3c3b9956
      Chris Adams authored
      Previously, the sequence wrapper had unsigned int / signed int
      comparisons (due to Qt container classes only allowing signed int
      indexes (where negative indexes are invalid).
      
      This commit ensures that unsigned indexes are bounds checked
      appropriately, and also fixes a warning due to QString construction
      from QByteArray.  Finally, it updates the documentation for sequences
      to clarify the indexing semantics.
      
      Change-Id: I4c6e133bef6e980a9ccb62ff15a70a5d41537ee3
      Reviewed-by: default avatarMartin Jones <martin.jones@nokia.com>
      Reviewed-by: default avatarMichael Brasser <michael.brasser@nokia.com>
      3c3b9956
  13. 09 Feb, 2012 4 commits
    • Chris Adams's avatar
      Check dynamic slot function for nullness before evaluation · a4b4932e
      Chris Adams authored
      Previously, we didn't check whether the function object handle
      associated with a dynamic slot's method index was null before
      attempting to evaluate it, which could cause a crash in some
      circumstances.  This change also adds better error reporting
      during function compilation.
      
      Task-number: QTBUG-24064
      Task-number: QTBUG-24037
      Task-number: QTBUG-23387
      Change-Id: I3c5e35e8c16187870125736013a5935fcc5cb1f2
      Reviewed-by: default avatarAaron Kennedy <aaron.kennedy@nokia.com>
      a4b4932e
    • Chris Adams's avatar
      Handle exceptions while compiling v8 bindings · fdf80ee4
      Chris Adams authored
      Previously, no exception handling existed, which could cause a crash
      if an invalid v8 binding expression was generated.  Such invalid
      bindings should usually be rewritten into valid form by the bindings
      rewriter, but in some cases it is too costly to do so, so we need
      to handle exceptions.
      
      Task-number: QTBUG-24064
      Task-number: QTBUG-23387
      Change-Id: I7da12a936780a561c9e9cad3a4a7b62c06d6973e
      Reviewed-by: default avatarAlan Alpert <alan.alpert@nokia.com>
      fdf80ee4
    • Jason McDonald's avatar
      Fix error in qdeclarativeecmascript autotest. · e51bb395
      Jason McDonald authored
      The test did not correctly ignore warning messages, but instead ignored
      too many messages for one data row and too few for another data row.
      This error was exposed when testlib was changed in qtbase commit
      d9e35e2884cc75969f0eb860082ea11f8bb95a64 to be more strict with checking
      that all ignored messages are correctly produced.
      
      Task-number: QTBUG-24156
      Change-Id: Iae73fb26bda83317256c504a8cb3d45783444f66
      Reviewed-by: default avatarRohan McGovern <rohan.mcgovern@nokia.com>
      e51bb395
    • Alan Alpert's avatar
      Rewrite multiline strings properly · 5060b58f
      Alan Alpert authored
      Because the bindings rewriter works on code strings, it would leave
      multiline strings across multiple lines (which is illegal in ECMAScript.
      
      It now manually breaks them up when it sees them, by replacing a \n
      character with a literal \n.
      
      Since RewriteSignalHandler now likes to have the AST passed in too, the
      related method in QDeclarativeCompiler (and its customers) have been
      altered to use the QDeclarativeScript::Value instead of just a string.
      
      Task-number: QTBUG-23387
      Change-Id: Id060de37e70590c9da2a902038ed02d948fdd70f
      Reviewed-by: default avatarAlan Alpert <alan.alpert@nokia.com>
      5060b58f
  14. 08 Feb, 2012 1 commit
  15. 02 Feb, 2012 1 commit
  16. 30 Jan, 2012 1 commit
  17. 27 Jan, 2012 1 commit
  18. 24 Jan, 2012 1 commit
    • Rohan McGovern's avatar
      Fixed compile. · f4eeae2a
      Rohan McGovern authored
      QEventLoop::DeferredDeletion was deprecated long ago, and finally has
      been removed.  Replace it with
      QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete)
      
      Change-Id: Ic03f26a57efeb35aefab67a913f56001303aa3e4
      Reviewed-by: default avatarMichael Brasser <michael.brasser@nokia.com>
      f4eeae2a
  19. 23 Jan, 2012 1 commit
  20. 18 Jan, 2012 1 commit
  21. 05 Jan, 2012 1 commit
  22. 29 Dec, 2011 1 commit
  23. 23 Dec, 2011 1 commit
    • Chris Adams's avatar
      Fix crash in var property setter · 1f4fe0ac
      Chris Adams authored
      Previously, the function didn't terminate after calling the setter
      recursively, as it should have.  This patch ensures that the setter
      is called correctly and then returns, and adds a unit test to ensure
      that no regression occurs.
      
      Task-number: QTBUG-23330
      Change-Id: If512fca174e5224c2c53caad11f77782e6cead9f
      Reviewed-by: default avatarAlan Alpert <alan.alpert@nokia.com>
      1f4fe0ac
  24. 21 Dec, 2011 1 commit
  25. 19 Dec, 2011 2 commits
  26. 15 Dec, 2011 3 commits
  27. 14 Dec, 2011 1 commit
  28. 09 Dec, 2011 1 commit
    • Kent Hansen's avatar
      Get rid of QDeclarativeMetaType::{canCopy,copy} · f6416183
      Kent Hansen authored
      Now that we have QMetaType::construct() that does placement new
      construction, we can use that to copy the value.
      
      We need to destruct the (default-constructed) existing value first,
      but for primitive types that's a no-op, and for Qt's types it's
      cheap since they use lazy initialization or "shared null".
      
      Change-Id: Idadee04b1d5b590be7fec50fb0396fd277bee973
      Reviewed-by: default avatarAaron Kennedy <aaron.kennedy@nokia.com>
      f6416183