Lars Knoll [Tue, 14 Apr 2015 10:46:36 +0000 (12:46 +0200)]
Smaller cleanup
Change-Id: If6b041a18b4f13ead13f560b62dd5f4495088f2c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Tue, 14 Apr 2015 07:09:40 +0000 (09:09 +0200)]
Remove the manual vtable from QQmlAbstractBinding
it's rather hard to maintain, and not really worth it. I believe
we can more easily save the one pointer in other places with
easier to maintain code.
Change-Id: Iaba2d62b82ebe58947fa35b0812b4c70f318007a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 13:42:03 +0000 (15:42 +0200)]
Make removal of bindings explicit
This simplifies the code for further refactoring.
Change-Id: I6bcb5ce397f642242af80ce37dc8bba1fa9bf3f5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 12:14:57 +0000 (14:14 +0200)]
Remove some dead code
The DestroyMode was not used at all anymore.
Change-Id: I04b7fa2282d8257af55062a20c647ea3229a27b5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 11:46:38 +0000 (13:46 +0200)]
Reorder members to save some bytes
Change-Id: I075cd56695c8d7fe7e46be2a2c4a575ca53fadaf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 11:30:25 +0000 (13:30 +0200)]
Remove the QQmlContextData pointer from QQmlBinding
The pointer is never used in practice, so let's get rid of it and
save some memory.
Change-Id: I8dccafb4cd3e14397fcf1c30633d60ea7ea9ce0c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 09:49:18 +0000 (11:49 +0200)]
Remove the manual vtable from QQmlJavaScriptExpression
Now that the class got unified with QQmlAbstractExpression, it has a
vtable anyway, so we can just as well remove the old hack.
Change-Id: Ifa095297e3d75564c4305ce3655eaa57436ef4a8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 13 Apr 2015 08:29:45 +0000 (10:29 +0200)]
Get rid of QQmlAbstractExpression
The class is always used together with QQmlJavaScriptExpression,
so we can just as well fold the functionality together into one
class and simplify our code.
Change-Id: I23820e51efaaea16ae5db7e2153a827d7b22999e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Wed, 25 Mar 2015 20:31:16 +0000 (21:31 +0100)]
Move evalfunction and thrower onto the js stack
Change-Id: I3a0abe13d802aff8998d1c64f86b5a8f98c8335f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Wed, 25 Mar 2015 20:06:18 +0000 (21:06 +0100)]
Move constructor objects onto the js stack
Change-Id: I828c5f7407d90cd5df1a8fd89a0ca35074fbde43
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Wed, 25 Mar 2015 13:40:35 +0000 (14:40 +0100)]
Move more objects from the v4 engine to the js stack
Convert most of the prototype objects in the v4 engine.
Change-Id: I365f290493c20973bc991b6a383649836e42a16a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Wed, 25 Mar 2015 12:49:51 +0000 (13:49 +0100)]
Continue the work to move Values inside the v4 engine to the js stack
Started with objectPrototype, the next commits will move more
of them over into the new data structure.
Change-Id: I1a048e95149ce69e4e42094db2dd738ce49b50b8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Mar 2015 16:21:18 +0000 (17:21 +0100)]
Move exceptionValue and globalObject from the Engine onto the JS stack
We'll need to move all GC'ed objects currently stored in ExecutionEngine
onto the JS stack for easier management in a new garbage collection
scheme. This is the start of that change.
Change-Id: Ib3ad8e846875dade8a807ea79f063173d40e4aad
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Mon, 2 Mar 2015 20:40:43 +0000 (21:40 +0100)]
Store the datetime as a double in the date object
Change-Id: I6ae05a066d021e81eaed90866e09bf480f5d91d9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Sat, 14 Feb 2015 22:22:23 +0000 (23:22 +0100)]
Use Heap::Pointer in more places
Change-Id: I2a64aadcd47ed05ad7d08a70a5d765d898a671fd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Sat, 14 Feb 2015 21:46:41 +0000 (22:46 +0100)]
Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.h
This is a cleaner separation and further reduces include dependencies
in the definitions of our basic data structured.
Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 14:31:23 +0000 (15:31 +0100)]
Fix definition order of nested inline methods
Avoid compiler warning about using inline methods
that aren't defined yet.
Change-Id: Ic19c91e8d8af0cb8d2280ae7e89f4c0363f0e466
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 14:23:13 +0000 (15:23 +0100)]
More cleanups in qv4value_p.h
Change-Id: Ie48dc8f95daa4738e690902b5d33010afa7b974f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Erik Verbruggen [Thu, 23 Apr 2015 10:04:58 +0000 (12:04 +0200)]
Fix/suppress compiler warning about unused private field.
In file included from /Users/erik/dev/qt5-dev/qtdeclarative/src/quick/util/qquickimageprovider.cpp:34:
/Users/erik/dev/builds/qt5-dev-debug/qtbase/include/QtQuick/../../../../../qt5-dev/qtdeclarative/src/quick/util/qquickimageprovider.h:107:38: warning: private field 'd' is not used [-Wunused-private-field]
QQuickAsyncImageProviderPrivate *d;
^
Change-Id: Ia5b279233f4b5bea85d733b6cdd894b82b6abd68
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Wed, 22 Apr 2015 08:19:05 +0000 (10:19 +0200)]
Skip the remote image source test and fix blacklisting of the other tests
There's a deadlock in qdbus that we're hitting with remote tests. We should
skip it and the other tests, but only on Linux.
Task-number: QTBUG-45655
Change-Id: I4523fdaa2c8855c5029667fb0e32b99ec563af27
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Thu, 23 Apr 2015 13:35:38 +0000 (13:35 +0000)]
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Shawn Rutledge [Tue, 21 Apr 2015 15:57:40 +0000 (17:57 +0200)]
FolderListModel: add indexOf(file) function
Needed in QtQuick.Dialogs FileDialog implementation to help with
pre-selecting files.
Task-number: QTBUG-42814
Change-Id: Iaa7be083c238e214a12819b722cbd12f94b27965
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Liang Qi [Wed, 22 Apr 2015 13:04:42 +0000 (15:04 +0200)]
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/qml/qml/qqmlbinding.cpp
src/qml/jsruntime/qv4arraybuffer.cpp
src/qml/jsruntime/qv4functionobject.cpp
Change-Id: Ic752e9dfd69b282093651c9234c110a49762f06d
Gunnar Sletta [Tue, 31 Mar 2015 14:14:14 +0000 (16:14 +0200)]
Include QQuickWindow::resetOpenGLState() in OpenGL under QML example.
Change-Id: Ieae110475dfb3f91d68919c7075054b5400f9e73
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
J-P Nurmi [Mon, 20 Apr 2015 12:56:36 +0000 (14:56 +0200)]
Add plugins.qmltypes for QtQml.Models
Task-number: QTBUG-43229
Task-number: QTCREATORBUG-13780
Change-Id: Ice39a26809eb433a01205bae5cea9cfdc0699c27
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Lars Knoll [Fri, 13 Feb 2015 13:17:45 +0000 (14:17 +0100)]
Rename Heap::Base::as() to cast()
The as() methods in other places to dynamic type checking, whereas
cast() methods are basically the same as a static_cast.
Change-Id: Iacd0174824b41b8fad05d6b55b1e62e3b44a31db
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 13:08:33 +0000 (14:08 +0100)]
Remove last asFoo() methods from Managed
Also add some safety checks in case the heap pointer
inside the Value is 0.
Change-Id: I61d37410c10c34f197175dbbd9ea8fa8c95c12cd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 13:02:09 +0000 (14:02 +0100)]
Move some methods from qv4value_inl_p.h to qv4value_p.h
Change-Id: If8fe9907ad1cc479f7615ceabd419e74b4da0d11
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Shawn Rutledge [Wed, 18 Feb 2015 08:23:32 +0000 (09:23 +0100)]
add manual tests for touch interaction
So far there are manual tests for Flickable and
MultiPointTouchArea. It can be expanded later.
Change-Id: Ifa838b68f137a49647a208dc15f22c90f1e02d1f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 13:01:44 +0000 (14:01 +0100)]
Remove now unused managed_cast template method
Change-Id: Id8a5290848b65222cc9ebfe7a6d59f7994096e14
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 12:56:05 +0000 (13:56 +0100)]
Get rid of asFunctionObject()
Change-Id: Ib4858376dc0ec57fa473c80696abc66a570c90ec
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 12:39:20 +0000 (13:39 +0100)]
More cleanups
Get rid of Value::asObject(), and pass const Managed pointers
into some more vtable methods.
Change-Id: Ia4f427d5fd8868f77b4015d1ce5424d32bfc2115
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 11:19:04 +0000 (12:19 +0100)]
Get rid of asManaged()
Change-Id: I853417fdf1cc339f7d43a006c20e1626b6bfb288
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 10:47:25 +0000 (11:47 +0100)]
Get rid of asNumberObject
Change-Id: Ie6355beabce3de65c215514d9dc98294b5980c9d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Mitch Curtis [Tue, 21 Apr 2015 11:41:33 +0000 (13:41 +0200)]
XCB: respect QPlatformDrag::ownsDragObject().
In a Qt Quick application on X11, QDrag events were deleted before
their data could be passed to an external application. There was a
function introduced recently to account for this problem, so we should
use that instead.
Change-Id: If74dd32bb8c7aa7c2e3160448af546d2e8640528
Task-number: QTBUG-45604
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Simon Hausmann [Tue, 21 Apr 2015 08:48:29 +0000 (10:48 +0200)]
Stabilize QQuickWindow test
Various test functions use QTest::touch* and QTest::mouse* to synthesize
touch/mouse events. The synthetization relies on the QWindow to be globally
positioned (with regards to the window manager), as it performs a translation
of the supplied window coordinates to global coordinates. If this happens too
early in the window mapping process, we end up with wrong global coordinates,
that in turn mean that when the event is mapped back to the window coordinates
later, it has the wrong coordinates and not what the test expects.
qWaitForWindowActive tries to accommodate this case by waiting until the
positioning of the window is "complete", as opposed to qWaitForWindowExposed,
which returns as soon as we have a rendering surface.
The symptom in the CI system was that when this race condition hit, the y
coordinate of events was off by 28 pixels on Ubuntu machines, which appears to
be the height of the title or menu bar.
Therefore this patch changes test functions that synthesize events to use
qWaitForWindowActive.
Change-Id: Ia8ecff517f4eefb15068ca1c342ef6666681c362
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Simon Hausmann [Tue, 21 Apr 2015 07:35:00 +0000 (09:35 +0200)]
Extend blacklist
stopAtBounds also fails on 64-bit machines, as seen in
http://testresults.qt.io/logs/qt/qtdeclarative/
aa44b0fe7e7a72ec4257b338938e1ec3b7aee1e1/windows8x86_64windows8x86_64msvc2013developer-build_release_build-examples/
6da9f7a63d5f4ce18e85b7a72ff0e888f3446352/testlog.txt.gz
Change-Id: If8ac78bdb3b1e66106644efc19ef8fd018aac66e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Mitch Curtis [Fri, 17 Apr 2015 10:19:08 +0000 (12:19 +0200)]
Privately export QQuickPaintedItemPrivate.
We need it in Qt Quick Extras 2.0.
Change-Id: Ieafa4a860322615066c4569a59fa2f85c8b2f956
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Simon Hausmann [Fri, 17 Apr 2015 08:21:36 +0000 (10:21 +0200)]
Skip some tests that are hanging in the CI system
It is most unfortunate that those tests are hanging, but in order to move
forward we temporarily skip them.
Task-number: QTBUG-45655
Change-Id: I9fae6c21ca3b5c7eb6715d520bd58e366136ed58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Mitch Curtis [Thu, 16 Apr 2015 12:31:01 +0000 (14:31 +0200)]
TestCase: add equals() function to QuickTestImageObject.
This allows for comparison of image objects returned from TestCase's
grabImage() function using QImage's operator== function. Doing pixel by
pixel image comparisons in QML is extremely slow.
This functionality is useful for checking that an item was redrawn
after a property change, for example.
[ChangeLog][QuickTest][TestCase] Added equals() function to image
object returned from TestCase's grabImage() function.
Change-Id: I0ece9df6effe2b1b9d8e1ee8ac011115d9367ef2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Kari Hautamäki [Mon, 20 Apr 2015 11:49:09 +0000 (14:49 +0300)]
Add CONSTANT to Q_PROPERTY textDocument
Add CONSTANT keyword to Q_PROPERTY textDocument to remove warning "depends
on non-NOTIFYable properties".
Task-number: QTBUG-45115
Change-Id: I090870765e8b32bc1438d21d9c1b7ef942c043b5
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Marco Benelli [Tue, 17 Mar 2015 15:33:14 +0000 (16:33 +0100)]
qmlplugindump: add dependencies
Change-Id: I53b2a394ba1f6c8a7a88f7456fba8646cdf35bf4
Task-number: QTBUG-41079
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Mon, 13 Apr 2015 11:46:40 +0000 (13:46 +0200)]
Eliminate remaining property cache string lookups upon object instantiation
Even for the id property binding we can use the property data cache and
therefore avoid string hashing.
Change-Id: Id9a4ca3159cdfe5ba93060f1bc8626e70140daa1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 08:13:04 +0000 (10:13 +0200)]
Speed up instantiation of objects that are assigned to list properties
For example massive amount of Item{} objects that are "children" of another
item and thus get assigned to the default data list property. Instead of
repeatedly retrieving that list property via a meta-call, we can do that only
once and re-load if necessary.
Change-Id: Ia7d10b84b3c7dca58d9f0b4b2138bd6f916c128d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 08:23:17 +0000 (10:23 +0200)]
Speed up property binding initialization on object creation
Avoid repeated string hashing and lookups in the property cache in order to
retrieve the property details when initializing literal and script bindings.
Instead we now cache the property data at type validation time, similar to how
the property data was encoded in the VME instructions in the old engine.
Change-Id: I3957c7c4c3e26dfa97c4880b23940a3755ee90e4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Mon, 20 Apr 2015 11:38:31 +0000 (13:38 +0200)]
Always return a proper Value from JIT generated code
When throwing an exception, we ended up having junk data in
the return value register. That could end up being written
onto the JS stack when returning from the function, and then
causing crashes in the garbage collector afterwards.
Fix it by returning undefined in case we throw an exception.
Change-Id: Ice380f2de673b179c1e2c98fbeb87e47347ef520
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Holger Hans Peter Freyther [Tue, 31 Mar 2015 18:23:27 +0000 (20:23 +0200)]
Address uninitialized pointer variables
Coverity CID 10721, 84861, 86705, 85424, 85422,
85259, 84863, 84857
Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Sze Howe Koh [Tue, 14 Apr 2015 23:45:03 +0000 (07:45 +0800)]
Doc: Expand on QJSEngine exception handling
- List the properties provided by the Error object. They consist of the
standard properties and a subset of the Mozilla extensions.
- Add QJSValue::property() usage to the example code.
- Add cross-referencing.
- Some rephrasing for clarity and conciseness.
Change-Id: I1eb6943899fee2bd81851ccb03660a7a474a975d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 10:45:03 +0000 (11:45 +0100)]
Get rid of asStringObject()
Change-Id: Iad3afd00d2fdbd04efa4f3b841f11269ab496826
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
J-P Nurmi [Fri, 10 Apr 2015 12:20:39 +0000 (14:20 +0200)]
qquickitemviewtransition_p.h: eliminate a "_p_p.h" include
QtQuick.Controls2.StackView includes qquickitemviewtransition_p.h
to run push/pop transitions from C++. Make this header include less
and use forward declares to avoid including Q_AUTOTEST_EXPORT'd
classes, causing a linking error on Windows.
Change-Id: Ide82a66de62697d01609e5e03798b7a6a893c418
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Elvis Teixeira
Nico Vertriest [Mon, 30 Mar 2015 08:27:35 +0000 (10:27 +0200)]
Doc: corrected some language issues
Task-number: QTWEBSITE-628
Change-Id: I608c4fe5e18f6494cc03377080a536a01be232ca
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Friedemann Kleint [Fri, 17 Apr 2015 06:46:11 +0000 (08:46 +0200)]
Fix forward declaration of QQmlSourceLocation.
Fix warning:
qtdeclarative/src/qml/qml/qqmljavascriptexpression_p.h(55) : warning C4099: 'QQmlSourceLocation' : type name first seen using 'struct' now seen using 'class'
Change-Id: Id441502913180631fe09c2f256498063c8f144b1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Shawn Rutledge [Thu, 16 Apr 2015 07:52:53 +0000 (09:52 +0200)]
rename manual test dir shorcuts -> shortcuts
Change-Id: Icdd494fb6c561b15d3cccb925b84990163c77bf2
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 10:31:45 +0000 (11:31 +0100)]
Get rid of Value::asDateObject()
Change-Id: I71816a784b5175f600c5a870318b16c0d84c42fb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Liang Qi [Thu, 16 Apr 2015 18:27:44 +0000 (18:27 +0000)]
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Valery Kotov [Tue, 7 Apr 2015 17:34:44 +0000 (20:34 +0300)]
QML Engine: JSON XHR response type support
Support for "json" response type for QQmlXMLHttpRequest was
added.
[ChangeLog][QtQml][QQmlXMLHttpRequest] QQmlXMLHttpRequest now
supports "json" binary response type.
Change-Id: I21b7659c02dfdc6b64a73e1d2003e269d90b3b23
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Lars Knoll [Fri, 13 Feb 2015 09:42:01 +0000 (10:42 +0100)]
Further cleanups
The get and getIndexed vtable methods should take a const Managed
pointer. Start cleaning up the asFoo() methods in Value and Managed
by removing asArrayObject() and asErrorObject().
Change-Id: Ibd49bf20773ef84c15785b7ac37a7bc9fd4745d5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simon Hausmann [Fri, 10 Apr 2015 13:17:51 +0000 (15:17 +0200)]
Speed up composite type instantiation with lots of IDs
We don't need to convert from a QHash to a QVector in order to populate the
property name cache in QQmlContextData.
Change-Id: Ifa8e4f64a1e174907e92684b2d38abaf0a4a705c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 13:17:36 +0000 (15:17 +0200)]
Speed up object creation
Avoid copying url and file name twice into the context every time we
instantiate an object.
Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 12:56:24 +0000 (14:56 +0200)]
Speed up object creation with lots of id name objects
In the common case when objects are referenced by id, we don't need the
QQmlContextData's property name cache for the lookup. Instead of bindings
we resolve the id to an integer at type compilation time. Therefore we can
delay the population of the QQmlContextData's propertyNames until we need it
and therefore safe time on startup.
Change-Id: I2e8eeb51b1ac92f230059be3467f9a1e00fdbbef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 13:50:55 +0000 (15:50 +0200)]
Speed up script binding initialization
Don't spend any time repeatedly building the same internal class for the simple
binding functions. We can do that once at engine construction time.
Change-Id: I3777b5bd15ad4a8aaf78ae13bee27e8d8cadc2ee
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 9 Apr 2015 10:33:13 +0000 (12:33 +0200)]
Avoid strict mode for the surrounding QML call contexts
The strict mode is not necessary from a correctness point of view but comes
with the extra cost that for each script binding additional caller and
arguments accessor members are a installed on the internal class.
Change-Id: I13b688bc8344ee2f027679821586ca7670d17cc5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Laszlo Agocs [Wed, 15 Apr 2015 16:14:15 +0000 (18:14 +0200)]
Support sRGB for text with QQuickWidget
Otherwise we get visually different results with QQuickWindow
and QQuickWidget on OS X.
Task-number: QTBUG-42861
Change-Id: Icbf6f6e980129f5de73a88e7be7bef4f592e875e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Simon Hausmann [Thu, 9 Apr 2015 14:07:08 +0000 (16:07 +0200)]
Speed up creation of objects without script bindings
Avoid the creation of the QML binding wrappers if we don't need it, by
moving the creation into a function that creates it on demand.
Change-Id: I1af6a8507a114c1a0b83374704981b7ed4c4a3fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 12:22:58 +0000 (14:22 +0200)]
Speed up copying of value types in bindings
When a binding results in a value type reference and the destination property
is of the same time, then we can avoid a heap allocation and just allocate
the value type memory on the stack, construct, copy and destruct.
Change-Id: If71ef82b0ced85c1b962c5e44147d6c07edd1440
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 10:34:46 +0000 (12:34 +0200)]
Speed up value type binding creation
* Avoid calling QMetaType::construct/destruct(typeId, ...) as that requires
repeated lookups in the type registry. Instead cache the constructor/destructor/etc.
function addresses in the QQmlValueType singletons as QMetaType
* Allocate memory for the gadget pointer lazily, to accommodate the common case of
a value type binding by property reference.
Change-Id: I98a3ac73453b8f80027c06401b4f29a9707949d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 13 Apr 2015 14:01:59 +0000 (16:01 +0200)]
Changed QML type locking
Replace the use of QReadWriteLock with a plain QMutex. At this point
QReadWriteLock adds a lot of overhead due to its internal QHash and otherwise
offers little over a recursive mutex, especially given that there is most
of the time only one reading thread and one writing thread.
Change-Id: I0a91e4a64cff5d25e4a133ed46b08912e81bb055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 13:53:02 +0000 (15:53 +0200)]
Speed up creation of objects that don't import scripts
In the common case of no 'import "Foo.js" as Bar' we can avoid the creation of
the JS array that holds the script references.
Change-Id: I6704bd9efaf8681f939a148b2cb0a1de2cb22d80
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 10 Apr 2015 10:34:36 +0000 (12:34 +0200)]
Speed up binding evaluation
Don't spend any cycles of determining the location of the binding (file, line,
column) unless we really need that information. That's the case when the profiler
is active or an error happens.
Change-Id: Iae97808d500b88fed6a813e8b224aa6ebe04d3b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Liang Qi [Thu, 16 Apr 2015 10:29:42 +0000 (12:29 +0200)]
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro
tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler.pro
Change-Id: I76d87e3df97ebdba902ca3d7488c1582eca2a83c
Gunnar Sletta [Tue, 24 Mar 2015 06:58:39 +0000 (07:58 +0100)]
Fix regressed atlas texture log output. Broken since:
a49b0ad786
Change-Id: I5df32609b45047666ea8bde500cf771736c396e5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Gunnar Sletta [Wed, 1 Apr 2015 12:45:30 +0000 (14:45 +0200)]
Make sure we have enough precision to run animations for years.
Task-number: QTBUG-45358
Change-Id: I4af0da937253f3ae578333c659dcbb132312a9cc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Miikka Heikkinen [Wed, 18 Mar 2015 12:13:10 +0000 (14:13 +0200)]
Added a new render job stage: NoStage
NoStage allows scheduling jobs for immediate execution on the
renderer thread.
[ChangeLog][QtQuick][QQuickWindow] Added a render job stage: NoStage
Task-number: QTBUG-44953
Change-Id: I918c79f1d095bc27d911a88d81376d146a04313c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Gunnar Sletta [Wed, 8 Apr 2015 07:27:44 +0000 (09:27 +0200)]
Make sure we stop animators if they are yet to be started.
Change-Id: I311e66c64a79581739f80e124fd58da2aaded549
Task-number: QTBUG-45220
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Simon Hausmann [Tue, 14 Apr 2015 12:38:07 +0000 (14:38 +0200)]
Stabilize tst_qquickimage::noLoading
The test loads an image from a remote source and it has a QSignalSpy installed
for the progressChanged(qreal) signal on the QQuickImage. The test counts the
number of times the signal is emitted and expects it to hit an exact value.
That seems wrong when loading an image over the network, as we have no control
over in what pieces the data arrives on our end. And as it turns out, the test
occasionally fails in the CI system, which is also reproducible.
To stabilize the test, we now expect at least two emissions of the signal when
loading from the network (0% and 100%) but there may be more (0% 10% 80% 100%
for example). In addition the reload case is simplified by resetting the spy
and verifying that progressChanged was not emitted at all.
Change-Id: Ib2e660651d40b92eff889ebe3baabb74d6e00fb4
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Robert Griebl [Tue, 24 Mar 2015 21:28:34 +0000 (22:28 +0100)]
Unregister types in the QMetaType system on unload.
This patch will enable the unregistering of previously registered
QMetaTypes, when the corresponding Qml type is dead.
The API for this was added to QtBase with b00201b.
Change-Id: I96d4a3004d8da59ee8edf7cfd6d2fef3a5410807
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Valery Kotov [Wed, 25 Mar 2015 18:17:08 +0000 (20:17 +0200)]
QML Engine: Share data for ArrayBuffer created from QByteArray.
ExecutionEngine performs shallow copy of internal data for ArrayBuffer
created from QByteArray.
Change-Id: I514cd9708a7fbe9a989937fac62d00b464d7362d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Valery Kotov <kotov.valery@gmail.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Julien Brianceau [Tue, 14 Apr 2015 16:15:54 +0000 (18:15 +0200)]
V4 JIT: cosmetic change
Since
4377d44fb7399751ed4f284bb4be7ece494aff6d, we can avoid one
generateFunctionCallImp bounce.
Change-Id: I2e92578dbc26a614f7626d2c28a2d9b28dd06b6b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Albert Astals Cid [Tue, 14 Apr 2015 14:02:43 +0000 (16:02 +0200)]
Protect the RegExp against early garbage collection
Backported from Qt 5.5
Change-Id: Ice9fd8061fac0c35d787e1603873c69f8ef7e10b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Daniel Teske [Thu, 15 Jan 2015 15:34:53 +0000 (16:34 +0100)]
Use qt_subtract_from_timeout instead of duplicating qt_timeout_value
The same function was duplicated 5 times in qtbase, so create one copy
to rule them all and use it also in QtDeclarative.
Change-Id: I4e39a7ee0541ce4fe9710cea344e537ee011bbe9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Simon Hausmann [Wed, 8 Apr 2015 13:55:34 +0000 (15:55 +0200)]
Simple speed-up for binding setup during object instantiation
We use stringAt() to retrieve the name of the id property of an object but all
we do with that string is check if it has a length. So if an id is set, we
allocate memory and copy the string data into a new QString, and if it's not
set then we get a default constructed QString. Either way the string isn't used
and we can simply check for whether the id is set by checking if the idIndex is
non-zero.
Change-Id: Ib84fb05ed31c59f7e85dac72ab61b4d3bc9c902b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 8 Apr 2015 12:49:41 +0000 (14:49 +0200)]
Cleanup: Fix const'ness of the property binding validator code
The property validator is supposed to validate the proposed property bindings
and abort type compilation if necessary. As such it is a read-only pass through
the data structures and therefore we make it const. However it does have a
side-effect of collecting some state, which however is "write-only" and
therefore marked as mutable. Those variables are written to, but not read
during this pass.
Change-Id: I6a3655fedbd6691b7498cf82ca1c8e21dd635bd3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 8 Apr 2015 12:09:14 +0000 (14:09 +0200)]
Cleanup
Avoid re-using the same variable for different purposes, so just pull in the
first use into the tight scope and the second "property" variable close to
the loop it is used with.
Change-Id: I3a325478f9e56413b65dea9c7e05566497fbc6cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Julien Brianceau [Mon, 13 Apr 2015 15:00:34 +0000 (17:00 +0200)]
V4 JIT: fix typo in Binop::int32Binop
Change-Id: I68f073ab512b482c9b3b1ad7860f4c759245298e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Christian Strømme [Mon, 30 Mar 2015 12:14:00 +0000 (14:14 +0200)]
Match the offscreen windows position to the QQuickWidget position.
The position of the offscreen window would always be set to 0,0,
making it impossible to get the actual position of the scene.
With this change, it will be possible for child windows or items
in the scene to correctly calculate their global position.
Change-Id: Ibd3ff03880209047776e86ad889b40cbf79c3e6e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Frederik Gladhorn [Mon, 30 Mar 2015 22:21:58 +0000 (00:21 +0200)]
Fix a few typos
Change-Id: Ia00949757a6f47babc1748f27e32a9644d6cc608
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Laszlo Agocs [Mon, 13 Apr 2015 08:18:22 +0000 (10:18 +0200)]
Avoid running anims at 3x speed on Windows
When there is no render pending, renderWindow() is not called and so
there is no blocking for vsync. Advancing the animations without any
sleep is wrong in this case and results in animations running at 3x
speed in case there is no change in the scenegraph contents.
To solve this, import the threaded render loop's sleep call.
Task-number: QTBUG-42699
Change-Id: I3658a827af12d4bc2ac05c7b0b29c65e9fc99675
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Liang Qi [Mon, 13 Apr 2015 07:46:15 +0000 (09:46 +0200)]
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/BLACKLIST
Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
Caroline Chao [Wed, 8 Apr 2015 12:13:28 +0000 (14:13 +0200)]
Tests: Use blacklist instead of insignificant for tst_qquickanimations
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file.
Blacklist the relevant tests, the tests that have been found flaky in CI.
Change-Id: I4c3ce430e654886ceea8b6f714710ebe2374e4db
Task-number: QTBUG-45466
Task-number: QTBUG-29062
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Caroline Chao [Thu, 9 Apr 2015 12:22:31 +0000 (14:22 +0200)]
Tests: Use blacklist instead of insignificant for tst_qquickflickable
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file.
Blacklist the relevant tests, the tests that have been found flaky or
failing in CI.
Change-Id: If145b9bc413e4c9dbf1c3c06c1596647c707770e
Task-number: QTBUG-36804
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Albert Astals Cid [Wed, 1 Apr 2015 14:20:19 +0000 (16:20 +0200)]
Do not stall loading of local images if network is slow
Without this patch it can happen that we're
loading IMAGEREQUEST_MAX_REQUEST_COUNT http based images,
if the next image to load is a local file it wouldn't be processed
until one of the http ones finishes, which makes not much sense
Change-Id: I515306005192a20722f0c4588a1db1241348407c
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Eskil Abrahamsen Blomfeldt [Wed, 8 Apr 2015 11:09:24 +0000 (13:09 +0200)]
Fix TextEdit when vertical alignment != AlignTop
When the TextEdit's alignment was either AlignBottom or
AlignVCenter, several things would be broken: First of all
the position of all non-dirty nodes would not be updated,
so if you e.g. added text to the end of the document, it
would overlap with the previously added text.
Also, the frame decorations were always aligned to the top, since
the basePosition was not accounted for in the node for this.
The fix is to translate the root node to the base position instead
of baking this into the position of the text nodes. This also
automatically fixes frame decorations since it's already aligned
to the top of the root node.
[ChangeLog][TextEdit] Fixed issues with using other vertical
alignments than AlignTop.
Change-Id: I11f73eab21a28658a5cbf00292fd519efd0f3e7f
Task-number: QTBUG-45032
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Caroline Chao [Wed, 8 Apr 2015 12:41:23 +0000 (14:41 +0200)]
Tests: Make qquickcustomparticle significant again
The test is passing in CI and it seems it was temporarily
made insignificant in
5a4eebbc.
Change-Id: Ic53d45b842c9a9c431a43cb6d5cbd3849e5729ed
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Caroline Chao [Wed, 8 Apr 2015 13:00:06 +0000 (15:00 +0200)]
Tests: Make qquicktrailemitter significant again
The test is now passing in CI.
Change-Id: Iad7dc46e7819ba9e9f604ed39ab9bc53f123b119
Task-number: QTBUG-33421
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Caroline Chao [Wed, 8 Apr 2015 13:16:15 +0000 (15:16 +0200)]
Tests: Make qqmldebugjs significant again
The test is now passing in CI.
Change-Id: I9414e05d40fe373878afa43121fcfa7cf95fcbdf
Task-number: QTBUG-28263
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Caroline Chao [Tue, 7 Apr 2015 12:58:27 +0000 (14:58 +0200)]
Tests: Make qquickgridview significant again
The qquickgridview tests are passing in CI
Change-Id: Idaf5a9d9df06a28c9ff5162b7bb00e4d677c3a0b
Task-number: QTBUG-33017
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Caroline Chao [Wed, 8 Apr 2015 07:32:24 +0000 (09:32 +0200)]
Tests: Make qquicktext, qquicktextedit and qquickpathview significant
The tests are now passing in CI for OS X.
The test qquicktextedit is also passing on win32.
Make qquicktext, qquicktextedit and qquickpathview significant again.
Change-Id: I778cc90aff0d1e76b66b6f8ae5150d3113e6fc68
Task-number: QTBUG-27740
Task-number: QTBUG-32540
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Julien Brianceau [Fri, 3 Apr 2015 07:13:17 +0000 (09:13 +0200)]
[mips] Handle properly unaligned halfword load.
This patch improves YarrJIT efficiency on mips platforms.
Cherry-picked from qtwebkit (
ea22657d17a934b04c8621dc8891a1d4d80510e3)
Change-Id: I83eca9716e4d6e9e1dd4d8ceb76c3da380502ce7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Ulf Hermann [Wed, 8 Apr 2015 14:07:46 +0000 (16:07 +0200)]
Remove outdated V8 profiler test
Change-Id: I296a3f94d16c4e7a6f89e566893f627c50b66ba3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Mitch Curtis [Wed, 8 Apr 2015 08:04:25 +0000 (10:04 +0200)]
Return the correct type from Item::mapToItem/Item::mapFromItem.
Previously we were returning a JavaScript object with x/y/width/height
properties, instead of a point/rect. This meant that the type couldn't
be converted to a point/rect because we don't support duck typing,
where we would deduce the type based on the properties.
One example of a broken use case that this patch fixes is when QML is
unable to convert the return type to a point in a property declaration:
property point p: mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY)
Another is using the result of the function to pass to another function:
child.contains(mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY))
Change-Id: I3ce82f10175f904dd02c8af6b5e42cee14b2ebb2
Task-number: QTBUG-41452
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>