Commit Graph

3671 Commits

Author SHA1 Message Date
Chris Adams c71db2cf82 Fix leak in tst_qquicklistmodel unit test
Change-Id: I6883f263648d425240503f6abbd358b744d68506
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-03-13 02:02:49 +01:00
Michael Brasser b021505843 Fix v4 nested object access bug.
Use the correct type to look up the sub property.

Task-number: QTBUG-24606
Change-Id: Iab372ca7440249241bf855d2875a947ad8fe4527
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-12 23:28:40 +01:00
Michael Brasser 31aa6012bf Add additional v4 tests.
Change-Id: Id33eb50e4a01f3450515f6e666e18cb018f1706e
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-12 23:28:31 +01:00
Lars Knoll 16e29f30e3 Remove unneeded dependencies to QtWidgets and QtOpenGL
Change-Id: I43bb54524f5786a838073df8812107dda7b0d56e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-12 17:04:36 +01:00
Kent Hansen cbb7f8b10e Skip test that accesses deleted QML engine
The test is blocking the CI because it crashes on linux/x64.
By "luck" it doesn't crash on the other test machines -- valgrind
still complains, though.

Task-number: QTBUG-24734
Change-Id: I6bc12ca72f8900339bc9139b40cf828aff8e47ba
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 17:04:13 +01:00
Kent Hansen 255357541d Fix flakiness in qquicklistmodel autotest
The worker_remove_element test calls processEvents() before
calling waitForWorker(). It's possible that the worker actually
finishes during the processEvents() call. In such a situation,
waitForWorker() should return right away; otherwise it would
wait for 10000ms for a signal that had already emitted, and the
test would fail.

Change-Id: I8e98a3297cf5f360c1c405b1baa7524cc6593d81
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 17:04:04 +01:00
Matthew Vogt 1f52c54301 Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into api_changes
Change-Id: I578b1e2f1bb374da6194e6ba04a0fd459b2632fe
2012-03-12 08:35:40 +10:00
João Abecasis 3c94c7eb7e Don't grow container when desired size is known
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: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-09 21:26:40 +01:00
Michael Brasser 9ba6a3b21c Add autotest for v4 nested object bug.
Task-number: QTBUG-24606
Change-Id: I0909d60316f7213b21fc315e8a3d0a6124e84409
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
2012-03-09 11:03:23 +01:00
Glenn Watson 88a6f771f2 Fix crash in listmodel when data is assigned incorrectly.
If a listmodel with static role types is created, it would crash
if a role was assigned a value type such as string, and then
subsequently assigned an array (sub list) value from a dynamic
meta object (created when using get() from JS).

Change-Id: Ibfd0b0b40be13b04103b49462cfae42a5c9f9fb9
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-09 09:56:25 +01:00
Aurindam Jana 5c7b17379d QmlDebugging: Remove QQmlDebugClient
Remove QQmlDebugClient and relevant classes from the
library and move to client code.

Change-Id: I6f526b3f0c92970dcad5e5abd8585bb9b406349e
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-09 09:48:24 +01:00
Lars Knoll 616bbd1988 Merge remote-tracking branch 'origin/master' into api_changes
Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
2012-03-07 22:01:11 +01:00
Kai Koehne 3f9b58c089 QML Debugger: Change prefix of warnings
Since we've been changing from QtDeclarativeDebugServer to
QQmlDebugServer anyway, we might as well change it to the more
readable "QML Debugger:" prefix.

Change-Id: I852577233d7cdb1f57adc43ec1b85a14d212574d
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-03-07 16:21:11 +01:00
Aurindam Jana 21e2a227b9 QmlDebugging: Revert the names of services
Revert the names of the services changed in
b855240b78 to
maintain BC.

Change-Id: I79826d92fd09c41e0020541b0c7bb77b5b2ecb1f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-07 13:14:52 +01:00
Kent Hansen aed15e7762 Make sure QML type "real" always maps to C++ type "double"
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: Aaron Kennedy <aaron.kennedy@nokia.com>
2012-03-07 12:10:27 +01:00
Kurt Korbatits 65764c0334 Changed qml tests to work from install directory
- Changed tests to use TESTDATA
- moved qqmlcontext to private test as it contains private header
- added check for cross_compile option to skip when sources not available

Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-07 06:24:18 +01:00
Matthew Vogt 3bc907d155 Remove uses of QtGui symbols in QQmlEngine.
Move the code dealing with QImage and QPixmap out of QQmlEngine
and into the QtQuick library.  QQmlEngine remains the owner
of image provider resources, but does not use them directly.

Change-Id: I52083581394d9c308db446372883eb7479ccf807
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-07 02:33:24 +01:00
Chris Adams 92b1f9981d Allow function assignment to cause binding for non-var props
This patch maintains the old function-assignment behaviour for non-var
properties, and will be reverted soon.

Change-Id: I523e464501106616c51ff7478f7eb7171c1ca350
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
2012-03-05 10:06:48 +01:00
Chris Adams b6e78b3836 Improve support for var properties
This commit changes the semantics of function assignment in QML.
Previously, function assignment was interpreted as binding assignment.
Now, function assignment is interpreted as function assignment, and
therefore fails for all property types other than "var" properties.

To support imperative binding assignment, a new function was added to
the Qt object: Qt.binding(function) which takes a single function
parameter and returns a function object which will be interpreted as
an assignable binding expression by the QML engine.

Finally, this commit also slightly changes the semantics of var
properties in that the "special" JavaScript values of null and
undefined may be assigned to var properties, rather than being
interpreted as reset requests.

Task-number: QTBUG-21842
Change-Id: Iee99a878b9badf0fb76e983da7ebfa493f55ceb5
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
2012-03-05 09:01:47 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00